background.js 1.1 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333293342933529336293372933829339293402934129342293432934429345293462934729348293492935029351293522935329354293552935629357293582935929360293612936229363293642936529366293672936829369293702937129372293732937429375293762937729378293792938029381293822938329384293852938629387293882938929390293912939229393293942939529396293972939829399294002940129402294032940429405294062940729408294092941029411294122941329414294152941629417294182941929420294212942229423294242942529426294272942829429294302943129432294332943429435294362943729438294392944029441294422944329444294452944629447294482944929450294512945229453294542945529456294572945829459294602946129462294632946429465294662946729468294692947029471294722947329474294752947629477294782947929480294812948229483294842948529486294872948829489294902949129492294932949429495294962949729498294992950029501295022950329504295052950629507295082950929510295112951229513295142951529516295172951829519295202952129522295232952429525295262952729528295292953029531295322953329534295352953629537295382953929540295412954229543295442954529546295472954829549295502955129552295532955429555295562955729558295592956029561295622956329564295652956629567295682956929570295712957229573295742957529576295772957829579295802958129582295832958429585295862958729588295892959029591295922959329594295952959629597295982959929600296012960229603296042960529606296072960829609296102961129612296132961429615296162961729618296192962029621296222962329624296252962629627296282962929630296312963229633296342963529636296372963829639296402964129642296432964429645296462964729648296492965029651296522965329654296552965629657296582965929660296612966229663296642966529666296672966829669296702967129672296732967429675296762967729678296792968029681296822968329684296852968629687296882968929690296912969229693296942969529696296972969829699297002970129702297032970429705297062970729708297092971029711297122971329714297152971629717297182971929720297212972229723297242972529726297272972829729297302973129732297332973429735297362973729738297392974029741297422974329744297452974629747297482974929750297512975229753297542975529756297572975829759297602976129762297632976429765297662976729768297692977029771297722977329774297752977629777297782977929780297812978229783297842978529786297872978829789297902979129792297932979429795297962979729798297992980029801298022980329804298052980629807298082980929810298112981229813298142981529816298172981829819298202982129822298232982429825298262982729828298292983029831298322983329834298352983629837298382983929840298412984229843298442984529846298472984829849298502985129852298532985429855298562985729858298592986029861298622986329864298652986629867298682986929870298712987229873298742987529876298772987829879298802988129882298832988429885298862988729888298892989029891298922989329894298952989629897298982989929900299012990229903299042990529906299072990829909299102991129912299132991429915299162991729918299192992029921299222992329924299252992629927299282992929930299312993229933299342993529936299372993829939299402994129942299432994429945299462994729948299492995029951299522995329954299552995629957299582995929960299612996229963299642996529966299672996829969299702997129972299732997429975299762997729978299792998029981299822998329984299852998629987299882998929990299912999229993299942999529996299972999829999300003000130002300033000430005300063000730008300093001030011300123001330014300153001630017300183001930020300213002230023300243002530026300273002830029300303003130032300333003430035300363003730038300393004030041300423004330044300453004630047300483004930050300513005230053300543005530056300573005830059300603006130062300633006430065300663006730068300693007030071300723007330074300753007630077300783007930080300813008230083300843008530086300873008830089300903009130092300933009430095300963009730098300993010030101301023010330104301053010630107301083010930110301113011230113301143011530116301173011830119301203012130122301233012430125301263012730128301293013030131301323013330134301353013630137301383013930140301413014230143301443014530146301473014830149301503015130152301533015430155301563015730158301593016030161301623016330164301653016630167301683016930170301713017230173301743017530176301773017830179301803018130182301833018430185301863018730188301893019030191301923019330194301953019630197301983019930200302013020230203302043020530206302073020830209302103021130212302133021430215302163021730218302193022030221302223022330224302253022630227302283022930230302313023230233302343023530236302373023830239302403024130242302433024430245302463024730248302493025030251302523025330254302553025630257302583025930260302613026230263302643026530266302673026830269302703027130272302733027430275302763027730278302793028030281302823028330284302853028630287302883028930290302913029230293302943029530296302973029830299303003030130302303033030430305303063030730308303093031030311303123031330314303153031630317303183031930320303213032230323303243032530326303273032830329303303033130332303333033430335303363033730338303393034030341303423034330344303453034630347303483034930350303513035230353303543035530356303573035830359303603036130362303633036430365303663036730368303693037030371303723037330374303753037630377303783037930380303813038230383303843038530386303873038830389303903039130392303933039430395303963039730398303993040030401304023040330404304053040630407304083040930410304113041230413304143041530416304173041830419304203042130422304233042430425304263042730428304293043030431304323043330434304353043630437304383043930440304413044230443304443044530446304473044830449304503045130452304533045430455304563045730458304593046030461304623046330464304653046630467304683046930470304713047230473304743047530476304773047830479304803048130482304833048430485304863048730488304893049030491304923049330494304953049630497304983049930500305013050230503305043050530506305073050830509305103051130512305133051430515305163051730518305193052030521305223052330524305253052630527305283052930530305313053230533305343053530536305373053830539305403054130542305433054430545305463054730548305493055030551305523055330554305553055630557305583055930560305613056230563305643056530566305673056830569305703057130572305733057430575305763057730578305793058030581305823058330584305853058630587305883058930590305913059230593305943059530596305973059830599306003060130602306033060430605306063060730608306093061030611306123061330614306153061630617306183061930620306213062230623306243062530626306273062830629306303063130632306333063430635306363063730638306393064030641306423064330644306453064630647306483064930650306513065230653306543065530656306573065830659306603066130662306633066430665306663066730668306693067030671306723067330674306753067630677306783067930680306813068230683306843068530686306873068830689306903069130692306933069430695306963069730698306993070030701307023070330704307053070630707307083070930710307113071230713307143071530716307173071830719307203072130722307233072430725307263072730728307293073030731307323073330734307353073630737307383073930740307413074230743307443074530746307473074830749307503075130752307533075430755307563075730758307593076030761307623076330764307653076630767307683076930770307713077230773307743077530776307773077830779307803078130782307833078430785307863078730788307893079030791307923079330794307953079630797307983079930800308013080230803308043080530806308073080830809308103081130812308133081430815308163081730818308193082030821308223082330824308253082630827308283082930830308313083230833308343083530836308373083830839308403084130842308433084430845308463084730848308493085030851308523085330854308553085630857308583085930860308613086230863308643086530866308673086830869308703087130872308733087430875308763087730878308793088030881308823088330884308853088630887308883088930890308913089230893308943089530896308973089830899309003090130902309033090430905309063090730908309093091030911309123091330914309153091630917309183091930920309213092230923309243092530926309273092830929309303093130932309333093430935309363093730938309393094030941309423094330944309453094630947309483094930950309513095230953309543095530956309573095830959309603096130962309633096430965309663096730968309693097030971309723097330974309753097630977309783097930980309813098230983309843098530986309873098830989309903099130992309933099430995309963099730998309993100031001310023100331004310053100631007310083100931010310113101231013310143101531016310173101831019310203102131022310233102431025310263102731028310293103031031310323103331034310353103631037310383103931040310413104231043310443104531046310473104831049310503105131052310533105431055310563105731058310593106031061310623106331064310653106631067310683106931070310713107231073310743107531076310773107831079310803108131082310833108431085310863108731088310893109031091310923109331094310953109631097310983109931100311013110231103311043110531106311073110831109311103111131112311133111431115311163111731118311193112031121311223112331124311253112631127311283112931130311313113231133311343113531136311373113831139311403114131142311433114431145311463114731148311493115031151311523115331154311553115631157311583115931160311613116231163311643116531166311673116831169311703117131172311733117431175311763117731178311793118031181311823118331184311853118631187311883118931190311913119231193311943119531196311973119831199312003120131202312033120431205312063120731208312093121031211312123121331214312153121631217312183121931220312213122231223312243122531226312273122831229312303123131232312333123431235312363123731238312393124031241312423124331244312453124631247312483124931250312513125231253312543125531256312573125831259312603126131262312633126431265312663126731268312693127031271312723127331274312753127631277312783127931280312813128231283312843128531286312873128831289312903129131292312933129431295312963129731298312993130031301313023130331304313053130631307313083130931310313113131231313313143131531316313173131831319313203132131322313233132431325313263132731328313293133031331313323133331334313353133631337313383133931340313413134231343313443134531346313473134831349313503135131352313533135431355313563135731358313593136031361313623136331364313653136631367313683136931370313713137231373313743137531376313773137831379313803138131382313833138431385313863138731388313893139031391313923139331394313953139631397313983139931400314013140231403314043140531406314073140831409314103141131412314133141431415314163141731418314193142031421314223142331424314253142631427314283142931430314313143231433314343143531436314373143831439314403144131442314433144431445314463144731448314493145031451314523145331454314553145631457314583145931460314613146231463314643146531466314673146831469314703147131472314733147431475314763147731478314793148031481314823148331484314853148631487314883148931490314913149231493314943149531496314973149831499315003150131502315033150431505315063150731508315093151031511315123151331514315153151631517315183151931520315213152231523315243152531526315273152831529315303153131532315333153431535315363153731538315393154031541315423154331544315453154631547315483154931550315513155231553315543155531556315573155831559315603156131562315633156431565315663156731568315693157031571315723157331574315753157631577315783157931580315813158231583315843158531586315873158831589315903159131592315933159431595315963159731598315993160031601316023160331604316053160631607316083160931610316113161231613316143161531616316173161831619316203162131622316233162431625316263162731628316293163031631316323163331634316353163631637316383163931640316413164231643316443164531646316473164831649316503165131652316533165431655316563165731658316593166031661316623166331664316653166631667316683166931670316713167231673316743167531676316773167831679316803168131682316833168431685316863168731688316893169031691316923169331694316953169631697316983169931700317013170231703317043170531706317073170831709317103171131712317133171431715317163171731718317193172031721317223172331724317253172631727317283172931730317313173231733317343173531736317373173831739317403174131742317433174431745317463174731748317493175031751317523175331754317553175631757317583175931760317613176231763317643176531766317673176831769317703177131772317733177431775317763177731778317793178031781317823178331784317853178631787317883178931790317913179231793317943179531796317973179831799318003180131802318033180431805318063180731808318093181031811318123181331814318153181631817318183181931820318213182231823318243182531826318273182831829318303183131832318333183431835318363183731838318393184031841318423184331844318453184631847318483184931850318513185231853318543185531856318573185831859318603186131862318633186431865318663186731868318693187031871318723187331874318753187631877318783187931880318813188231883318843188531886318873188831889318903189131892318933189431895318963189731898318993190031901319023190331904319053190631907319083190931910319113191231913319143191531916319173191831919319203192131922319233192431925319263192731928319293193031931319323193331934319353193631937319383193931940319413194231943319443194531946319473194831949319503195131952319533195431955319563195731958319593196031961319623196331964319653196631967319683196931970319713197231973319743197531976319773197831979319803198131982319833198431985319863198731988319893199031991319923199331994319953199631997319983199932000320013200232003320043200532006320073200832009320103201132012320133201432015320163201732018320193202032021320223202332024320253202632027320283202932030320313203232033320343203532036320373203832039320403204132042320433204432045320463204732048320493205032051320523205332054320553205632057320583205932060320613206232063320643206532066320673206832069320703207132072320733207432075320763207732078320793208032081320823208332084320853208632087320883208932090320913209232093320943209532096320973209832099321003210132102321033210432105321063210732108321093211032111321123211332114321153211632117321183211932120321213212232123321243212532126321273212832129321303213132132321333213432135321363213732138321393214032141321423214332144321453214632147321483214932150321513215232153321543215532156321573215832159321603216132162321633216432165321663216732168321693217032171321723217332174321753217632177321783217932180321813218232183321843218532186321873218832189321903219132192321933219432195321963219732198321993220032201322023220332204322053220632207322083220932210322113221232213322143221532216322173221832219322203222132222322233222432225322263222732228322293223032231322323223332234322353223632237322383223932240322413224232243322443224532246322473224832249322503225132252322533225432255322563225732258322593226032261322623226332264322653226632267322683226932270322713227232273322743227532276322773227832279322803228132282322833228432285322863228732288322893229032291322923229332294322953229632297322983229932300323013230232303323043230532306323073230832309323103231132312323133231432315323163231732318323193232032321323223232332324323253232632327323283232932330323313233232333323343233532336323373233832339323403234132342323433234432345323463234732348323493235032351323523235332354323553235632357323583235932360323613236232363323643236532366323673236832369323703237132372323733237432375323763237732378323793238032381323823238332384323853238632387323883238932390323913239232393323943239532396323973239832399324003240132402324033240432405324063240732408324093241032411324123241332414324153241632417324183241932420324213242232423324243242532426324273242832429324303243132432324333243432435324363243732438324393244032441324423244332444324453244632447324483244932450324513245232453324543245532456324573245832459324603246132462324633246432465324663246732468324693247032471324723247332474324753247632477324783247932480324813248232483324843248532486324873248832489324903249132492324933249432495324963249732498324993250032501325023250332504325053250632507325083250932510325113251232513325143251532516325173251832519325203252132522325233252432525325263252732528325293253032531325323253332534325353253632537325383253932540325413254232543325443254532546325473254832549325503255132552325533255432555325563255732558325593256032561325623256332564325653256632567325683256932570325713257232573325743257532576325773257832579325803258132582325833258432585325863258732588325893259032591325923259332594325953259632597325983259932600326013260232603326043260532606326073260832609326103261132612326133261432615326163261732618326193262032621326223262332624326253262632627326283262932630326313263232633326343263532636326373263832639326403264132642326433264432645326463264732648326493265032651326523265332654326553265632657326583265932660326613266232663326643266532666326673266832669326703267132672326733267432675326763267732678326793268032681326823268332684326853268632687326883268932690326913269232693326943269532696326973269832699327003270132702327033270432705327063270732708327093271032711327123271332714327153271632717327183271932720327213272232723327243272532726327273272832729327303273132732327333273432735327363273732738327393274032741327423274332744327453274632747327483274932750327513275232753327543275532756327573275832759327603276132762327633276432765327663276732768327693277032771327723277332774327753277632777327783277932780327813278232783327843278532786327873278832789327903279132792327933279432795327963279732798327993280032801328023280332804328053280632807328083280932810328113281232813328143281532816328173281832819328203282132822328233282432825328263282732828328293283032831328323283332834328353283632837328383283932840328413284232843328443284532846328473284832849328503285132852328533285432855328563285732858328593286032861328623286332864328653286632867328683286932870328713287232873328743287532876328773287832879328803288132882328833288432885328863288732888328893289032891328923289332894328953289632897328983289932900329013290232903329043290532906329073290832909329103291132912329133291432915329163291732918329193292032921329223292332924329253292632927329283292932930329313293232933329343293532936329373293832939329403294132942329433294432945329463294732948329493295032951329523295332954329553295632957329583295932960329613296232963329643296532966329673296832969329703297132972329733297432975329763297732978329793298032981329823298332984329853298632987329883298932990329913299232993329943299532996329973299832999330003300133002330033300433005330063300733008330093301033011330123301333014330153301633017330183301933020330213302233023330243302533026330273302833029330303303133032330333303433035330363303733038330393304033041330423304333044330453304633047330483304933050330513305233053330543305533056330573305833059330603306133062330633306433065330663306733068330693307033071330723307333074330753307633077330783307933080330813308233083330843308533086330873308833089330903309133092330933309433095330963309733098330993310033101331023310333104331053310633107331083310933110331113311233113331143311533116331173311833119331203312133122331233312433125331263312733128331293313033131331323313333134331353313633137331383313933140331413314233143331443314533146331473314833149331503315133152331533315433155331563315733158331593316033161331623316333164331653316633167331683316933170331713317233173331743317533176331773317833179331803318133182331833318433185331863318733188331893319033191331923319333194331953319633197331983319933200332013320233203332043320533206332073320833209332103321133212332133321433215332163321733218332193322033221332223322333224332253322633227332283322933230332313323233233332343323533236332373323833239332403324133242332433324433245332463324733248332493325033251332523325333254332553325633257332583325933260332613326233263332643326533266332673326833269332703327133272332733327433275332763327733278332793328033281332823328333284332853328633287332883328933290332913329233293332943329533296332973329833299333003330133302333033330433305333063330733308333093331033311333123331333314333153331633317333183331933320333213332233323333243332533326333273332833329333303333133332333333333433335333363333733338333393334033341333423334333344333453334633347333483334933350333513335233353333543335533356333573335833359333603336133362333633336433365333663336733368333693337033371333723337333374333753337633377333783337933380333813338233383333843338533386333873338833389333903339133392333933339433395333963339733398333993340033401334023340333404334053340633407334083340933410334113341233413334143341533416334173341833419334203342133422334233342433425334263342733428334293343033431334323343333434334353343633437334383343933440334413344233443334443344533446334473344833449334503345133452334533345433455334563345733458334593346033461334623346333464334653346633467334683346933470334713347233473334743347533476334773347833479334803348133482334833348433485334863348733488334893349033491334923349333494334953349633497334983349933500335013350233503335043350533506335073350833509335103351133512335133351433515335163351733518335193352033521335223352333524335253352633527335283352933530335313353233533335343353533536335373353833539335403354133542335433354433545335463354733548335493355033551335523355333554335553355633557335583355933560335613356233563335643356533566335673356833569335703357133572335733357433575335763357733578335793358033581335823358333584335853358633587335883358933590335913359233593335943359533596335973359833599336003360133602336033360433605336063360733608336093361033611336123361333614336153361633617336183361933620336213362233623336243362533626336273362833629336303363133632336333363433635336363363733638336393364033641336423364333644336453364633647336483364933650336513365233653336543365533656336573365833659336603366133662336633366433665336663366733668336693367033671336723367333674336753367633677336783367933680336813368233683336843368533686336873368833689336903369133692336933369433695336963369733698336993370033701337023370333704337053370633707337083370933710337113371233713337143371533716337173371833719337203372133722337233372433725337263372733728337293373033731337323373333734337353373633737337383373933740337413374233743337443374533746337473374833749337503375133752337533375433755337563375733758337593376033761337623376333764337653376633767337683376933770337713377233773337743377533776337773377833779337803378133782337833378433785337863378733788337893379033791337923379333794337953379633797337983379933800338013380233803338043380533806338073380833809338103381133812338133381433815338163381733818338193382033821338223382333824338253382633827338283382933830338313383233833338343383533836338373383833839338403384133842338433384433845338463384733848338493385033851338523385333854338553385633857338583385933860338613386233863338643386533866338673386833869338703387133872338733387433875338763387733878338793388033881338823388333884338853388633887338883388933890338913389233893338943389533896338973389833899339003390133902339033390433905339063390733908339093391033911339123391333914339153391633917339183391933920339213392233923339243392533926339273392833929339303393133932339333393433935339363393733938339393394033941339423394333944339453394633947339483394933950339513395233953339543395533956339573395833959339603396133962339633396433965339663396733968339693397033971339723397333974339753397633977339783397933980339813398233983339843398533986339873398833989339903399133992339933399433995339963399733998339993400034001340023400334004340053400634007340083400934010340113401234013340143401534016340173401834019340203402134022340233402434025340263402734028340293403034031340323403334034340353403634037340383403934040340413404234043340443404534046340473404834049340503405134052340533405434055340563405734058340593406034061340623406334064340653406634067340683406934070340713407234073340743407534076340773407834079340803408134082340833408434085340863408734088340893409034091340923409334094340953409634097340983409934100341013410234103341043410534106341073410834109341103411134112341133411434115341163411734118341193412034121341223412334124341253412634127341283412934130341313413234133341343413534136341373413834139341403414134142341433414434145341463414734148341493415034151341523415334154341553415634157341583415934160341613416234163341643416534166341673416834169341703417134172341733417434175341763417734178341793418034181341823418334184341853418634187341883418934190341913419234193341943419534196341973419834199342003420134202342033420434205342063420734208342093421034211342123421334214342153421634217342183421934220342213422234223342243422534226342273422834229342303423134232342333423434235342363423734238342393424034241342423424334244342453424634247342483424934250342513425234253342543425534256342573425834259342603426134262342633426434265342663426734268342693427034271342723427334274342753427634277342783427934280342813428234283342843428534286342873428834289342903429134292342933429434295342963429734298342993430034301343023430334304343053430634307343083430934310343113431234313343143431534316343173431834319343203432134322343233432434325343263432734328343293433034331343323433334334343353433634337343383433934340343413434234343343443434534346343473434834349343503435134352343533435434355343563435734358343593436034361343623436334364343653436634367343683436934370343713437234373343743437534376343773437834379343803438134382343833438434385343863438734388343893439034391343923439334394343953439634397343983439934400344013440234403344043440534406344073440834409344103441134412344133441434415344163441734418344193442034421344223442334424344253442634427344283442934430344313443234433344343443534436344373443834439344403444134442344433444434445344463444734448344493445034451344523445334454344553445634457344583445934460344613446234463344643446534466344673446834469344703447134472344733447434475344763447734478344793448034481344823448334484344853448634487344883448934490344913449234493344943449534496344973449834499345003450134502345033450434505345063450734508345093451034511345123451334514345153451634517345183451934520345213452234523345243452534526345273452834529345303453134532345333453434535345363453734538345393454034541345423454334544345453454634547345483454934550345513455234553345543455534556345573455834559345603456134562345633456434565345663456734568345693457034571345723457334574345753457634577345783457934580345813458234583345843458534586345873458834589345903459134592345933459434595345963459734598345993460034601346023460334604346053460634607346083460934610346113461234613346143461534616346173461834619346203462134622346233462434625346263462734628346293463034631346323463334634346353463634637346383463934640346413464234643346443464534646346473464834649346503465134652346533465434655346563465734658346593466034661346623466334664346653466634667346683466934670346713467234673346743467534676346773467834679346803468134682346833468434685346863468734688346893469034691346923469334694346953469634697346983469934700347013470234703347043470534706347073470834709347103471134712347133471434715347163471734718347193472034721347223472334724347253472634727347283472934730347313473234733347343473534736347373473834739347403474134742347433474434745347463474734748347493475034751347523475334754347553475634757347583475934760347613476234763347643476534766347673476834769347703477134772347733477434775347763477734778347793478034781347823478334784347853478634787347883478934790347913479234793347943479534796347973479834799348003480134802348033480434805348063480734808348093481034811348123481334814348153481634817348183481934820348213482234823348243482534826348273482834829348303483134832348333483434835348363483734838348393484034841348423484334844348453484634847348483484934850348513485234853348543485534856348573485834859348603486134862348633486434865348663486734868348693487034871348723487334874348753487634877348783487934880348813488234883348843488534886348873488834889348903489134892348933489434895348963489734898348993490034901349023490334904349053490634907349083490934910349113491234913349143491534916349173491834919349203492134922349233492434925349263492734928349293493034931349323493334934349353493634937349383493934940349413494234943349443494534946349473494834949349503495134952349533495434955349563495734958349593496034961349623496334964349653496634967349683496934970349713497234973349743497534976349773497834979349803498134982349833498434985349863498734988349893499034991349923499334994349953499634997349983499935000350013500235003350043500535006350073500835009350103501135012350133501435015350163501735018350193502035021350223502335024350253502635027350283502935030350313503235033350343503535036350373503835039350403504135042350433504435045350463504735048350493505035051350523505335054350553505635057350583505935060350613506235063350643506535066350673506835069350703507135072350733507435075350763507735078350793508035081350823508335084350853508635087350883508935090350913509235093350943509535096350973509835099351003510135102351033510435105351063510735108351093511035111351123511335114351153511635117351183511935120351213512235123351243512535126351273512835129351303513135132351333513435135351363513735138351393514035141351423514335144351453514635147351483514935150351513515235153351543515535156351573515835159351603516135162351633516435165351663516735168351693517035171351723517335174351753517635177351783517935180351813518235183351843518535186351873518835189351903519135192351933519435195351963519735198351993520035201352023520335204352053520635207352083520935210352113521235213352143521535216352173521835219352203522135222352233522435225352263522735228352293523035231352323523335234352353523635237352383523935240352413524235243352443524535246352473524835249352503525135252352533525435255352563525735258352593526035261352623526335264352653526635267352683526935270352713527235273352743527535276352773527835279352803528135282352833528435285352863528735288352893529035291352923529335294352953529635297352983529935300353013530235303353043530535306353073530835309353103531135312353133531435315353163531735318353193532035321353223532335324353253532635327353283532935330353313533235333353343533535336353373533835339353403534135342353433534435345353463534735348353493535035351353523535335354353553535635357353583535935360353613536235363353643536535366353673536835369353703537135372353733537435375353763537735378353793538035381353823538335384353853538635387353883538935390353913539235393353943539535396353973539835399354003540135402354033540435405354063540735408354093541035411354123541335414354153541635417354183541935420354213542235423354243542535426354273542835429354303543135432354333543435435354363543735438354393544035441354423544335444354453544635447354483544935450354513545235453354543545535456354573545835459354603546135462354633546435465354663546735468354693547035471354723547335474354753547635477354783547935480354813548235483354843548535486354873548835489354903549135492354933549435495354963549735498354993550035501355023550335504355053550635507355083550935510355113551235513355143551535516355173551835519355203552135522355233552435525355263552735528355293553035531355323553335534355353553635537355383553935540355413554235543355443554535546355473554835549355503555135552355533555435555355563555735558355593556035561355623556335564355653556635567355683556935570355713557235573355743557535576355773557835579355803558135582355833558435585355863558735588355893559035591355923559335594355953559635597355983559935600356013560235603356043560535606356073560835609356103561135612356133561435615356163561735618356193562035621356223562335624356253562635627356283562935630356313563235633356343563535636356373563835639356403564135642356433564435645356463564735648356493565035651356523565335654356553565635657356583565935660356613566235663356643566535666356673566835669356703567135672356733567435675356763567735678356793568035681356823568335684356853568635687356883568935690356913569235693356943569535696356973569835699357003570135702357033570435705357063570735708357093571035711357123571335714357153571635717357183571935720357213572235723357243572535726357273572835729357303573135732357333573435735357363573735738357393574035741357423574335744357453574635747357483574935750357513575235753357543575535756357573575835759357603576135762357633576435765357663576735768357693577035771357723577335774357753577635777357783577935780357813578235783357843578535786357873578835789357903579135792357933579435795357963579735798357993580035801358023580335804358053580635807358083580935810358113581235813358143581535816358173581835819358203582135822358233582435825358263582735828358293583035831358323583335834358353583635837358383583935840358413584235843358443584535846358473584835849358503585135852358533585435855358563585735858358593586035861358623586335864358653586635867358683586935870358713587235873358743587535876358773587835879358803588135882358833588435885358863588735888358893589035891358923589335894358953589635897358983589935900359013590235903359043590535906359073590835909359103591135912359133591435915359163591735918359193592035921359223592335924359253592635927359283592935930359313593235933359343593535936359373593835939359403594135942359433594435945359463594735948359493595035951359523595335954359553595635957359583595935960359613596235963359643596535966359673596835969359703597135972359733597435975359763597735978359793598035981359823598335984359853598635987359883598935990359913599235993359943599535996359973599835999360003600136002360033600436005360063600736008360093601036011360123601336014360153601636017360183601936020360213602236023360243602536026360273602836029360303603136032360333603436035360363603736038360393604036041360423604336044360453604636047360483604936050360513605236053360543605536056360573605836059360603606136062360633606436065360663606736068360693607036071360723607336074360753607636077360783607936080360813608236083360843608536086360873608836089360903609136092360933609436095360963609736098360993610036101361023610336104361053610636107361083610936110361113611236113361143611536116361173611836119361203612136122361233612436125361263612736128361293613036131361323613336134361353613636137361383613936140361413614236143361443614536146361473614836149361503615136152361533615436155361563615736158361593616036161361623616336164361653616636167361683616936170361713617236173361743617536176361773617836179361803618136182361833618436185361863618736188361893619036191361923619336194361953619636197361983619936200362013620236203362043620536206362073620836209362103621136212362133621436215362163621736218362193622036221362223622336224362253622636227362283622936230362313623236233362343623536236362373623836239362403624136242362433624436245362463624736248362493625036251362523625336254362553625636257362583625936260362613626236263362643626536266362673626836269362703627136272362733627436275362763627736278362793628036281362823628336284362853628636287362883628936290362913629236293362943629536296362973629836299363003630136302363033630436305363063630736308363093631036311363123631336314363153631636317363183631936320363213632236323363243632536326363273632836329363303633136332363333633436335363363633736338363393634036341363423634336344363453634636347363483634936350363513635236353363543635536356363573635836359363603636136362363633636436365363663636736368363693637036371363723637336374363753637636377363783637936380363813638236383363843638536386363873638836389363903639136392363933639436395363963639736398363993640036401364023640336404364053640636407364083640936410364113641236413364143641536416364173641836419364203642136422364233642436425364263642736428364293643036431364323643336434364353643636437364383643936440364413644236443364443644536446364473644836449364503645136452364533645436455364563645736458364593646036461364623646336464364653646636467364683646936470364713647236473364743647536476364773647836479364803648136482364833648436485364863648736488364893649036491364923649336494364953649636497364983649936500365013650236503365043650536506365073650836509365103651136512365133651436515365163651736518365193652036521365223652336524365253652636527365283652936530365313653236533365343653536536365373653836539365403654136542365433654436545365463654736548365493655036551365523655336554365553655636557365583655936560365613656236563365643656536566365673656836569365703657136572365733657436575365763657736578365793658036581365823658336584365853658636587365883658936590365913659236593365943659536596365973659836599366003660136602366033660436605366063660736608366093661036611366123661336614366153661636617366183661936620366213662236623366243662536626366273662836629366303663136632366333663436635366363663736638366393664036641366423664336644366453664636647366483664936650366513665236653366543665536656366573665836659366603666136662366633666436665366663666736668366693667036671366723667336674366753667636677366783667936680366813668236683366843668536686366873668836689366903669136692366933669436695366963669736698366993670036701367023670336704367053670636707367083670936710367113671236713367143671536716367173671836719367203672136722367233672436725367263672736728367293673036731367323673336734367353673636737367383673936740367413674236743367443674536746367473674836749367503675136752367533675436755367563675736758367593676036761367623676336764367653676636767367683676936770367713677236773367743677536776367773677836779367803678136782367833678436785367863678736788367893679036791367923679336794367953679636797367983679936800368013680236803368043680536806368073680836809368103681136812368133681436815368163681736818368193682036821368223682336824368253682636827368283682936830368313683236833368343683536836368373683836839368403684136842368433684436845368463684736848368493685036851368523685336854368553685636857368583685936860368613686236863368643686536866368673686836869368703687136872368733687436875368763687736878368793688036881368823688336884368853688636887368883688936890368913689236893368943689536896368973689836899369003690136902369033690436905369063690736908369093691036911369123691336914369153691636917369183691936920369213692236923369243692536926369273692836929369303693136932369333693436935369363693736938369393694036941369423694336944369453694636947369483694936950369513695236953369543695536956369573695836959369603696136962369633696436965369663696736968369693697036971369723697336974369753697636977369783697936980369813698236983369843698536986369873698836989369903699136992369933699436995369963699736998369993700037001370023700337004370053700637007370083700937010370113701237013370143701537016370173701837019370203702137022370233702437025370263702737028370293703037031370323703337034370353703637037370383703937040370413704237043370443704537046370473704837049370503705137052370533705437055370563705737058370593706037061370623706337064370653706637067370683706937070370713707237073370743707537076370773707837079370803708137082370833708437085370863708737088370893709037091370923709337094370953709637097370983709937100371013710237103371043710537106371073710837109371103711137112371133711437115371163711737118371193712037121371223712337124371253712637127371283712937130371313713237133371343713537136371373713837139371403714137142371433714437145371463714737148371493715037151371523715337154371553715637157371583715937160371613716237163371643716537166371673716837169371703717137172371733717437175371763717737178371793718037181371823718337184371853718637187371883718937190371913719237193371943719537196371973719837199372003720137202372033720437205372063720737208372093721037211372123721337214372153721637217372183721937220372213722237223372243722537226372273722837229372303723137232372333723437235372363723737238372393724037241372423724337244372453724637247372483724937250372513725237253372543725537256372573725837259372603726137262372633726437265372663726737268372693727037271372723727337274372753727637277372783727937280372813728237283372843728537286372873728837289372903729137292372933729437295372963729737298372993730037301373023730337304373053730637307373083730937310373113731237313373143731537316373173731837319373203732137322373233732437325373263732737328373293733037331373323733337334373353733637337373383733937340373413734237343373443734537346373473734837349373503735137352373533735437355373563735737358373593736037361373623736337364373653736637367373683736937370373713737237373373743737537376373773737837379373803738137382373833738437385373863738737388373893739037391373923739337394373953739637397373983739937400374013740237403374043740537406374073740837409374103741137412374133741437415374163741737418374193742037421374223742337424374253742637427374283742937430374313743237433374343743537436374373743837439374403744137442374433744437445374463744737448374493745037451374523745337454374553745637457374583745937460374613746237463374643746537466374673746837469374703747137472374733747437475374763747737478374793748037481374823748337484374853748637487374883748937490374913749237493374943749537496374973749837499375003750137502375033750437505375063750737508375093751037511375123751337514375153751637517375183751937520375213752237523375243752537526375273752837529375303753137532375333753437535375363753737538375393754037541375423754337544375453754637547375483754937550375513755237553375543755537556375573755837559375603756137562375633756437565375663756737568375693757037571375723757337574375753757637577375783757937580375813758237583375843758537586375873758837589375903759137592375933759437595375963759737598375993760037601376023760337604376053760637607376083760937610376113761237613376143761537616376173761837619376203762137622376233762437625376263762737628376293763037631376323763337634376353763637637376383763937640376413764237643376443764537646376473764837649376503765137652376533765437655376563765737658376593766037661376623766337664376653766637667376683766937670376713767237673376743767537676376773767837679376803768137682376833768437685376863768737688376893769037691376923769337694376953769637697376983769937700377013770237703377043770537706377073770837709377103771137712377133771437715377163771737718377193772037721377223772337724377253772637727377283772937730377313773237733377343773537736377373773837739377403774137742377433774437745377463774737748377493775037751377523775337754377553775637757377583775937760377613776237763377643776537766377673776837769377703777137772377733777437775377763777737778377793778037781377823778337784377853778637787377883778937790377913779237793377943779537796377973779837799378003780137802378033780437805378063780737808378093781037811378123781337814378153781637817378183781937820378213782237823378243782537826378273782837829378303783137832378333783437835378363783737838378393784037841378423784337844378453784637847378483784937850378513785237853378543785537856378573785837859378603786137862378633786437865378663786737868378693787037871378723787337874378753787637877378783787937880378813788237883378843788537886378873788837889378903789137892378933789437895378963789737898378993790037901379023790337904379053790637907379083790937910379113791237913379143791537916379173791837919379203792137922379233792437925379263792737928379293793037931379323793337934379353793637937379383793937940379413794237943
  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/Control.Apply/foreign.js":[function(require,module,exports) {
  169. "use strict";
  170. exports.arrayApply = function (fs) {
  171. return function (xs) {
  172. var l = fs.length;
  173. var k = xs.length;
  174. var result = new Array(l * k);
  175. var n = 0;
  176. for (var i = 0; i < l; i++) {
  177. var f = fs[i];
  178. for (var j = 0; j < k; j++) {
  179. result[n++] = f(xs[j]);
  180. }
  181. }
  182. return result;
  183. };
  184. };
  185. },{}],"../output/Control.Semigroupoid/index.js":[function(require,module,exports) {
  186. // Generated by purs version 0.13.6
  187. "use strict";
  188. var Semigroupoid = function Semigroupoid(compose) {
  189. this.compose = compose;
  190. };
  191. var semigroupoidFn = new Semigroupoid(function (f) {
  192. return function (g) {
  193. return function (x) {
  194. return f(g(x));
  195. };
  196. };
  197. });
  198. var compose = function compose(dict) {
  199. return dict.compose;
  200. };
  201. var composeFlipped = function composeFlipped(dictSemigroupoid) {
  202. return function (f) {
  203. return function (g) {
  204. return compose(dictSemigroupoid)(g)(f);
  205. };
  206. };
  207. };
  208. module.exports = {
  209. compose: compose,
  210. Semigroupoid: Semigroupoid,
  211. composeFlipped: composeFlipped,
  212. semigroupoidFn: semigroupoidFn
  213. };
  214. },{}],"../output/Control.Category/index.js":[function(require,module,exports) {
  215. // Generated by purs version 0.13.6
  216. "use strict";
  217. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  218. var Category = function Category(Semigroupoid0, identity) {
  219. this.Semigroupoid0 = Semigroupoid0;
  220. this.identity = identity;
  221. };
  222. var identity = function identity(dict) {
  223. return dict.identity;
  224. };
  225. var categoryFn = new Category(function () {
  226. return Control_Semigroupoid.semigroupoidFn;
  227. }, function (x) {
  228. return x;
  229. });
  230. module.exports = {
  231. Category: Category,
  232. identity: identity,
  233. categoryFn: categoryFn
  234. };
  235. },{"../Control.Semigroupoid/index.js":"../output/Control.Semigroupoid/index.js"}],"../output/Data.Boolean/index.js":[function(require,module,exports) {
  236. // Generated by purs version 0.13.6
  237. "use strict";
  238. var otherwise = true;
  239. module.exports = {
  240. otherwise: otherwise
  241. };
  242. },{}],"../output/Data.Function/index.js":[function(require,module,exports) {
  243. // Generated by purs version 0.13.6
  244. "use strict";
  245. var Data_Boolean = require("../Data.Boolean/index.js");
  246. var on = function on(f) {
  247. return function (g) {
  248. return function (x) {
  249. return function (y) {
  250. return f(g(x))(g(y));
  251. };
  252. };
  253. };
  254. };
  255. var flip = function flip(f) {
  256. return function (b) {
  257. return function (a) {
  258. return f(a)(b);
  259. };
  260. };
  261. };
  262. var $$const = function $$const(a) {
  263. return function (v) {
  264. return a;
  265. };
  266. };
  267. var applyN = function applyN(f) {
  268. var go = function go($copy_n) {
  269. return function ($copy_acc) {
  270. var $tco_var_n = $copy_n;
  271. var $tco_done = false;
  272. var $tco_result;
  273. function $tco_loop(n, acc) {
  274. if (n <= 0) {
  275. $tco_done = true;
  276. return acc;
  277. }
  278. ;
  279. if (Data_Boolean.otherwise) {
  280. $tco_var_n = n - 1 | 0;
  281. $copy_acc = f(acc);
  282. return;
  283. }
  284. ;
  285. throw new Error("Failed pattern match at Data.Function (line 94, column 3 - line 96, column 37): " + [n.constructor.name, acc.constructor.name]);
  286. }
  287. ;
  288. while (!$tco_done) {
  289. $tco_result = $tco_loop($tco_var_n, $copy_acc);
  290. }
  291. ;
  292. return $tco_result;
  293. };
  294. };
  295. return go;
  296. };
  297. var applyFlipped = function applyFlipped(x) {
  298. return function (f) {
  299. return f(x);
  300. };
  301. };
  302. var apply = function apply(f) {
  303. return function (x) {
  304. return f(x);
  305. };
  306. };
  307. module.exports = {
  308. flip: flip,
  309. "const": $$const,
  310. apply: apply,
  311. applyFlipped: applyFlipped,
  312. applyN: applyN,
  313. on: on
  314. };
  315. },{"../Data.Boolean/index.js":"../output/Data.Boolean/index.js"}],"../output/Data.Functor/foreign.js":[function(require,module,exports) {
  316. "use strict";
  317. exports.arrayMap = function (f) {
  318. return function (arr) {
  319. var l = arr.length;
  320. var result = new Array(l);
  321. for (var i = 0; i < l; i++) {
  322. result[i] = f(arr[i]);
  323. }
  324. return result;
  325. };
  326. };
  327. },{}],"../output/Data.Unit/foreign.js":[function(require,module,exports) {
  328. "use strict";
  329. exports.unit = {};
  330. },{}],"../output/Data.Show/foreign.js":[function(require,module,exports) {
  331. "use strict";
  332. exports.showIntImpl = function (n) {
  333. return n.toString();
  334. };
  335. exports.showNumberImpl = function (n) {
  336. var str = n.toString();
  337. return isNaN(str + ".0") ? str : str + ".0";
  338. };
  339. exports.showCharImpl = function (c) {
  340. var code = c.charCodeAt(0);
  341. if (code < 0x20 || code === 0x7F) {
  342. switch (c) {
  343. case "\x07":
  344. return "'\\a'";
  345. case "\b":
  346. return "'\\b'";
  347. case "\f":
  348. return "'\\f'";
  349. case "\n":
  350. return "'\\n'";
  351. case "\r":
  352. return "'\\r'";
  353. case "\t":
  354. return "'\\t'";
  355. case "\v":
  356. return "'\\v'";
  357. }
  358. return "'\\" + code.toString(10) + "'";
  359. }
  360. return c === "'" || c === "\\" ? "'\\" + c + "'" : "'" + c + "'";
  361. };
  362. exports.showStringImpl = function (s) {
  363. var l = s.length;
  364. return "\"" + s.replace(/[\0-\x1F\x7F"\\]/g, // eslint-disable-line no-control-regex
  365. function (c, i) {
  366. switch (c) {
  367. case "\"":
  368. case "\\":
  369. return "\\" + c;
  370. case "\x07":
  371. return "\\a";
  372. case "\b":
  373. return "\\b";
  374. case "\f":
  375. return "\\f";
  376. case "\n":
  377. return "\\n";
  378. case "\r":
  379. return "\\r";
  380. case "\t":
  381. return "\\t";
  382. case "\v":
  383. return "\\v";
  384. }
  385. var k = i + 1;
  386. var empty = k < l && s[k] >= "0" && s[k] <= "9" ? "\\&" : "";
  387. return "\\" + c.charCodeAt(0).toString(10) + empty;
  388. }) + "\"";
  389. };
  390. exports.showArrayImpl = function (f) {
  391. return function (xs) {
  392. var ss = [];
  393. for (var i = 0, l = xs.length; i < l; i++) {
  394. ss[i] = f(xs[i]);
  395. }
  396. return "[" + ss.join(",") + "]";
  397. };
  398. };
  399. exports.cons = function (head) {
  400. return function (tail) {
  401. return [head].concat(tail);
  402. };
  403. };
  404. exports.join = function (separator) {
  405. return function (xs) {
  406. return xs.join(separator);
  407. };
  408. };
  409. },{}],"../output/Data.Symbol/foreign.js":[function(require,module,exports) {
  410. "use strict"; // module Data.Symbol
  411. exports.unsafeCoerce = function (arg) {
  412. return arg;
  413. };
  414. },{}],"../output/Data.Symbol/index.js":[function(require,module,exports) {
  415. // Generated by purs version 0.13.6
  416. "use strict";
  417. var $foreign = require("./foreign.js");
  418. var SProxy = function () {
  419. function SProxy() {}
  420. ;
  421. SProxy.value = new SProxy();
  422. return SProxy;
  423. }();
  424. var IsSymbol = function IsSymbol(reflectSymbol) {
  425. this.reflectSymbol = reflectSymbol;
  426. };
  427. var reifySymbol = function reifySymbol(s) {
  428. return function (f) {
  429. return $foreign.unsafeCoerce(function (dictIsSymbol) {
  430. return f(dictIsSymbol);
  431. })({
  432. reflectSymbol: function reflectSymbol(v) {
  433. return s;
  434. }
  435. })(SProxy.value);
  436. };
  437. };
  438. var reflectSymbol = function reflectSymbol(dict) {
  439. return dict.reflectSymbol;
  440. };
  441. module.exports = {
  442. IsSymbol: IsSymbol,
  443. reflectSymbol: reflectSymbol,
  444. reifySymbol: reifySymbol,
  445. SProxy: SProxy
  446. };
  447. },{"./foreign.js":"../output/Data.Symbol/foreign.js"}],"../output/Record.Unsafe/foreign.js":[function(require,module,exports) {
  448. "use strict";
  449. exports.unsafeHas = function (label) {
  450. return function (rec) {
  451. return {}.hasOwnProperty.call(rec, label);
  452. };
  453. };
  454. exports.unsafeGet = function (label) {
  455. return function (rec) {
  456. return rec[label];
  457. };
  458. };
  459. exports.unsafeSet = function (label) {
  460. return function (value) {
  461. return function (rec) {
  462. var copy = {};
  463. for (var key in rec) {
  464. if ({}.hasOwnProperty.call(rec, key)) {
  465. copy[key] = rec[key];
  466. }
  467. }
  468. copy[label] = value;
  469. return copy;
  470. };
  471. };
  472. };
  473. exports.unsafeDelete = function (label) {
  474. return function (rec) {
  475. var copy = {};
  476. for (var key in rec) {
  477. if (key !== label && {}.hasOwnProperty.call(rec, key)) {
  478. copy[key] = rec[key];
  479. }
  480. }
  481. return copy;
  482. };
  483. };
  484. },{}],"../output/Record.Unsafe/index.js":[function(require,module,exports) {
  485. // Generated by purs version 0.13.6
  486. "use strict";
  487. var $foreign = require("./foreign.js");
  488. module.exports = {
  489. unsafeHas: $foreign.unsafeHas,
  490. unsafeGet: $foreign.unsafeGet,
  491. unsafeSet: $foreign.unsafeSet,
  492. unsafeDelete: $foreign.unsafeDelete
  493. };
  494. },{"./foreign.js":"../output/Record.Unsafe/foreign.js"}],"../output/Type.Data.RowList/index.js":[function(require,module,exports) {
  495. // Generated by purs version 0.13.6
  496. "use strict";
  497. var RLProxy = function () {
  498. function RLProxy() {}
  499. ;
  500. RLProxy.value = new RLProxy();
  501. return RLProxy;
  502. }();
  503. module.exports = {
  504. RLProxy: RLProxy
  505. };
  506. },{}],"../output/Data.Show/index.js":[function(require,module,exports) {
  507. // Generated by purs version 0.13.6
  508. "use strict";
  509. var $foreign = require("./foreign.js");
  510. var Data_Symbol = require("../Data.Symbol/index.js");
  511. var Record_Unsafe = require("../Record.Unsafe/index.js");
  512. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  513. var ShowRecordFields = function ShowRecordFields(showRecordFields) {
  514. this.showRecordFields = showRecordFields;
  515. };
  516. var Show = function Show(show) {
  517. this.show = show;
  518. };
  519. var showString = new Show($foreign.showStringImpl);
  520. var showRecordFieldsNil = new ShowRecordFields(function (v) {
  521. return function (v1) {
  522. return [];
  523. };
  524. });
  525. var showRecordFields = function showRecordFields(dict) {
  526. return dict.showRecordFields;
  527. };
  528. var showRecord = function showRecord(dictRowToList) {
  529. return function (dictShowRecordFields) {
  530. return new Show(function (record) {
  531. var v = showRecordFields(dictShowRecordFields)(Type_Data_RowList.RLProxy.value)(record);
  532. if (v.length === 0) {
  533. return "{}";
  534. }
  535. ;
  536. return $foreign.join(" ")(["{", $foreign.join(", ")(v), "}"]);
  537. });
  538. };
  539. };
  540. var showNumber = new Show($foreign.showNumberImpl);
  541. var showInt = new Show($foreign.showIntImpl);
  542. var showChar = new Show($foreign.showCharImpl);
  543. var showBoolean = new Show(function (v) {
  544. if (v) {
  545. return "true";
  546. }
  547. ;
  548. if (!v) {
  549. return "false";
  550. }
  551. ;
  552. throw new Error("Failed pattern match at Data.Show (line 20, column 1 - line 22, column 23): " + [v.constructor.name]);
  553. });
  554. var show = function show(dict) {
  555. return dict.show;
  556. };
  557. var showArray = function showArray(dictShow) {
  558. return new Show($foreign.showArrayImpl(show(dictShow)));
  559. };
  560. var showRecordFieldsCons = function showRecordFieldsCons(dictIsSymbol) {
  561. return function (dictShowRecordFields) {
  562. return function (dictShow) {
  563. return new ShowRecordFields(function (v) {
  564. return function (record) {
  565. var tail = showRecordFields(dictShowRecordFields)(Type_Data_RowList.RLProxy.value)(record);
  566. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  567. var focus = Record_Unsafe.unsafeGet(key)(record);
  568. return $foreign.cons($foreign.join(": ")([key, show(dictShow)(focus)]))(tail);
  569. };
  570. });
  571. };
  572. };
  573. };
  574. module.exports = {
  575. Show: Show,
  576. show: show,
  577. ShowRecordFields: ShowRecordFields,
  578. showRecordFields: showRecordFields,
  579. showBoolean: showBoolean,
  580. showInt: showInt,
  581. showNumber: showNumber,
  582. showChar: showChar,
  583. showString: showString,
  584. showArray: showArray,
  585. showRecord: showRecord,
  586. showRecordFieldsNil: showRecordFieldsNil,
  587. showRecordFieldsCons: showRecordFieldsCons
  588. };
  589. },{"./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) {
  590. // Generated by purs version 0.13.6
  591. "use strict";
  592. var $foreign = require("./foreign.js");
  593. var Data_Show = require("../Data.Show/index.js");
  594. var showUnit = new Data_Show.Show(function (v) {
  595. return "unit";
  596. });
  597. module.exports = {
  598. showUnit: showUnit,
  599. unit: $foreign.unit
  600. };
  601. },{"./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) {
  602. // Generated by purs version 0.13.6
  603. "use strict";
  604. var $foreign = require("./foreign.js");
  605. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  606. var Data_Function = require("../Data.Function/index.js");
  607. var Data_Unit = require("../Data.Unit/index.js");
  608. var Functor = function Functor(map) {
  609. this.map = map;
  610. };
  611. var map = function map(dict) {
  612. return dict.map;
  613. };
  614. var mapFlipped = function mapFlipped(dictFunctor) {
  615. return function (fa) {
  616. return function (f) {
  617. return map(dictFunctor)(f)(fa);
  618. };
  619. };
  620. };
  621. var $$void = function $$void(dictFunctor) {
  622. return map(dictFunctor)(Data_Function["const"](Data_Unit.unit));
  623. };
  624. var voidLeft = function voidLeft(dictFunctor) {
  625. return function (f) {
  626. return function (x) {
  627. return map(dictFunctor)(Data_Function["const"](x))(f);
  628. };
  629. };
  630. };
  631. var voidRight = function voidRight(dictFunctor) {
  632. return function (x) {
  633. return map(dictFunctor)(Data_Function["const"](x));
  634. };
  635. };
  636. var functorFn = new Functor(Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn));
  637. var functorArray = new Functor($foreign.arrayMap);
  638. var flap = function flap(dictFunctor) {
  639. return function (ff) {
  640. return function (x) {
  641. return map(dictFunctor)(function (f) {
  642. return f(x);
  643. })(ff);
  644. };
  645. };
  646. };
  647. module.exports = {
  648. Functor: Functor,
  649. map: map,
  650. mapFlipped: mapFlipped,
  651. "void": $$void,
  652. voidRight: voidRight,
  653. voidLeft: voidLeft,
  654. flap: flap,
  655. functorFn: functorFn,
  656. functorArray: functorArray
  657. };
  658. },{"./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/Control.Apply/index.js":[function(require,module,exports) {
  659. // Generated by purs version 0.13.6
  660. "use strict";
  661. var $foreign = require("./foreign.js");
  662. var Control_Category = require("../Control.Category/index.js");
  663. var Data_Function = require("../Data.Function/index.js");
  664. var Data_Functor = require("../Data.Functor/index.js");
  665. var Apply = function Apply(Functor0, apply) {
  666. this.Functor0 = Functor0;
  667. this.apply = apply;
  668. };
  669. var applyFn = new Apply(function () {
  670. return Data_Functor.functorFn;
  671. }, function (f) {
  672. return function (g) {
  673. return function (x) {
  674. return f(x)(g(x));
  675. };
  676. };
  677. });
  678. var applyArray = new Apply(function () {
  679. return Data_Functor.functorArray;
  680. }, $foreign.arrayApply);
  681. var apply = function apply(dict) {
  682. return dict.apply;
  683. };
  684. var applyFirst = function applyFirst(dictApply) {
  685. return function (a) {
  686. return function (b) {
  687. return apply(dictApply)(Data_Functor.map(dictApply.Functor0())(Data_Function["const"])(a))(b);
  688. };
  689. };
  690. };
  691. var applySecond = function applySecond(dictApply) {
  692. return function (a) {
  693. return function (b) {
  694. return apply(dictApply)(Data_Functor.map(dictApply.Functor0())(Data_Function["const"](Control_Category.identity(Control_Category.categoryFn)))(a))(b);
  695. };
  696. };
  697. };
  698. var lift2 = function lift2(dictApply) {
  699. return function (f) {
  700. return function (a) {
  701. return function (b) {
  702. return apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b);
  703. };
  704. };
  705. };
  706. };
  707. var lift3 = function lift3(dictApply) {
  708. return function (f) {
  709. return function (a) {
  710. return function (b) {
  711. return function (c) {
  712. return apply(dictApply)(apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b))(c);
  713. };
  714. };
  715. };
  716. };
  717. };
  718. var lift4 = function lift4(dictApply) {
  719. return function (f) {
  720. return function (a) {
  721. return function (b) {
  722. return function (c) {
  723. return function (d) {
  724. return apply(dictApply)(apply(dictApply)(apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b))(c))(d);
  725. };
  726. };
  727. };
  728. };
  729. };
  730. };
  731. var lift5 = function lift5(dictApply) {
  732. return function (f) {
  733. return function (a) {
  734. return function (b) {
  735. return function (c) {
  736. return function (d) {
  737. return function (e) {
  738. return apply(dictApply)(apply(dictApply)(apply(dictApply)(apply(dictApply)(Data_Functor.map(dictApply.Functor0())(f)(a))(b))(c))(d))(e);
  739. };
  740. };
  741. };
  742. };
  743. };
  744. };
  745. };
  746. module.exports = {
  747. Apply: Apply,
  748. apply: apply,
  749. applyFirst: applyFirst,
  750. applySecond: applySecond,
  751. lift2: lift2,
  752. lift3: lift3,
  753. lift4: lift4,
  754. lift5: lift5,
  755. applyFn: applyFn,
  756. applyArray: applyArray
  757. };
  758. },{"./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) {
  759. // Generated by purs version 0.13.6
  760. "use strict";
  761. var Control_Apply = require("../Control.Apply/index.js");
  762. var Data_Unit = require("../Data.Unit/index.js");
  763. var Applicative = function Applicative(Apply0, pure) {
  764. this.Apply0 = Apply0;
  765. this.pure = pure;
  766. };
  767. var pure = function pure(dict) {
  768. return dict.pure;
  769. };
  770. var unless = function unless(dictApplicative) {
  771. return function (v) {
  772. return function (v1) {
  773. if (!v) {
  774. return v1;
  775. }
  776. ;
  777. if (v) {
  778. return pure(dictApplicative)(Data_Unit.unit);
  779. }
  780. ;
  781. throw new Error("Failed pattern match at Control.Applicative (line 62, column 1 - line 62, column 65): " + [v.constructor.name, v1.constructor.name]);
  782. };
  783. };
  784. };
  785. var when = function when(dictApplicative) {
  786. return function (v) {
  787. return function (v1) {
  788. if (v) {
  789. return v1;
  790. }
  791. ;
  792. if (!v) {
  793. return pure(dictApplicative)(Data_Unit.unit);
  794. }
  795. ;
  796. throw new Error("Failed pattern match at Control.Applicative (line 57, column 1 - line 57, column 63): " + [v.constructor.name, v1.constructor.name]);
  797. };
  798. };
  799. };
  800. var liftA1 = function liftA1(dictApplicative) {
  801. return function (f) {
  802. return function (a) {
  803. return Control_Apply.apply(dictApplicative.Apply0())(pure(dictApplicative)(f))(a);
  804. };
  805. };
  806. };
  807. var applicativeFn = new Applicative(function () {
  808. return Control_Apply.applyFn;
  809. }, function (x) {
  810. return function (v) {
  811. return x;
  812. };
  813. });
  814. var applicativeArray = new Applicative(function () {
  815. return Control_Apply.applyArray;
  816. }, function (x) {
  817. return [x];
  818. });
  819. module.exports = {
  820. Applicative: Applicative,
  821. pure: pure,
  822. liftA1: liftA1,
  823. unless: unless,
  824. when: when,
  825. applicativeFn: applicativeFn,
  826. applicativeArray: applicativeArray
  827. };
  828. },{"../Control.Apply/index.js":"../output/Control.Apply/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.Semigroup/foreign.js":[function(require,module,exports) {
  829. "use strict";
  830. exports.concatString = function (s1) {
  831. return function (s2) {
  832. return s1 + s2;
  833. };
  834. };
  835. exports.concatArray = function (xs) {
  836. return function (ys) {
  837. if (xs.length === 0) return ys;
  838. if (ys.length === 0) return xs;
  839. return xs.concat(ys);
  840. };
  841. };
  842. },{}],"../output/Data.Void/index.js":[function(require,module,exports) {
  843. // Generated by purs version 0.13.6
  844. "use strict";
  845. var Data_Show = require("../Data.Show/index.js");
  846. var Void = function Void(x) {
  847. return x;
  848. };
  849. var absurd = function absurd(a) {
  850. var spin = function spin($copy_v) {
  851. var $tco_result;
  852. function $tco_loop(v) {
  853. $copy_v = v;
  854. return;
  855. }
  856. ;
  857. while (!false) {
  858. $tco_result = $tco_loop($copy_v);
  859. }
  860. ;
  861. return $tco_result;
  862. };
  863. return spin(a);
  864. };
  865. var showVoid = new Data_Show.Show(absurd);
  866. module.exports = {
  867. absurd: absurd,
  868. showVoid: showVoid
  869. };
  870. },{"../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Data.Semigroup/index.js":[function(require,module,exports) {
  871. // Generated by purs version 0.13.6
  872. "use strict";
  873. var $foreign = require("./foreign.js");
  874. var Data_Symbol = require("../Data.Symbol/index.js");
  875. var Data_Unit = require("../Data.Unit/index.js");
  876. var Data_Void = require("../Data.Void/index.js");
  877. var Record_Unsafe = require("../Record.Unsafe/index.js");
  878. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  879. var SemigroupRecord = function SemigroupRecord(appendRecord) {
  880. this.appendRecord = appendRecord;
  881. };
  882. var Semigroup = function Semigroup(append) {
  883. this.append = append;
  884. };
  885. var semigroupVoid = new Semigroup(function (v) {
  886. return Data_Void.absurd;
  887. });
  888. var semigroupUnit = new Semigroup(function (v) {
  889. return function (v1) {
  890. return Data_Unit.unit;
  891. };
  892. });
  893. var semigroupString = new Semigroup($foreign.concatString);
  894. var semigroupRecordNil = new SemigroupRecord(function (v) {
  895. return function (v1) {
  896. return function (v2) {
  897. return {};
  898. };
  899. };
  900. });
  901. var semigroupArray = new Semigroup($foreign.concatArray);
  902. var appendRecord = function appendRecord(dict) {
  903. return dict.appendRecord;
  904. };
  905. var semigroupRecord = function semigroupRecord(dictRowToList) {
  906. return function (dictSemigroupRecord) {
  907. return new Semigroup(appendRecord(dictSemigroupRecord)(Type_Data_RowList.RLProxy.value));
  908. };
  909. };
  910. var append = function append(dict) {
  911. return dict.append;
  912. };
  913. var semigroupFn = function semigroupFn(dictSemigroup) {
  914. return new Semigroup(function (f) {
  915. return function (g) {
  916. return function (x) {
  917. return append(dictSemigroup)(f(x))(g(x));
  918. };
  919. };
  920. });
  921. };
  922. var semigroupRecordCons = function semigroupRecordCons(dictIsSymbol) {
  923. return function (dictCons) {
  924. return function (dictSemigroupRecord) {
  925. return function (dictSemigroup) {
  926. return new SemigroupRecord(function (v) {
  927. return function (ra) {
  928. return function (rb) {
  929. var tail = appendRecord(dictSemigroupRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  930. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  931. var insert = Record_Unsafe.unsafeSet(key);
  932. var get = Record_Unsafe.unsafeGet(key);
  933. return insert(append(dictSemigroup)(get(ra))(get(rb)))(tail);
  934. };
  935. };
  936. });
  937. };
  938. };
  939. };
  940. };
  941. module.exports = {
  942. Semigroup: Semigroup,
  943. append: append,
  944. SemigroupRecord: SemigroupRecord,
  945. appendRecord: appendRecord,
  946. semigroupString: semigroupString,
  947. semigroupUnit: semigroupUnit,
  948. semigroupVoid: semigroupVoid,
  949. semigroupFn: semigroupFn,
  950. semigroupArray: semigroupArray,
  951. semigroupRecord: semigroupRecord,
  952. semigroupRecordNil: semigroupRecordNil,
  953. semigroupRecordCons: semigroupRecordCons
  954. };
  955. },{"./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) {
  956. // Generated by purs version 0.13.6
  957. "use strict";
  958. var Data_Functor = require("../Data.Functor/index.js");
  959. var Data_Semigroup = require("../Data.Semigroup/index.js");
  960. var Alt = function Alt(Functor0, alt) {
  961. this.Functor0 = Functor0;
  962. this.alt = alt;
  963. };
  964. var altArray = new Alt(function () {
  965. return Data_Functor.functorArray;
  966. }, Data_Semigroup.append(Data_Semigroup.semigroupArray));
  967. var alt = function alt(dict) {
  968. return dict.alt;
  969. };
  970. module.exports = {
  971. Alt: Alt,
  972. alt: alt,
  973. altArray: altArray
  974. };
  975. },{"../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Semigroup/index.js":"../output/Data.Semigroup/index.js"}],"../output/Control.Plus/index.js":[function(require,module,exports) {
  976. // Generated by purs version 0.13.6
  977. "use strict";
  978. var Control_Alt = require("../Control.Alt/index.js");
  979. var Plus = function Plus(Alt0, empty) {
  980. this.Alt0 = Alt0;
  981. this.empty = empty;
  982. };
  983. var plusArray = new Plus(function () {
  984. return Control_Alt.altArray;
  985. }, []);
  986. var empty = function empty(dict) {
  987. return dict.empty;
  988. };
  989. module.exports = {
  990. Plus: Plus,
  991. empty: empty,
  992. plusArray: plusArray
  993. };
  994. },{"../Control.Alt/index.js":"../output/Control.Alt/index.js"}],"../output/Control.Alternative/index.js":[function(require,module,exports) {
  995. // Generated by purs version 0.13.6
  996. "use strict";
  997. var Control_Applicative = require("../Control.Applicative/index.js");
  998. var Control_Plus = require("../Control.Plus/index.js");
  999. var Alternative = function Alternative(Applicative0, Plus1) {
  1000. this.Applicative0 = Applicative0;
  1001. this.Plus1 = Plus1;
  1002. };
  1003. var alternativeArray = new Alternative(function () {
  1004. return Control_Applicative.applicativeArray;
  1005. }, function () {
  1006. return Control_Plus.plusArray;
  1007. });
  1008. module.exports = {
  1009. Alternative: Alternative,
  1010. alternativeArray: alternativeArray
  1011. };
  1012. },{"../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) {
  1013. "use strict";
  1014. exports.arrayBind = function (arr) {
  1015. return function (f) {
  1016. var result = [];
  1017. for (var i = 0, l = arr.length; i < l; i++) {
  1018. Array.prototype.push.apply(result, f(arr[i]));
  1019. }
  1020. return result;
  1021. };
  1022. };
  1023. },{}],"../output/Control.Bind/index.js":[function(require,module,exports) {
  1024. // Generated by purs version 0.13.6
  1025. "use strict";
  1026. var $foreign = require("./foreign.js");
  1027. var Control_Apply = require("../Control.Apply/index.js");
  1028. var Control_Category = require("../Control.Category/index.js");
  1029. var Data_Function = require("../Data.Function/index.js");
  1030. var Discard = function Discard(discard) {
  1031. this.discard = discard;
  1032. };
  1033. var Bind = function Bind(Apply0, bind) {
  1034. this.Apply0 = Apply0;
  1035. this.bind = bind;
  1036. };
  1037. var discard = function discard(dict) {
  1038. return dict.discard;
  1039. };
  1040. var bindFn = new Bind(function () {
  1041. return Control_Apply.applyFn;
  1042. }, function (m) {
  1043. return function (f) {
  1044. return function (x) {
  1045. return f(m(x))(x);
  1046. };
  1047. };
  1048. });
  1049. var bindArray = new Bind(function () {
  1050. return Control_Apply.applyArray;
  1051. }, $foreign.arrayBind);
  1052. var bind = function bind(dict) {
  1053. return dict.bind;
  1054. };
  1055. var bindFlipped = function bindFlipped(dictBind) {
  1056. return Data_Function.flip(bind(dictBind));
  1057. };
  1058. var composeKleisliFlipped = function composeKleisliFlipped(dictBind) {
  1059. return function (f) {
  1060. return function (g) {
  1061. return function (a) {
  1062. return bindFlipped(dictBind)(f)(g(a));
  1063. };
  1064. };
  1065. };
  1066. };
  1067. var composeKleisli = function composeKleisli(dictBind) {
  1068. return function (f) {
  1069. return function (g) {
  1070. return function (a) {
  1071. return bind(dictBind)(f(a))(g);
  1072. };
  1073. };
  1074. };
  1075. };
  1076. var discardUnit = new Discard(function (dictBind) {
  1077. return bind(dictBind);
  1078. });
  1079. var ifM = function ifM(dictBind) {
  1080. return function (cond) {
  1081. return function (t) {
  1082. return function (f) {
  1083. return bind(dictBind)(cond)(function (cond$prime) {
  1084. if (cond$prime) {
  1085. return t;
  1086. }
  1087. ;
  1088. return f;
  1089. });
  1090. };
  1091. };
  1092. };
  1093. };
  1094. var join = function join(dictBind) {
  1095. return function (m) {
  1096. return bind(dictBind)(m)(Control_Category.identity(Control_Category.categoryFn));
  1097. };
  1098. };
  1099. module.exports = {
  1100. Bind: Bind,
  1101. bind: bind,
  1102. bindFlipped: bindFlipped,
  1103. Discard: Discard,
  1104. discard: discard,
  1105. join: join,
  1106. composeKleisli: composeKleisli,
  1107. composeKleisliFlipped: composeKleisliFlipped,
  1108. ifM: ifM,
  1109. bindFn: bindFn,
  1110. bindArray: bindArray,
  1111. discardUnit: discardUnit
  1112. };
  1113. },{"./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) {
  1114. // Generated by purs version 0.13.6
  1115. "use strict";
  1116. var Control_Applicative = require("../Control.Applicative/index.js");
  1117. var Control_Bind = require("../Control.Bind/index.js");
  1118. var Monad = function Monad(Applicative0, Bind1) {
  1119. this.Applicative0 = Applicative0;
  1120. this.Bind1 = Bind1;
  1121. };
  1122. var whenM = function whenM(dictMonad) {
  1123. return function (mb) {
  1124. return function (m) {
  1125. return Control_Bind.bind(dictMonad.Bind1())(mb)(function (b) {
  1126. return Control_Applicative.when(dictMonad.Applicative0())(b)(m);
  1127. });
  1128. };
  1129. };
  1130. };
  1131. var unlessM = function unlessM(dictMonad) {
  1132. return function (mb) {
  1133. return function (m) {
  1134. return Control_Bind.bind(dictMonad.Bind1())(mb)(function (b) {
  1135. return Control_Applicative.unless(dictMonad.Applicative0())(b)(m);
  1136. });
  1137. };
  1138. };
  1139. };
  1140. var monadFn = new Monad(function () {
  1141. return Control_Applicative.applicativeFn;
  1142. }, function () {
  1143. return Control_Bind.bindFn;
  1144. });
  1145. var monadArray = new Monad(function () {
  1146. return Control_Applicative.applicativeArray;
  1147. }, function () {
  1148. return Control_Bind.bindArray;
  1149. });
  1150. var liftM1 = function liftM1(dictMonad) {
  1151. return function (f) {
  1152. return function (a) {
  1153. return Control_Bind.bind(dictMonad.Bind1())(a)(function (a$prime) {
  1154. return Control_Applicative.pure(dictMonad.Applicative0())(f(a$prime));
  1155. });
  1156. };
  1157. };
  1158. };
  1159. var ap = function ap(dictMonad) {
  1160. return function (f) {
  1161. return function (a) {
  1162. return Control_Bind.bind(dictMonad.Bind1())(f)(function (f$prime) {
  1163. return Control_Bind.bind(dictMonad.Bind1())(a)(function (a$prime) {
  1164. return Control_Applicative.pure(dictMonad.Applicative0())(f$prime(a$prime));
  1165. });
  1166. });
  1167. };
  1168. };
  1169. };
  1170. module.exports = {
  1171. Monad: Monad,
  1172. liftM1: liftM1,
  1173. ap: ap,
  1174. whenM: whenM,
  1175. unlessM: unlessM,
  1176. monadFn: monadFn,
  1177. monadArray: monadArray
  1178. };
  1179. },{"../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) {
  1180. // Generated by purs version 0.13.6
  1181. "use strict";
  1182. var MonadCont = function MonadCont(Monad0, callCC) {
  1183. this.Monad0 = Monad0;
  1184. this.callCC = callCC;
  1185. };
  1186. var callCC = function callCC(dict) {
  1187. return dict.callCC;
  1188. };
  1189. module.exports = {
  1190. MonadCont: MonadCont,
  1191. callCC: callCC
  1192. };
  1193. },{}],"../output/Control.Extend/foreign.js":[function(require,module,exports) {
  1194. "use strict";
  1195. exports.arrayExtend = function (f) {
  1196. return function (xs) {
  1197. return xs.map(function (_, i, xs) {
  1198. return f(xs.slice(i));
  1199. });
  1200. };
  1201. };
  1202. },{}],"../output/Control.Extend/index.js":[function(require,module,exports) {
  1203. // Generated by purs version 0.13.6
  1204. "use strict";
  1205. var $foreign = require("./foreign.js");
  1206. var Control_Category = require("../Control.Category/index.js");
  1207. var Data_Functor = require("../Data.Functor/index.js");
  1208. var Data_Semigroup = require("../Data.Semigroup/index.js");
  1209. var Extend = function Extend(Functor0, extend) {
  1210. this.Functor0 = Functor0;
  1211. this.extend = extend;
  1212. };
  1213. var extendFn = function extendFn(dictSemigroup) {
  1214. return new Extend(function () {
  1215. return Data_Functor.functorFn;
  1216. }, function (f) {
  1217. return function (g) {
  1218. return function (w) {
  1219. return f(function (w$prime) {
  1220. return g(Data_Semigroup.append(dictSemigroup)(w)(w$prime));
  1221. });
  1222. };
  1223. };
  1224. });
  1225. };
  1226. var extendArray = new Extend(function () {
  1227. return Data_Functor.functorArray;
  1228. }, $foreign.arrayExtend);
  1229. var extend = function extend(dict) {
  1230. return dict.extend;
  1231. };
  1232. var extendFlipped = function extendFlipped(dictExtend) {
  1233. return function (w) {
  1234. return function (f) {
  1235. return extend(dictExtend)(f)(w);
  1236. };
  1237. };
  1238. };
  1239. var duplicate = function duplicate(dictExtend) {
  1240. return extend(dictExtend)(Control_Category.identity(Control_Category.categoryFn));
  1241. };
  1242. var composeCoKleisliFlipped = function composeCoKleisliFlipped(dictExtend) {
  1243. return function (f) {
  1244. return function (g) {
  1245. return function (w) {
  1246. return f(extend(dictExtend)(g)(w));
  1247. };
  1248. };
  1249. };
  1250. };
  1251. var composeCoKleisli = function composeCoKleisli(dictExtend) {
  1252. return function (f) {
  1253. return function (g) {
  1254. return function (w) {
  1255. return g(extend(dictExtend)(f)(w));
  1256. };
  1257. };
  1258. };
  1259. };
  1260. module.exports = {
  1261. Extend: Extend,
  1262. extend: extend,
  1263. extendFlipped: extendFlipped,
  1264. composeCoKleisli: composeCoKleisli,
  1265. composeCoKleisliFlipped: composeCoKleisliFlipped,
  1266. duplicate: duplicate,
  1267. extendFn: extendFn,
  1268. extendArray: extendArray
  1269. };
  1270. },{"./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) {
  1271. "use strict";
  1272. exports.foldrArray = function (f) {
  1273. return function (init) {
  1274. return function (xs) {
  1275. var acc = init;
  1276. var len = xs.length;
  1277. for (var i = len - 1; i >= 0; i--) {
  1278. acc = f(xs[i])(acc);
  1279. }
  1280. return acc;
  1281. };
  1282. };
  1283. };
  1284. exports.foldlArray = function (f) {
  1285. return function (init) {
  1286. return function (xs) {
  1287. var acc = init;
  1288. var len = xs.length;
  1289. for (var i = 0; i < len; i++) {
  1290. acc = f(acc)(xs[i]);
  1291. }
  1292. return acc;
  1293. };
  1294. };
  1295. };
  1296. },{}],"../output/Data.Eq/foreign.js":[function(require,module,exports) {
  1297. "use strict";
  1298. var refEq = function refEq(r1) {
  1299. return function (r2) {
  1300. return r1 === r2;
  1301. };
  1302. };
  1303. exports.eqBooleanImpl = refEq;
  1304. exports.eqIntImpl = refEq;
  1305. exports.eqNumberImpl = refEq;
  1306. exports.eqCharImpl = refEq;
  1307. exports.eqStringImpl = refEq;
  1308. exports.eqArrayImpl = function (f) {
  1309. return function (xs) {
  1310. return function (ys) {
  1311. if (xs === ys) return true;
  1312. if (xs.length !== ys.length) return false;
  1313. for (var i = 0; i < xs.length; i++) {
  1314. if (!f(xs[i])(ys[i])) return false;
  1315. }
  1316. return true;
  1317. };
  1318. };
  1319. };
  1320. },{}],"../output/Data.Eq/index.js":[function(require,module,exports) {
  1321. // Generated by purs version 0.13.6
  1322. "use strict";
  1323. var $foreign = require("./foreign.js");
  1324. var Data_Symbol = require("../Data.Symbol/index.js");
  1325. var Record_Unsafe = require("../Record.Unsafe/index.js");
  1326. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  1327. var EqRecord = function EqRecord(eqRecord) {
  1328. this.eqRecord = eqRecord;
  1329. };
  1330. var Eq1 = function Eq1(eq1) {
  1331. this.eq1 = eq1;
  1332. };
  1333. var Eq = function Eq(eq) {
  1334. this.eq = eq;
  1335. };
  1336. var eqVoid = new Eq(function (v) {
  1337. return function (v1) {
  1338. return true;
  1339. };
  1340. });
  1341. var eqUnit = new Eq(function (v) {
  1342. return function (v1) {
  1343. return true;
  1344. };
  1345. });
  1346. var eqString = new Eq($foreign.eqStringImpl);
  1347. var eqRowNil = new EqRecord(function (v) {
  1348. return function (v1) {
  1349. return function (v2) {
  1350. return true;
  1351. };
  1352. };
  1353. });
  1354. var eqRecord = function eqRecord(dict) {
  1355. return dict.eqRecord;
  1356. };
  1357. var eqRec = function eqRec(dictRowToList) {
  1358. return function (dictEqRecord) {
  1359. return new Eq(eqRecord(dictEqRecord)(Type_Data_RowList.RLProxy.value));
  1360. };
  1361. };
  1362. var eqNumber = new Eq($foreign.eqNumberImpl);
  1363. var eqInt = new Eq($foreign.eqIntImpl);
  1364. var eqChar = new Eq($foreign.eqCharImpl);
  1365. var eqBoolean = new Eq($foreign.eqBooleanImpl);
  1366. var eq1 = function eq1(dict) {
  1367. return dict.eq1;
  1368. };
  1369. var eq = function eq(dict) {
  1370. return dict.eq;
  1371. };
  1372. var eqArray = function eqArray(dictEq) {
  1373. return new Eq($foreign.eqArrayImpl(eq(dictEq)));
  1374. };
  1375. var eq1Array = new Eq1(function (dictEq) {
  1376. return eq(eqArray(dictEq));
  1377. });
  1378. var eqRowCons = function eqRowCons(dictEqRecord) {
  1379. return function (dictCons) {
  1380. return function (dictIsSymbol) {
  1381. return function (dictEq) {
  1382. return new EqRecord(function (v) {
  1383. return function (ra) {
  1384. return function (rb) {
  1385. var tail = eqRecord(dictEqRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  1386. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1387. var get = Record_Unsafe.unsafeGet(key);
  1388. return eq(dictEq)(get(ra))(get(rb)) && tail;
  1389. };
  1390. };
  1391. });
  1392. };
  1393. };
  1394. };
  1395. };
  1396. var notEq = function notEq(dictEq) {
  1397. return function (x) {
  1398. return function (y) {
  1399. return eq(eqBoolean)(eq(dictEq)(x)(y))(false);
  1400. };
  1401. };
  1402. };
  1403. var notEq1 = function notEq1(dictEq1) {
  1404. return function (dictEq) {
  1405. return function (x) {
  1406. return function (y) {
  1407. return eq(eqBoolean)(eq1(dictEq1)(dictEq)(x)(y))(false);
  1408. };
  1409. };
  1410. };
  1411. };
  1412. module.exports = {
  1413. Eq: Eq,
  1414. eq: eq,
  1415. notEq: notEq,
  1416. Eq1: Eq1,
  1417. eq1: eq1,
  1418. notEq1: notEq1,
  1419. EqRecord: EqRecord,
  1420. eqRecord: eqRecord,
  1421. eqBoolean: eqBoolean,
  1422. eqInt: eqInt,
  1423. eqNumber: eqNumber,
  1424. eqChar: eqChar,
  1425. eqString: eqString,
  1426. eqUnit: eqUnit,
  1427. eqVoid: eqVoid,
  1428. eqArray: eqArray,
  1429. eqRec: eqRec,
  1430. eq1Array: eq1Array,
  1431. eqRowNil: eqRowNil,
  1432. eqRowCons: eqRowCons
  1433. };
  1434. },{"./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) {
  1435. "use strict";
  1436. exports.boolConj = function (b1) {
  1437. return function (b2) {
  1438. return b1 && b2;
  1439. };
  1440. };
  1441. exports.boolDisj = function (b1) {
  1442. return function (b2) {
  1443. return b1 || b2;
  1444. };
  1445. };
  1446. exports.boolNot = function (b) {
  1447. return !b;
  1448. };
  1449. },{}],"../output/Type.Data.Row/index.js":[function(require,module,exports) {
  1450. // Generated by purs version 0.13.6
  1451. "use strict";
  1452. var RProxy = function () {
  1453. function RProxy() {}
  1454. ;
  1455. RProxy.value = new RProxy();
  1456. return RProxy;
  1457. }();
  1458. module.exports = {
  1459. RProxy: RProxy
  1460. };
  1461. },{}],"../output/Data.HeytingAlgebra/index.js":[function(require,module,exports) {
  1462. // Generated by purs version 0.13.6
  1463. "use strict";
  1464. var $foreign = require("./foreign.js");
  1465. var Data_Symbol = require("../Data.Symbol/index.js");
  1466. var Data_Unit = require("../Data.Unit/index.js");
  1467. var Record_Unsafe = require("../Record.Unsafe/index.js");
  1468. var Type_Data_Row = require("../Type.Data.Row/index.js");
  1469. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  1470. var HeytingAlgebraRecord = function HeytingAlgebraRecord(conjRecord, disjRecord, ffRecord, impliesRecord, notRecord, ttRecord) {
  1471. this.conjRecord = conjRecord;
  1472. this.disjRecord = disjRecord;
  1473. this.ffRecord = ffRecord;
  1474. this.impliesRecord = impliesRecord;
  1475. this.notRecord = notRecord;
  1476. this.ttRecord = ttRecord;
  1477. };
  1478. var HeytingAlgebra = function HeytingAlgebra(conj, disj, ff, implies, not, tt) {
  1479. this.conj = conj;
  1480. this.disj = disj;
  1481. this.ff = ff;
  1482. this.implies = implies;
  1483. this.not = not;
  1484. this.tt = tt;
  1485. };
  1486. var ttRecord = function ttRecord(dict) {
  1487. return dict.ttRecord;
  1488. };
  1489. var tt = function tt(dict) {
  1490. return dict.tt;
  1491. };
  1492. var notRecord = function notRecord(dict) {
  1493. return dict.notRecord;
  1494. };
  1495. var not = function not(dict) {
  1496. return dict.not;
  1497. };
  1498. var impliesRecord = function impliesRecord(dict) {
  1499. return dict.impliesRecord;
  1500. };
  1501. var implies = function implies(dict) {
  1502. return dict.implies;
  1503. };
  1504. var heytingAlgebraUnit = new HeytingAlgebra(function (v) {
  1505. return function (v1) {
  1506. return Data_Unit.unit;
  1507. };
  1508. }, function (v) {
  1509. return function (v1) {
  1510. return Data_Unit.unit;
  1511. };
  1512. }, Data_Unit.unit, function (v) {
  1513. return function (v1) {
  1514. return Data_Unit.unit;
  1515. };
  1516. }, function (v) {
  1517. return Data_Unit.unit;
  1518. }, Data_Unit.unit);
  1519. var heytingAlgebraRecordNil = new HeytingAlgebraRecord(function (v) {
  1520. return function (v1) {
  1521. return function (v2) {
  1522. return {};
  1523. };
  1524. };
  1525. }, function (v) {
  1526. return function (v1) {
  1527. return function (v2) {
  1528. return {};
  1529. };
  1530. };
  1531. }, function (v) {
  1532. return function (v1) {
  1533. return {};
  1534. };
  1535. }, function (v) {
  1536. return function (v1) {
  1537. return function (v2) {
  1538. return {};
  1539. };
  1540. };
  1541. }, function (v) {
  1542. return function (v1) {
  1543. return {};
  1544. };
  1545. }, function (v) {
  1546. return function (v1) {
  1547. return {};
  1548. };
  1549. });
  1550. var ffRecord = function ffRecord(dict) {
  1551. return dict.ffRecord;
  1552. };
  1553. var ff = function ff(dict) {
  1554. return dict.ff;
  1555. };
  1556. var disjRecord = function disjRecord(dict) {
  1557. return dict.disjRecord;
  1558. };
  1559. var disj = function disj(dict) {
  1560. return dict.disj;
  1561. };
  1562. var heytingAlgebraBoolean = new HeytingAlgebra($foreign.boolConj, $foreign.boolDisj, false, function (a) {
  1563. return function (b) {
  1564. return disj(heytingAlgebraBoolean)(not(heytingAlgebraBoolean)(a))(b);
  1565. };
  1566. }, $foreign.boolNot, true);
  1567. var conjRecord = function conjRecord(dict) {
  1568. return dict.conjRecord;
  1569. };
  1570. var heytingAlgebraRecord = function heytingAlgebraRecord(dictRowToList) {
  1571. return function (dictHeytingAlgebraRecord) {
  1572. 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));
  1573. };
  1574. };
  1575. var conj = function conj(dict) {
  1576. return dict.conj;
  1577. };
  1578. var heytingAlgebraFunction = function heytingAlgebraFunction(dictHeytingAlgebra) {
  1579. return new HeytingAlgebra(function (f) {
  1580. return function (g) {
  1581. return function (a) {
  1582. return conj(dictHeytingAlgebra)(f(a))(g(a));
  1583. };
  1584. };
  1585. }, function (f) {
  1586. return function (g) {
  1587. return function (a) {
  1588. return disj(dictHeytingAlgebra)(f(a))(g(a));
  1589. };
  1590. };
  1591. }, function (v) {
  1592. return ff(dictHeytingAlgebra);
  1593. }, function (f) {
  1594. return function (g) {
  1595. return function (a) {
  1596. return implies(dictHeytingAlgebra)(f(a))(g(a));
  1597. };
  1598. };
  1599. }, function (f) {
  1600. return function (a) {
  1601. return not(dictHeytingAlgebra)(f(a));
  1602. };
  1603. }, function (v) {
  1604. return tt(dictHeytingAlgebra);
  1605. });
  1606. };
  1607. var heytingAlgebraRecordCons = function heytingAlgebraRecordCons(dictIsSymbol) {
  1608. return function (dictCons) {
  1609. return function (dictHeytingAlgebraRecord) {
  1610. return function (dictHeytingAlgebra) {
  1611. return new HeytingAlgebraRecord(function (v) {
  1612. return function (ra) {
  1613. return function (rb) {
  1614. var tail = conjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  1615. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1616. var insert = Record_Unsafe.unsafeSet(key);
  1617. var get = Record_Unsafe.unsafeGet(key);
  1618. return insert(conj(dictHeytingAlgebra)(get(ra))(get(rb)))(tail);
  1619. };
  1620. };
  1621. }, function (v) {
  1622. return function (ra) {
  1623. return function (rb) {
  1624. var tail = disjRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  1625. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1626. var insert = Record_Unsafe.unsafeSet(key);
  1627. var get = Record_Unsafe.unsafeGet(key);
  1628. return insert(disj(dictHeytingAlgebra)(get(ra))(get(rb)))(tail);
  1629. };
  1630. };
  1631. }, function (v) {
  1632. return function (row) {
  1633. var tail = ffRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(row);
  1634. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1635. var insert = Record_Unsafe.unsafeSet(key);
  1636. return insert(ff(dictHeytingAlgebra))(tail);
  1637. };
  1638. }, function (v) {
  1639. return function (ra) {
  1640. return function (rb) {
  1641. var tail = impliesRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  1642. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1643. var insert = Record_Unsafe.unsafeSet(key);
  1644. var get = Record_Unsafe.unsafeGet(key);
  1645. return insert(implies(dictHeytingAlgebra)(get(ra))(get(rb)))(tail);
  1646. };
  1647. };
  1648. }, function (v) {
  1649. return function (row) {
  1650. var tail = notRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(row);
  1651. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1652. var insert = Record_Unsafe.unsafeSet(key);
  1653. var get = Record_Unsafe.unsafeGet(key);
  1654. return insert(not(dictHeytingAlgebra)(get(row)))(tail);
  1655. };
  1656. }, function (v) {
  1657. return function (row) {
  1658. var tail = ttRecord(dictHeytingAlgebraRecord)(Type_Data_RowList.RLProxy.value)(row);
  1659. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  1660. var insert = Record_Unsafe.unsafeSet(key);
  1661. return insert(tt(dictHeytingAlgebra))(tail);
  1662. };
  1663. });
  1664. };
  1665. };
  1666. };
  1667. };
  1668. module.exports = {
  1669. HeytingAlgebra: HeytingAlgebra,
  1670. tt: tt,
  1671. ff: ff,
  1672. implies: implies,
  1673. conj: conj,
  1674. disj: disj,
  1675. not: not,
  1676. HeytingAlgebraRecord: HeytingAlgebraRecord,
  1677. ffRecord: ffRecord,
  1678. ttRecord: ttRecord,
  1679. impliesRecord: impliesRecord,
  1680. conjRecord: conjRecord,
  1681. disjRecord: disjRecord,
  1682. notRecord: notRecord,
  1683. heytingAlgebraBoolean: heytingAlgebraBoolean,
  1684. heytingAlgebraUnit: heytingAlgebraUnit,
  1685. heytingAlgebraFunction: heytingAlgebraFunction,
  1686. heytingAlgebraRecord: heytingAlgebraRecord,
  1687. heytingAlgebraRecordNil: heytingAlgebraRecordNil,
  1688. heytingAlgebraRecordCons: heytingAlgebraRecordCons
  1689. };
  1690. },{"./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) {
  1691. // Generated by purs version 0.13.6
  1692. "use strict";
  1693. var Control_Alternative = require("../Control.Alternative/index.js");
  1694. var Control_Applicative = require("../Control.Applicative/index.js");
  1695. var Control_Monad = require("../Control.Monad/index.js");
  1696. var Control_Plus = require("../Control.Plus/index.js");
  1697. var Data_Unit = require("../Data.Unit/index.js");
  1698. var MonadZero = function MonadZero(Alternative1, Monad0) {
  1699. this.Alternative1 = Alternative1;
  1700. this.Monad0 = Monad0;
  1701. };
  1702. var monadZeroArray = new MonadZero(function () {
  1703. return Control_Alternative.alternativeArray;
  1704. }, function () {
  1705. return Control_Monad.monadArray;
  1706. });
  1707. var guard = function guard(dictMonadZero) {
  1708. return function (v) {
  1709. if (v) {
  1710. return Control_Applicative.pure(dictMonadZero.Alternative1().Applicative0())(Data_Unit.unit);
  1711. }
  1712. ;
  1713. if (!v) {
  1714. return Control_Plus.empty(dictMonadZero.Alternative1().Plus1());
  1715. }
  1716. ;
  1717. throw new Error("Failed pattern match at Control.MonadZero (line 54, column 1 - line 54, column 52): " + [v.constructor.name]);
  1718. };
  1719. };
  1720. module.exports = {
  1721. MonadZero: MonadZero,
  1722. guard: guard,
  1723. monadZeroArray: monadZeroArray
  1724. };
  1725. },{"../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) {
  1726. "use strict";
  1727. exports.topInt = 2147483647;
  1728. exports.bottomInt = -2147483648;
  1729. exports.topChar = String.fromCharCode(65535);
  1730. exports.bottomChar = String.fromCharCode(0);
  1731. exports.topNumber = Number.POSITIVE_INFINITY;
  1732. exports.bottomNumber = Number.NEGATIVE_INFINITY;
  1733. },{}],"../output/Data.Ord/foreign.js":[function(require,module,exports) {
  1734. "use strict";
  1735. var unsafeCompareImpl = function unsafeCompareImpl(lt) {
  1736. return function (eq) {
  1737. return function (gt) {
  1738. return function (x) {
  1739. return function (y) {
  1740. return x < y ? lt : x === y ? eq : gt;
  1741. };
  1742. };
  1743. };
  1744. };
  1745. };
  1746. exports.ordBooleanImpl = unsafeCompareImpl;
  1747. exports.ordIntImpl = unsafeCompareImpl;
  1748. exports.ordNumberImpl = unsafeCompareImpl;
  1749. exports.ordStringImpl = unsafeCompareImpl;
  1750. exports.ordCharImpl = unsafeCompareImpl;
  1751. exports.ordArrayImpl = function (f) {
  1752. return function (xs) {
  1753. return function (ys) {
  1754. var i = 0;
  1755. var xlen = xs.length;
  1756. var ylen = ys.length;
  1757. while (i < xlen && i < ylen) {
  1758. var x = xs[i];
  1759. var y = ys[i];
  1760. var o = f(x)(y);
  1761. if (o !== 0) {
  1762. return o;
  1763. }
  1764. i++;
  1765. }
  1766. if (xlen === ylen) {
  1767. return 0;
  1768. } else if (xlen > ylen) {
  1769. return -1;
  1770. } else {
  1771. return 1;
  1772. }
  1773. };
  1774. };
  1775. };
  1776. },{}],"../output/Data.Ordering/index.js":[function(require,module,exports) {
  1777. // Generated by purs version 0.13.6
  1778. "use strict";
  1779. var Data_Eq = require("../Data.Eq/index.js");
  1780. var Data_Semigroup = require("../Data.Semigroup/index.js");
  1781. var Data_Show = require("../Data.Show/index.js");
  1782. var LT = function () {
  1783. function LT() {}
  1784. ;
  1785. LT.value = new LT();
  1786. return LT;
  1787. }();
  1788. var GT = function () {
  1789. function GT() {}
  1790. ;
  1791. GT.value = new GT();
  1792. return GT;
  1793. }();
  1794. var EQ = function () {
  1795. function EQ() {}
  1796. ;
  1797. EQ.value = new EQ();
  1798. return EQ;
  1799. }();
  1800. var showOrdering = new Data_Show.Show(function (v) {
  1801. if (v instanceof LT) {
  1802. return "LT";
  1803. }
  1804. ;
  1805. if (v instanceof GT) {
  1806. return "GT";
  1807. }
  1808. ;
  1809. if (v instanceof EQ) {
  1810. return "EQ";
  1811. }
  1812. ;
  1813. throw new Error("Failed pattern match at Data.Ordering (line 26, column 1 - line 29, column 17): " + [v.constructor.name]);
  1814. });
  1815. var semigroupOrdering = new Data_Semigroup.Semigroup(function (v) {
  1816. return function (v1) {
  1817. if (v instanceof LT) {
  1818. return LT.value;
  1819. }
  1820. ;
  1821. if (v instanceof GT) {
  1822. return GT.value;
  1823. }
  1824. ;
  1825. if (v instanceof EQ) {
  1826. return v1;
  1827. }
  1828. ;
  1829. throw new Error("Failed pattern match at Data.Ordering (line 21, column 1 - line 24, column 18): " + [v.constructor.name, v1.constructor.name]);
  1830. };
  1831. });
  1832. var invert = function invert(v) {
  1833. if (v instanceof GT) {
  1834. return LT.value;
  1835. }
  1836. ;
  1837. if (v instanceof EQ) {
  1838. return EQ.value;
  1839. }
  1840. ;
  1841. if (v instanceof LT) {
  1842. return GT.value;
  1843. }
  1844. ;
  1845. throw new Error("Failed pattern match at Data.Ordering (line 33, column 1 - line 33, column 31): " + [v.constructor.name]);
  1846. };
  1847. var eqOrdering = new Data_Eq.Eq(function (v) {
  1848. return function (v1) {
  1849. if (v instanceof LT && v1 instanceof LT) {
  1850. return true;
  1851. }
  1852. ;
  1853. if (v instanceof GT && v1 instanceof GT) {
  1854. return true;
  1855. }
  1856. ;
  1857. if (v instanceof EQ && v1 instanceof EQ) {
  1858. return true;
  1859. }
  1860. ;
  1861. return false;
  1862. };
  1863. });
  1864. module.exports = {
  1865. LT: LT,
  1866. GT: GT,
  1867. EQ: EQ,
  1868. invert: invert,
  1869. eqOrdering: eqOrdering,
  1870. semigroupOrdering: semigroupOrdering,
  1871. showOrdering: showOrdering
  1872. };
  1873. },{"../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) {
  1874. "use strict";
  1875. exports.intSub = function (x) {
  1876. return function (y) {
  1877. /* jshint bitwise: false */
  1878. return x - y | 0;
  1879. };
  1880. };
  1881. exports.numSub = function (n1) {
  1882. return function (n2) {
  1883. return n1 - n2;
  1884. };
  1885. };
  1886. },{}],"../output/Data.Semiring/foreign.js":[function(require,module,exports) {
  1887. "use strict";
  1888. exports.intAdd = function (x) {
  1889. return function (y) {
  1890. /* jshint bitwise: false */
  1891. return x + y | 0;
  1892. };
  1893. };
  1894. exports.intMul = function (x) {
  1895. return function (y) {
  1896. /* jshint bitwise: false */
  1897. return x * y | 0;
  1898. };
  1899. };
  1900. exports.numAdd = function (n1) {
  1901. return function (n2) {
  1902. return n1 + n2;
  1903. };
  1904. };
  1905. exports.numMul = function (n1) {
  1906. return function (n2) {
  1907. return n1 * n2;
  1908. };
  1909. };
  1910. },{}],"../output/Data.Semiring/index.js":[function(require,module,exports) {
  1911. // Generated by purs version 0.13.6
  1912. "use strict";
  1913. var $foreign = require("./foreign.js");
  1914. var Data_Symbol = require("../Data.Symbol/index.js");
  1915. var Data_Unit = require("../Data.Unit/index.js");
  1916. var Record_Unsafe = require("../Record.Unsafe/index.js");
  1917. var Type_Data_Row = require("../Type.Data.Row/index.js");
  1918. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  1919. var SemiringRecord = function SemiringRecord(addRecord, mulRecord, oneRecord, zeroRecord) {
  1920. this.addRecord = addRecord;
  1921. this.mulRecord = mulRecord;
  1922. this.oneRecord = oneRecord;
  1923. this.zeroRecord = zeroRecord;
  1924. };
  1925. var Semiring = function Semiring(add, mul, one, zero) {
  1926. this.add = add;
  1927. this.mul = mul;
  1928. this.one = one;
  1929. this.zero = zero;
  1930. };
  1931. var zeroRecord = function zeroRecord(dict) {
  1932. return dict.zeroRecord;
  1933. };
  1934. var zero = function zero(dict) {
  1935. return dict.zero;
  1936. };
  1937. var semiringUnit = new Semiring(function (v) {
  1938. return function (v1) {
  1939. return Data_Unit.unit;
  1940. };
  1941. }, function (v) {
  1942. return function (v1) {
  1943. return Data_Unit.unit;
  1944. };
  1945. }, Data_Unit.unit, Data_Unit.unit);
  1946. var semiringRecordNil = new SemiringRecord(function (v) {
  1947. return function (v1) {
  1948. return function (v2) {
  1949. return {};
  1950. };
  1951. };
  1952. }, function (v) {
  1953. return function (v1) {
  1954. return function (v2) {
  1955. return {};
  1956. };
  1957. };
  1958. }, function (v) {
  1959. return function (v1) {
  1960. return {};
  1961. };
  1962. }, function (v) {
  1963. return function (v1) {
  1964. return {};
  1965. };
  1966. });
  1967. var semiringNumber = new Semiring($foreign.numAdd, $foreign.numMul, 1.0, 0.0);
  1968. var semiringInt = new Semiring($foreign.intAdd, $foreign.intMul, 1, 0);
  1969. var oneRecord = function oneRecord(dict) {
  1970. return dict.oneRecord;
  1971. };
  1972. var one = function one(dict) {
  1973. return dict.one;
  1974. };
  1975. var mulRecord = function mulRecord(dict) {
  1976. return dict.mulRecord;
  1977. };
  1978. var mul = function mul(dict) {
  1979. return dict.mul;
  1980. };
  1981. var addRecord = function addRecord(dict) {
  1982. return dict.addRecord;
  1983. };
  1984. var semiringRecord = function semiringRecord(dictRowToList) {
  1985. return function (dictSemiringRecord) {
  1986. 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));
  1987. };
  1988. };
  1989. var add = function add(dict) {
  1990. return dict.add;
  1991. };
  1992. var semiringFn = function semiringFn(dictSemiring) {
  1993. return new Semiring(function (f) {
  1994. return function (g) {
  1995. return function (x) {
  1996. return add(dictSemiring)(f(x))(g(x));
  1997. };
  1998. };
  1999. }, function (f) {
  2000. return function (g) {
  2001. return function (x) {
  2002. return mul(dictSemiring)(f(x))(g(x));
  2003. };
  2004. };
  2005. }, function (v) {
  2006. return one(dictSemiring);
  2007. }, function (v) {
  2008. return zero(dictSemiring);
  2009. });
  2010. };
  2011. var semiringRecordCons = function semiringRecordCons(dictIsSymbol) {
  2012. return function (dictCons) {
  2013. return function (dictSemiringRecord) {
  2014. return function (dictSemiring) {
  2015. return new SemiringRecord(function (v) {
  2016. return function (ra) {
  2017. return function (rb) {
  2018. var tail = addRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  2019. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2020. var insert = Record_Unsafe.unsafeSet(key);
  2021. var get = Record_Unsafe.unsafeGet(key);
  2022. return insert(add(dictSemiring)(get(ra))(get(rb)))(tail);
  2023. };
  2024. };
  2025. }, function (v) {
  2026. return function (ra) {
  2027. return function (rb) {
  2028. var tail = mulRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  2029. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2030. var insert = Record_Unsafe.unsafeSet(key);
  2031. var get = Record_Unsafe.unsafeGet(key);
  2032. return insert(mul(dictSemiring)(get(ra))(get(rb)))(tail);
  2033. };
  2034. };
  2035. }, function (v) {
  2036. return function (v1) {
  2037. var tail = oneRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value);
  2038. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2039. var insert = Record_Unsafe.unsafeSet(key);
  2040. return insert(one(dictSemiring))(tail);
  2041. };
  2042. }, function (v) {
  2043. return function (v1) {
  2044. var tail = zeroRecord(dictSemiringRecord)(Type_Data_RowList.RLProxy.value)(Type_Data_Row.RProxy.value);
  2045. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2046. var insert = Record_Unsafe.unsafeSet(key);
  2047. return insert(zero(dictSemiring))(tail);
  2048. };
  2049. });
  2050. };
  2051. };
  2052. };
  2053. };
  2054. module.exports = {
  2055. Semiring: Semiring,
  2056. add: add,
  2057. zero: zero,
  2058. mul: mul,
  2059. one: one,
  2060. SemiringRecord: SemiringRecord,
  2061. addRecord: addRecord,
  2062. mulRecord: mulRecord,
  2063. oneRecord: oneRecord,
  2064. zeroRecord: zeroRecord,
  2065. semiringInt: semiringInt,
  2066. semiringNumber: semiringNumber,
  2067. semiringFn: semiringFn,
  2068. semiringUnit: semiringUnit,
  2069. semiringRecord: semiringRecord,
  2070. semiringRecordNil: semiringRecordNil,
  2071. semiringRecordCons: semiringRecordCons
  2072. };
  2073. },{"./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) {
  2074. // Generated by purs version 0.13.6
  2075. "use strict";
  2076. var $foreign = require("./foreign.js");
  2077. var Data_Semiring = require("../Data.Semiring/index.js");
  2078. var Data_Symbol = require("../Data.Symbol/index.js");
  2079. var Data_Unit = require("../Data.Unit/index.js");
  2080. var Record_Unsafe = require("../Record.Unsafe/index.js");
  2081. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  2082. var RingRecord = function RingRecord(SemiringRecord0, subRecord) {
  2083. this.SemiringRecord0 = SemiringRecord0;
  2084. this.subRecord = subRecord;
  2085. };
  2086. var Ring = function Ring(Semiring0, sub) {
  2087. this.Semiring0 = Semiring0;
  2088. this.sub = sub;
  2089. };
  2090. var subRecord = function subRecord(dict) {
  2091. return dict.subRecord;
  2092. };
  2093. var sub = function sub(dict) {
  2094. return dict.sub;
  2095. };
  2096. var ringUnit = new Ring(function () {
  2097. return Data_Semiring.semiringUnit;
  2098. }, function (v) {
  2099. return function (v1) {
  2100. return Data_Unit.unit;
  2101. };
  2102. });
  2103. var ringRecordNil = new RingRecord(function () {
  2104. return Data_Semiring.semiringRecordNil;
  2105. }, function (v) {
  2106. return function (v1) {
  2107. return function (v2) {
  2108. return {};
  2109. };
  2110. };
  2111. });
  2112. var ringRecordCons = function ringRecordCons(dictIsSymbol) {
  2113. return function (dictCons) {
  2114. return function (dictRingRecord) {
  2115. return function (dictRing) {
  2116. return new RingRecord(function () {
  2117. return Data_Semiring.semiringRecordCons(dictIsSymbol)()(dictRingRecord.SemiringRecord0())(dictRing.Semiring0());
  2118. }, function (v) {
  2119. return function (ra) {
  2120. return function (rb) {
  2121. var tail = subRecord(dictRingRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  2122. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2123. var insert = Record_Unsafe.unsafeSet(key);
  2124. var get = Record_Unsafe.unsafeGet(key);
  2125. return insert(sub(dictRing)(get(ra))(get(rb)))(tail);
  2126. };
  2127. };
  2128. });
  2129. };
  2130. };
  2131. };
  2132. };
  2133. var ringRecord = function ringRecord(dictRowToList) {
  2134. return function (dictRingRecord) {
  2135. return new Ring(function () {
  2136. return Data_Semiring.semiringRecord()(dictRingRecord.SemiringRecord0());
  2137. }, subRecord(dictRingRecord)(Type_Data_RowList.RLProxy.value));
  2138. };
  2139. };
  2140. var ringNumber = new Ring(function () {
  2141. return Data_Semiring.semiringNumber;
  2142. }, $foreign.numSub);
  2143. var ringInt = new Ring(function () {
  2144. return Data_Semiring.semiringInt;
  2145. }, $foreign.intSub);
  2146. var ringFn = function ringFn(dictRing) {
  2147. return new Ring(function () {
  2148. return Data_Semiring.semiringFn(dictRing.Semiring0());
  2149. }, function (f) {
  2150. return function (g) {
  2151. return function (x) {
  2152. return sub(dictRing)(f(x))(g(x));
  2153. };
  2154. };
  2155. });
  2156. };
  2157. var negate = function negate(dictRing) {
  2158. return function (a) {
  2159. return sub(dictRing)(Data_Semiring.zero(dictRing.Semiring0()))(a);
  2160. };
  2161. };
  2162. module.exports = {
  2163. Ring: Ring,
  2164. sub: sub,
  2165. negate: negate,
  2166. RingRecord: RingRecord,
  2167. subRecord: subRecord,
  2168. ringInt: ringInt,
  2169. ringNumber: ringNumber,
  2170. ringUnit: ringUnit,
  2171. ringFn: ringFn,
  2172. ringRecord: ringRecord,
  2173. ringRecordNil: ringRecordNil,
  2174. ringRecordCons: ringRecordCons
  2175. };
  2176. },{"./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) {
  2177. // Generated by purs version 0.13.6
  2178. "use strict";
  2179. var $foreign = require("./foreign.js");
  2180. var Data_Eq = require("../Data.Eq/index.js");
  2181. var Data_Ordering = require("../Data.Ordering/index.js");
  2182. var Data_Ring = require("../Data.Ring/index.js");
  2183. var Data_Semiring = require("../Data.Semiring/index.js");
  2184. var Data_Symbol = require("../Data.Symbol/index.js");
  2185. var Record_Unsafe = require("../Record.Unsafe/index.js");
  2186. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  2187. var OrdRecord = function OrdRecord(EqRecord0, compareRecord) {
  2188. this.EqRecord0 = EqRecord0;
  2189. this.compareRecord = compareRecord;
  2190. };
  2191. var Ord1 = function Ord1(Eq10, compare1) {
  2192. this.Eq10 = Eq10;
  2193. this.compare1 = compare1;
  2194. };
  2195. var Ord = function Ord(Eq0, compare) {
  2196. this.Eq0 = Eq0;
  2197. this.compare = compare;
  2198. };
  2199. var ordVoid = new Ord(function () {
  2200. return Data_Eq.eqVoid;
  2201. }, function (v) {
  2202. return function (v1) {
  2203. return Data_Ordering.EQ.value;
  2204. };
  2205. });
  2206. var ordUnit = new Ord(function () {
  2207. return Data_Eq.eqUnit;
  2208. }, function (v) {
  2209. return function (v1) {
  2210. return Data_Ordering.EQ.value;
  2211. };
  2212. });
  2213. var ordString = new Ord(function () {
  2214. return Data_Eq.eqString;
  2215. }, $foreign.ordStringImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
  2216. var ordRecordNil = new OrdRecord(function () {
  2217. return Data_Eq.eqRowNil;
  2218. }, function (v) {
  2219. return function (v1) {
  2220. return function (v2) {
  2221. return Data_Ordering.EQ.value;
  2222. };
  2223. };
  2224. });
  2225. var ordOrdering = new Ord(function () {
  2226. return Data_Ordering.eqOrdering;
  2227. }, function (v) {
  2228. return function (v1) {
  2229. if (v instanceof Data_Ordering.LT && v1 instanceof Data_Ordering.LT) {
  2230. return Data_Ordering.EQ.value;
  2231. }
  2232. ;
  2233. if (v instanceof Data_Ordering.EQ && v1 instanceof Data_Ordering.EQ) {
  2234. return Data_Ordering.EQ.value;
  2235. }
  2236. ;
  2237. if (v instanceof Data_Ordering.GT && v1 instanceof Data_Ordering.GT) {
  2238. return Data_Ordering.EQ.value;
  2239. }
  2240. ;
  2241. if (v instanceof Data_Ordering.LT) {
  2242. return Data_Ordering.LT.value;
  2243. }
  2244. ;
  2245. if (v instanceof Data_Ordering.EQ && v1 instanceof Data_Ordering.LT) {
  2246. return Data_Ordering.GT.value;
  2247. }
  2248. ;
  2249. if (v instanceof Data_Ordering.EQ && v1 instanceof Data_Ordering.GT) {
  2250. return Data_Ordering.LT.value;
  2251. }
  2252. ;
  2253. if (v instanceof Data_Ordering.GT) {
  2254. return Data_Ordering.GT.value;
  2255. }
  2256. ;
  2257. throw new Error("Failed pattern match at Data.Ord (line 112, column 1 - line 119, column 21): " + [v.constructor.name, v1.constructor.name]);
  2258. };
  2259. });
  2260. var ordNumber = new Ord(function () {
  2261. return Data_Eq.eqNumber;
  2262. }, $foreign.ordNumberImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
  2263. var ordInt = new Ord(function () {
  2264. return Data_Eq.eqInt;
  2265. }, $foreign.ordIntImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
  2266. var ordChar = new Ord(function () {
  2267. return Data_Eq.eqChar;
  2268. }, $foreign.ordCharImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
  2269. var ordBoolean = new Ord(function () {
  2270. return Data_Eq.eqBoolean;
  2271. }, $foreign.ordBooleanImpl(Data_Ordering.LT.value)(Data_Ordering.EQ.value)(Data_Ordering.GT.value));
  2272. var compareRecord = function compareRecord(dict) {
  2273. return dict.compareRecord;
  2274. };
  2275. var ordRecord = function ordRecord(dictRowToList) {
  2276. return function (dictOrdRecord) {
  2277. return new Ord(function () {
  2278. return Data_Eq.eqRec()(dictOrdRecord.EqRecord0());
  2279. }, compareRecord(dictOrdRecord)(Type_Data_RowList.RLProxy.value));
  2280. };
  2281. };
  2282. var compare1 = function compare1(dict) {
  2283. return dict.compare1;
  2284. };
  2285. var compare = function compare(dict) {
  2286. return dict.compare;
  2287. };
  2288. var comparing = function comparing(dictOrd) {
  2289. return function (f) {
  2290. return function (x) {
  2291. return function (y) {
  2292. return compare(dictOrd)(f(x))(f(y));
  2293. };
  2294. };
  2295. };
  2296. };
  2297. var greaterThan = function greaterThan(dictOrd) {
  2298. return function (a1) {
  2299. return function (a2) {
  2300. var v = compare(dictOrd)(a1)(a2);
  2301. if (v instanceof Data_Ordering.GT) {
  2302. return true;
  2303. }
  2304. ;
  2305. return false;
  2306. };
  2307. };
  2308. };
  2309. var greaterThanOrEq = function greaterThanOrEq(dictOrd) {
  2310. return function (a1) {
  2311. return function (a2) {
  2312. var v = compare(dictOrd)(a1)(a2);
  2313. if (v instanceof Data_Ordering.LT) {
  2314. return false;
  2315. }
  2316. ;
  2317. return true;
  2318. };
  2319. };
  2320. };
  2321. var signum = function signum(dictOrd) {
  2322. return function (dictRing) {
  2323. return function (x) {
  2324. var $43 = greaterThanOrEq(dictOrd)(x)(Data_Semiring.zero(dictRing.Semiring0()));
  2325. if ($43) {
  2326. return Data_Semiring.one(dictRing.Semiring0());
  2327. }
  2328. ;
  2329. return Data_Ring.negate(dictRing)(Data_Semiring.one(dictRing.Semiring0()));
  2330. };
  2331. };
  2332. };
  2333. var lessThan = function lessThan(dictOrd) {
  2334. return function (a1) {
  2335. return function (a2) {
  2336. var v = compare(dictOrd)(a1)(a2);
  2337. if (v instanceof Data_Ordering.LT) {
  2338. return true;
  2339. }
  2340. ;
  2341. return false;
  2342. };
  2343. };
  2344. };
  2345. var lessThanOrEq = function lessThanOrEq(dictOrd) {
  2346. return function (a1) {
  2347. return function (a2) {
  2348. var v = compare(dictOrd)(a1)(a2);
  2349. if (v instanceof Data_Ordering.GT) {
  2350. return false;
  2351. }
  2352. ;
  2353. return true;
  2354. };
  2355. };
  2356. };
  2357. var max = function max(dictOrd) {
  2358. return function (x) {
  2359. return function (y) {
  2360. var v = compare(dictOrd)(x)(y);
  2361. if (v instanceof Data_Ordering.LT) {
  2362. return y;
  2363. }
  2364. ;
  2365. if (v instanceof Data_Ordering.EQ) {
  2366. return x;
  2367. }
  2368. ;
  2369. if (v instanceof Data_Ordering.GT) {
  2370. return x;
  2371. }
  2372. ;
  2373. throw new Error("Failed pattern match at Data.Ord (line 167, column 3 - line 170, column 12): " + [v.constructor.name]);
  2374. };
  2375. };
  2376. };
  2377. var min = function min(dictOrd) {
  2378. return function (x) {
  2379. return function (y) {
  2380. var v = compare(dictOrd)(x)(y);
  2381. if (v instanceof Data_Ordering.LT) {
  2382. return x;
  2383. }
  2384. ;
  2385. if (v instanceof Data_Ordering.EQ) {
  2386. return x;
  2387. }
  2388. ;
  2389. if (v instanceof Data_Ordering.GT) {
  2390. return y;
  2391. }
  2392. ;
  2393. throw new Error("Failed pattern match at Data.Ord (line 158, column 3 - line 161, column 12): " + [v.constructor.name]);
  2394. };
  2395. };
  2396. };
  2397. var ordArray = function ordArray(dictOrd) {
  2398. return new Ord(function () {
  2399. return Data_Eq.eqArray(dictOrd.Eq0());
  2400. }, function () {
  2401. var toDelta = function toDelta(x) {
  2402. return function (y) {
  2403. var v = compare(dictOrd)(x)(y);
  2404. if (v instanceof Data_Ordering.EQ) {
  2405. return 0;
  2406. }
  2407. ;
  2408. if (v instanceof Data_Ordering.LT) {
  2409. return 1;
  2410. }
  2411. ;
  2412. if (v instanceof Data_Ordering.GT) {
  2413. return -1 | 0;
  2414. }
  2415. ;
  2416. throw new Error("Failed pattern match at Data.Ord (line 65, column 7 - line 68, column 17): " + [v.constructor.name]);
  2417. };
  2418. };
  2419. return function (xs) {
  2420. return function (ys) {
  2421. return compare(ordInt)(0)($foreign.ordArrayImpl(toDelta)(xs)(ys));
  2422. };
  2423. };
  2424. }());
  2425. };
  2426. var ord1Array = new Ord1(function () {
  2427. return Data_Eq.eq1Array;
  2428. }, function (dictOrd) {
  2429. return compare(ordArray(dictOrd));
  2430. });
  2431. var ordRecordCons = function ordRecordCons(dictOrdRecord) {
  2432. return function (dictCons) {
  2433. return function (dictIsSymbol) {
  2434. return function (dictOrd) {
  2435. return new OrdRecord(function () {
  2436. return Data_Eq.eqRowCons(dictOrdRecord.EqRecord0())()(dictIsSymbol)(dictOrd.Eq0());
  2437. }, function (v) {
  2438. return function (ra) {
  2439. return function (rb) {
  2440. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2441. var left = compare(dictOrd)(Record_Unsafe.unsafeGet(key)(ra))(Record_Unsafe.unsafeGet(key)(rb));
  2442. var $49 = Data_Eq.notEq(Data_Ordering.eqOrdering)(left)(Data_Ordering.EQ.value);
  2443. if ($49) {
  2444. return left;
  2445. }
  2446. ;
  2447. return compareRecord(dictOrdRecord)(Type_Data_RowList.RLProxy.value)(ra)(rb);
  2448. };
  2449. };
  2450. });
  2451. };
  2452. };
  2453. };
  2454. };
  2455. var clamp = function clamp(dictOrd) {
  2456. return function (low) {
  2457. return function (hi) {
  2458. return function (x) {
  2459. return min(dictOrd)(hi)(max(dictOrd)(low)(x));
  2460. };
  2461. };
  2462. };
  2463. };
  2464. var between = function between(dictOrd) {
  2465. return function (low) {
  2466. return function (hi) {
  2467. return function (x) {
  2468. if (lessThan(dictOrd)(x)(low)) {
  2469. return false;
  2470. }
  2471. ;
  2472. if (greaterThan(dictOrd)(x)(hi)) {
  2473. return false;
  2474. }
  2475. ;
  2476. return true;
  2477. };
  2478. };
  2479. };
  2480. };
  2481. var abs = function abs(dictOrd) {
  2482. return function (dictRing) {
  2483. return function (x) {
  2484. var $53 = greaterThanOrEq(dictOrd)(x)(Data_Semiring.zero(dictRing.Semiring0()));
  2485. if ($53) {
  2486. return x;
  2487. }
  2488. ;
  2489. return Data_Ring.negate(dictRing)(x);
  2490. };
  2491. };
  2492. };
  2493. module.exports = {
  2494. Ord: Ord,
  2495. compare: compare,
  2496. Ord1: Ord1,
  2497. compare1: compare1,
  2498. lessThan: lessThan,
  2499. lessThanOrEq: lessThanOrEq,
  2500. greaterThan: greaterThan,
  2501. greaterThanOrEq: greaterThanOrEq,
  2502. comparing: comparing,
  2503. min: min,
  2504. max: max,
  2505. clamp: clamp,
  2506. between: between,
  2507. abs: abs,
  2508. signum: signum,
  2509. OrdRecord: OrdRecord,
  2510. compareRecord: compareRecord,
  2511. ordBoolean: ordBoolean,
  2512. ordInt: ordInt,
  2513. ordNumber: ordNumber,
  2514. ordString: ordString,
  2515. ordChar: ordChar,
  2516. ordUnit: ordUnit,
  2517. ordVoid: ordVoid,
  2518. ordArray: ordArray,
  2519. ordOrdering: ordOrdering,
  2520. ord1Array: ord1Array,
  2521. ordRecordNil: ordRecordNil,
  2522. ordRecordCons: ordRecordCons,
  2523. ordRecord: ordRecord
  2524. };
  2525. },{"./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) {
  2526. // Generated by purs version 0.13.6
  2527. "use strict";
  2528. var $foreign = require("./foreign.js");
  2529. var Data_Ord = require("../Data.Ord/index.js");
  2530. var Data_Ordering = require("../Data.Ordering/index.js");
  2531. var Data_Unit = require("../Data.Unit/index.js");
  2532. var Bounded = function Bounded(Ord0, bottom, top) {
  2533. this.Ord0 = Ord0;
  2534. this.bottom = bottom;
  2535. this.top = top;
  2536. };
  2537. var top = function top(dict) {
  2538. return dict.top;
  2539. };
  2540. var boundedUnit = new Bounded(function () {
  2541. return Data_Ord.ordUnit;
  2542. }, Data_Unit.unit, Data_Unit.unit);
  2543. var boundedOrdering = new Bounded(function () {
  2544. return Data_Ord.ordOrdering;
  2545. }, Data_Ordering.LT.value, Data_Ordering.GT.value);
  2546. var boundedNumber = new Bounded(function () {
  2547. return Data_Ord.ordNumber;
  2548. }, $foreign.bottomNumber, $foreign.topNumber);
  2549. var boundedInt = new Bounded(function () {
  2550. return Data_Ord.ordInt;
  2551. }, $foreign.bottomInt, $foreign.topInt);
  2552. var boundedChar = new Bounded(function () {
  2553. return Data_Ord.ordChar;
  2554. }, $foreign.bottomChar, $foreign.topChar);
  2555. var boundedBoolean = new Bounded(function () {
  2556. return Data_Ord.ordBoolean;
  2557. }, false, true);
  2558. var bottom = function bottom(dict) {
  2559. return dict.bottom;
  2560. };
  2561. module.exports = {
  2562. Bounded: Bounded,
  2563. bottom: bottom,
  2564. top: top,
  2565. boundedBoolean: boundedBoolean,
  2566. boundedInt: boundedInt,
  2567. boundedChar: boundedChar,
  2568. boundedOrdering: boundedOrdering,
  2569. boundedUnit: boundedUnit,
  2570. boundedNumber: boundedNumber
  2571. };
  2572. },{"./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) {
  2573. // Generated by purs version 0.13.6
  2574. "use strict";
  2575. var Data_Functor = require("../Data.Functor/index.js");
  2576. var Invariant = function Invariant(imap) {
  2577. this.imap = imap;
  2578. };
  2579. var invariantMultiplicative = new Invariant(function (f) {
  2580. return function (v) {
  2581. return function (v1) {
  2582. return f(v1);
  2583. };
  2584. };
  2585. });
  2586. var invariantEndo = new Invariant(function (ab) {
  2587. return function (ba) {
  2588. return function (v) {
  2589. return function ($31) {
  2590. return ab(v(ba($31)));
  2591. };
  2592. };
  2593. };
  2594. });
  2595. var invariantDual = new Invariant(function (f) {
  2596. return function (v) {
  2597. return function (v1) {
  2598. return f(v1);
  2599. };
  2600. };
  2601. });
  2602. var invariantDisj = new Invariant(function (f) {
  2603. return function (v) {
  2604. return function (v1) {
  2605. return f(v1);
  2606. };
  2607. };
  2608. });
  2609. var invariantConj = new Invariant(function (f) {
  2610. return function (v) {
  2611. return function (v1) {
  2612. return f(v1);
  2613. };
  2614. };
  2615. });
  2616. var invariantAdditive = new Invariant(function (f) {
  2617. return function (v) {
  2618. return function (v1) {
  2619. return f(v1);
  2620. };
  2621. };
  2622. });
  2623. var imapF = function imapF(dictFunctor) {
  2624. return function (f) {
  2625. return function (v) {
  2626. return Data_Functor.map(dictFunctor)(f);
  2627. };
  2628. };
  2629. };
  2630. var invariantArray = new Invariant(imapF(Data_Functor.functorArray));
  2631. var invariantFn = new Invariant(imapF(Data_Functor.functorFn));
  2632. var imap = function imap(dict) {
  2633. return dict.imap;
  2634. };
  2635. module.exports = {
  2636. imap: imap,
  2637. Invariant: Invariant,
  2638. imapF: imapF,
  2639. invariantFn: invariantFn,
  2640. invariantArray: invariantArray,
  2641. invariantAdditive: invariantAdditive,
  2642. invariantConj: invariantConj,
  2643. invariantDisj: invariantDisj,
  2644. invariantDual: invariantDual,
  2645. invariantEndo: invariantEndo,
  2646. invariantMultiplicative: invariantMultiplicative
  2647. };
  2648. },{"../Data.Functor/index.js":"../output/Data.Functor/index.js"}],"../output/Data.EuclideanRing/foreign.js":[function(require,module,exports) {
  2649. "use strict";
  2650. exports.intDegree = function (x) {
  2651. return Math.min(Math.abs(x), 2147483647);
  2652. }; // See the Euclidean definition in
  2653. // https://en.m.wikipedia.org/wiki/Modulo_operation.
  2654. exports.intDiv = function (x) {
  2655. return function (y) {
  2656. if (y === 0) return 0;
  2657. return y > 0 ? Math.floor(x / y) : -Math.floor(x / -y);
  2658. };
  2659. };
  2660. exports.intMod = function (x) {
  2661. return function (y) {
  2662. if (y === 0) return 0;
  2663. var yy = Math.abs(y);
  2664. return (x % yy + yy) % yy;
  2665. };
  2666. };
  2667. exports.numDiv = function (n1) {
  2668. return function (n2) {
  2669. return n1 / n2;
  2670. };
  2671. };
  2672. },{}],"../output/Data.CommutativeRing/index.js":[function(require,module,exports) {
  2673. // Generated by purs version 0.13.6
  2674. "use strict";
  2675. var Data_Ring = require("../Data.Ring/index.js");
  2676. var CommutativeRingRecord = function CommutativeRingRecord(RingRecord0) {
  2677. this.RingRecord0 = RingRecord0;
  2678. };
  2679. var CommutativeRing = function CommutativeRing(Ring0) {
  2680. this.Ring0 = Ring0;
  2681. };
  2682. var commutativeRingUnit = new CommutativeRing(function () {
  2683. return Data_Ring.ringUnit;
  2684. });
  2685. var commutativeRingRecordNil = new CommutativeRingRecord(function () {
  2686. return Data_Ring.ringRecordNil;
  2687. });
  2688. var commutativeRingRecordCons = function commutativeRingRecordCons(dictIsSymbol) {
  2689. return function (dictCons) {
  2690. return function (dictCommutativeRingRecord) {
  2691. return function (dictCommutativeRing) {
  2692. return new CommutativeRingRecord(function () {
  2693. return Data_Ring.ringRecordCons(dictIsSymbol)()(dictCommutativeRingRecord.RingRecord0())(dictCommutativeRing.Ring0());
  2694. });
  2695. };
  2696. };
  2697. };
  2698. };
  2699. var commutativeRingRecord = function commutativeRingRecord(dictRowToList) {
  2700. return function (dictCommutativeRingRecord) {
  2701. return new CommutativeRing(function () {
  2702. return Data_Ring.ringRecord()(dictCommutativeRingRecord.RingRecord0());
  2703. });
  2704. };
  2705. };
  2706. var commutativeRingNumber = new CommutativeRing(function () {
  2707. return Data_Ring.ringNumber;
  2708. });
  2709. var commutativeRingInt = new CommutativeRing(function () {
  2710. return Data_Ring.ringInt;
  2711. });
  2712. var commutativeRingFn = function commutativeRingFn(dictCommutativeRing) {
  2713. return new CommutativeRing(function () {
  2714. return Data_Ring.ringFn(dictCommutativeRing.Ring0());
  2715. });
  2716. };
  2717. module.exports = {
  2718. CommutativeRing: CommutativeRing,
  2719. CommutativeRingRecord: CommutativeRingRecord,
  2720. commutativeRingInt: commutativeRingInt,
  2721. commutativeRingNumber: commutativeRingNumber,
  2722. commutativeRingUnit: commutativeRingUnit,
  2723. commutativeRingFn: commutativeRingFn,
  2724. commutativeRingRecord: commutativeRingRecord,
  2725. commutativeRingRecordNil: commutativeRingRecordNil,
  2726. commutativeRingRecordCons: commutativeRingRecordCons
  2727. };
  2728. },{"../Data.Ring/index.js":"../output/Data.Ring/index.js"}],"../output/Data.EuclideanRing/index.js":[function(require,module,exports) {
  2729. // Generated by purs version 0.13.6
  2730. "use strict";
  2731. var $foreign = require("./foreign.js");
  2732. var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
  2733. var Data_Eq = require("../Data.Eq/index.js");
  2734. var Data_Semiring = require("../Data.Semiring/index.js");
  2735. var EuclideanRing = function EuclideanRing(CommutativeRing0, degree, div, mod) {
  2736. this.CommutativeRing0 = CommutativeRing0;
  2737. this.degree = degree;
  2738. this.div = div;
  2739. this.mod = mod;
  2740. };
  2741. var mod = function mod(dict) {
  2742. return dict.mod;
  2743. };
  2744. var gcd = function gcd($copy_dictEq) {
  2745. return function ($copy_dictEuclideanRing) {
  2746. return function ($copy_a) {
  2747. return function ($copy_b) {
  2748. var $tco_var_dictEq = $copy_dictEq;
  2749. var $tco_var_dictEuclideanRing = $copy_dictEuclideanRing;
  2750. var $tco_var_a = $copy_a;
  2751. var $tco_done = false;
  2752. var $tco_result;
  2753. function $tco_loop(dictEq, dictEuclideanRing, a, b) {
  2754. var $7 = Data_Eq.eq(dictEq)(b)(Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0()));
  2755. if ($7) {
  2756. $tco_done = true;
  2757. return a;
  2758. }
  2759. ;
  2760. $tco_var_dictEq = dictEq;
  2761. $tco_var_dictEuclideanRing = dictEuclideanRing;
  2762. $tco_var_a = b;
  2763. $copy_b = mod(dictEuclideanRing)(a)(b);
  2764. return;
  2765. }
  2766. ;
  2767. while (!$tco_done) {
  2768. $tco_result = $tco_loop($tco_var_dictEq, $tco_var_dictEuclideanRing, $tco_var_a, $copy_b);
  2769. }
  2770. ;
  2771. return $tco_result;
  2772. };
  2773. };
  2774. };
  2775. };
  2776. var euclideanRingNumber = new EuclideanRing(function () {
  2777. return Data_CommutativeRing.commutativeRingNumber;
  2778. }, function (v) {
  2779. return 1;
  2780. }, $foreign.numDiv, function (v) {
  2781. return function (v1) {
  2782. return 0.0;
  2783. };
  2784. });
  2785. var euclideanRingInt = new EuclideanRing(function () {
  2786. return Data_CommutativeRing.commutativeRingInt;
  2787. }, $foreign.intDegree, $foreign.intDiv, $foreign.intMod);
  2788. var div = function div(dict) {
  2789. return dict.div;
  2790. };
  2791. var lcm = function lcm(dictEq) {
  2792. return function (dictEuclideanRing) {
  2793. return function (a) {
  2794. return function (b) {
  2795. 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()));
  2796. if ($8) {
  2797. return Data_Semiring.zero(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0());
  2798. }
  2799. ;
  2800. return div(dictEuclideanRing)(Data_Semiring.mul(dictEuclideanRing.CommutativeRing0().Ring0().Semiring0())(a)(b))(gcd(dictEq)(dictEuclideanRing)(a)(b));
  2801. };
  2802. };
  2803. };
  2804. };
  2805. var degree = function degree(dict) {
  2806. return dict.degree;
  2807. };
  2808. module.exports = {
  2809. EuclideanRing: EuclideanRing,
  2810. degree: degree,
  2811. div: div,
  2812. mod: mod,
  2813. gcd: gcd,
  2814. lcm: lcm,
  2815. euclideanRingInt: euclideanRingInt,
  2816. euclideanRingNumber: euclideanRingNumber
  2817. };
  2818. },{"./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) {
  2819. // Generated by purs version 0.13.6
  2820. "use strict";
  2821. var Data_Boolean = require("../Data.Boolean/index.js");
  2822. var Data_EuclideanRing = require("../Data.EuclideanRing/index.js");
  2823. var Data_Ordering = require("../Data.Ordering/index.js");
  2824. var Data_Semigroup = require("../Data.Semigroup/index.js");
  2825. var Data_Symbol = require("../Data.Symbol/index.js");
  2826. var Data_Unit = require("../Data.Unit/index.js");
  2827. var Record_Unsafe = require("../Record.Unsafe/index.js");
  2828. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  2829. var MonoidRecord = function MonoidRecord(SemigroupRecord0, memptyRecord) {
  2830. this.SemigroupRecord0 = SemigroupRecord0;
  2831. this.memptyRecord = memptyRecord;
  2832. };
  2833. var Monoid = function Monoid(Semigroup0, mempty) {
  2834. this.Semigroup0 = Semigroup0;
  2835. this.mempty = mempty;
  2836. };
  2837. var monoidUnit = new Monoid(function () {
  2838. return Data_Semigroup.semigroupUnit;
  2839. }, Data_Unit.unit);
  2840. var monoidString = new Monoid(function () {
  2841. return Data_Semigroup.semigroupString;
  2842. }, "");
  2843. var monoidRecordNil = new MonoidRecord(function () {
  2844. return Data_Semigroup.semigroupRecordNil;
  2845. }, function (v) {
  2846. return {};
  2847. });
  2848. var monoidOrdering = new Monoid(function () {
  2849. return Data_Ordering.semigroupOrdering;
  2850. }, Data_Ordering.EQ.value);
  2851. var monoidArray = new Monoid(function () {
  2852. return Data_Semigroup.semigroupArray;
  2853. }, []);
  2854. var memptyRecord = function memptyRecord(dict) {
  2855. return dict.memptyRecord;
  2856. };
  2857. var monoidRecord = function monoidRecord(dictRowToList) {
  2858. return function (dictMonoidRecord) {
  2859. return new Monoid(function () {
  2860. return Data_Semigroup.semigroupRecord()(dictMonoidRecord.SemigroupRecord0());
  2861. }, memptyRecord(dictMonoidRecord)(Type_Data_RowList.RLProxy.value));
  2862. };
  2863. };
  2864. var mempty = function mempty(dict) {
  2865. return dict.mempty;
  2866. };
  2867. var monoidFn = function monoidFn(dictMonoid) {
  2868. return new Monoid(function () {
  2869. return Data_Semigroup.semigroupFn(dictMonoid.Semigroup0());
  2870. }, function (v) {
  2871. return mempty(dictMonoid);
  2872. });
  2873. };
  2874. var monoidRecordCons = function monoidRecordCons(dictIsSymbol) {
  2875. return function (dictMonoid) {
  2876. return function (dictCons) {
  2877. return function (dictMonoidRecord) {
  2878. return new MonoidRecord(function () {
  2879. return Data_Semigroup.semigroupRecordCons(dictIsSymbol)()(dictMonoidRecord.SemigroupRecord0())(dictMonoid.Semigroup0());
  2880. }, function (v) {
  2881. var tail = memptyRecord(dictMonoidRecord)(Type_Data_RowList.RLProxy.value);
  2882. var key = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  2883. var insert = Record_Unsafe.unsafeSet(key);
  2884. return insert(mempty(dictMonoid))(tail);
  2885. });
  2886. };
  2887. };
  2888. };
  2889. };
  2890. var power = function power(dictMonoid) {
  2891. return function (x) {
  2892. var go = function go(p) {
  2893. if (p <= 0) {
  2894. return mempty(dictMonoid);
  2895. }
  2896. ;
  2897. if (p === 1) {
  2898. return x;
  2899. }
  2900. ;
  2901. if (Data_EuclideanRing.mod(Data_EuclideanRing.euclideanRingInt)(p)(2) === 0) {
  2902. var x$prime = go(Data_EuclideanRing.div(Data_EuclideanRing.euclideanRingInt)(p)(2));
  2903. return Data_Semigroup.append(dictMonoid.Semigroup0())(x$prime)(x$prime);
  2904. }
  2905. ;
  2906. if (Data_Boolean.otherwise) {
  2907. var x$prime = go(Data_EuclideanRing.div(Data_EuclideanRing.euclideanRingInt)(p)(2));
  2908. return Data_Semigroup.append(dictMonoid.Semigroup0())(x$prime)(Data_Semigroup.append(dictMonoid.Semigroup0())(x$prime)(x));
  2909. }
  2910. ;
  2911. throw new Error("Failed pattern match at Data.Monoid (line 65, column 3 - line 65, column 17): " + [p.constructor.name]);
  2912. };
  2913. return go;
  2914. };
  2915. };
  2916. var guard = function guard(dictMonoid) {
  2917. return function (v) {
  2918. return function (v1) {
  2919. if (v) {
  2920. return v1;
  2921. }
  2922. ;
  2923. if (!v) {
  2924. return mempty(dictMonoid);
  2925. }
  2926. ;
  2927. throw new Error("Failed pattern match at Data.Monoid (line 73, column 1 - line 73, column 49): " + [v.constructor.name, v1.constructor.name]);
  2928. };
  2929. };
  2930. };
  2931. module.exports = {
  2932. Monoid: Monoid,
  2933. mempty: mempty,
  2934. power: power,
  2935. guard: guard,
  2936. MonoidRecord: MonoidRecord,
  2937. memptyRecord: memptyRecord,
  2938. monoidUnit: monoidUnit,
  2939. monoidOrdering: monoidOrdering,
  2940. monoidFn: monoidFn,
  2941. monoidString: monoidString,
  2942. monoidArray: monoidArray,
  2943. monoidRecord: monoidRecord,
  2944. monoidRecordNil: monoidRecordNil,
  2945. monoidRecordCons: monoidRecordCons
  2946. };
  2947. },{"../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) {
  2948. // Generated by purs version 0.13.6
  2949. "use strict";
  2950. var Control_Alt = require("../Control.Alt/index.js");
  2951. var Control_Alternative = require("../Control.Alternative/index.js");
  2952. var Control_Applicative = require("../Control.Applicative/index.js");
  2953. var Control_Apply = require("../Control.Apply/index.js");
  2954. var Control_Bind = require("../Control.Bind/index.js");
  2955. var Control_Category = require("../Control.Category/index.js");
  2956. var Control_Extend = require("../Control.Extend/index.js");
  2957. var Control_Monad = require("../Control.Monad/index.js");
  2958. var Control_MonadZero = require("../Control.MonadZero/index.js");
  2959. var Control_Plus = require("../Control.Plus/index.js");
  2960. var Data_Bounded = require("../Data.Bounded/index.js");
  2961. var Data_Eq = require("../Data.Eq/index.js");
  2962. var Data_Function = require("../Data.Function/index.js");
  2963. var Data_Functor = require("../Data.Functor/index.js");
  2964. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  2965. var Data_Monoid = require("../Data.Monoid/index.js");
  2966. var Data_Ord = require("../Data.Ord/index.js");
  2967. var Data_Ordering = require("../Data.Ordering/index.js");
  2968. var Data_Semigroup = require("../Data.Semigroup/index.js");
  2969. var Data_Show = require("../Data.Show/index.js");
  2970. var Data_Unit = require("../Data.Unit/index.js");
  2971. var Nothing = function () {
  2972. function Nothing() {}
  2973. ;
  2974. Nothing.value = new Nothing();
  2975. return Nothing;
  2976. }();
  2977. var Just = function () {
  2978. function Just(value0) {
  2979. this.value0 = value0;
  2980. }
  2981. ;
  2982. Just.create = function (value0) {
  2983. return new Just(value0);
  2984. };
  2985. return Just;
  2986. }();
  2987. var showMaybe = function showMaybe(dictShow) {
  2988. return new Data_Show.Show(function (v) {
  2989. if (v instanceof Just) {
  2990. return "(Just " + (Data_Show.show(dictShow)(v.value0) + ")");
  2991. }
  2992. ;
  2993. if (v instanceof Nothing) {
  2994. return "Nothing";
  2995. }
  2996. ;
  2997. throw new Error("Failed pattern match at Data.Maybe (line 205, column 1 - line 207, column 28): " + [v.constructor.name]);
  2998. });
  2999. };
  3000. var semigroupMaybe = function semigroupMaybe(dictSemigroup) {
  3001. return new Data_Semigroup.Semigroup(function (v) {
  3002. return function (v1) {
  3003. if (v instanceof Nothing) {
  3004. return v1;
  3005. }
  3006. ;
  3007. if (v1 instanceof Nothing) {
  3008. return v;
  3009. }
  3010. ;
  3011. if (v instanceof Just && v1 instanceof Just) {
  3012. return new Just(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0));
  3013. }
  3014. ;
  3015. throw new Error("Failed pattern match at Data.Maybe (line 174, column 1 - line 177, column 43): " + [v.constructor.name, v1.constructor.name]);
  3016. };
  3017. });
  3018. };
  3019. var optional = function optional(dictAlternative) {
  3020. return function (a) {
  3021. return Control_Alt.alt(dictAlternative.Plus1().Alt0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Just.create)(a))(Control_Applicative.pure(dictAlternative.Applicative0())(Nothing.value));
  3022. };
  3023. };
  3024. var monoidMaybe = function monoidMaybe(dictSemigroup) {
  3025. return new Data_Monoid.Monoid(function () {
  3026. return semigroupMaybe(dictSemigroup);
  3027. }, Nothing.value);
  3028. };
  3029. var maybe$prime = function maybe$prime(v) {
  3030. return function (v1) {
  3031. return function (v2) {
  3032. if (v2 instanceof Nothing) {
  3033. return v(Data_Unit.unit);
  3034. }
  3035. ;
  3036. if (v2 instanceof Just) {
  3037. return v1(v2.value0);
  3038. }
  3039. ;
  3040. 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]);
  3041. };
  3042. };
  3043. };
  3044. var maybe = function maybe(v) {
  3045. return function (v1) {
  3046. return function (v2) {
  3047. if (v2 instanceof Nothing) {
  3048. return v;
  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 217, column 1 - line 217, column 51): " + [v.constructor.name, v1.constructor.name, v2.constructor.name]);
  3056. };
  3057. };
  3058. };
  3059. var isNothing = maybe(true)(Data_Function["const"](false));
  3060. var isJust = maybe(false)(Data_Function["const"](true));
  3061. var functorMaybe = new Data_Functor.Functor(function (v) {
  3062. return function (v1) {
  3063. if (v1 instanceof Just) {
  3064. return new Just(v(v1.value0));
  3065. }
  3066. ;
  3067. return Nothing.value;
  3068. };
  3069. });
  3070. var invariantMaybe = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorMaybe));
  3071. var fromMaybe$prime = function fromMaybe$prime(a) {
  3072. return maybe$prime(a)(Control_Category.identity(Control_Category.categoryFn));
  3073. };
  3074. var fromMaybe = function fromMaybe(a) {
  3075. return maybe(a)(Control_Category.identity(Control_Category.categoryFn));
  3076. };
  3077. var fromJust = function fromJust(dictPartial) {
  3078. return function (v) {
  3079. if (v instanceof Just) {
  3080. return v.value0;
  3081. }
  3082. ;
  3083. throw new Error("Failed pattern match at Data.Maybe (line 268, column 1 - line 268, column 46): " + [v.constructor.name]);
  3084. };
  3085. };
  3086. var extendMaybe = new Control_Extend.Extend(function () {
  3087. return functorMaybe;
  3088. }, function (v) {
  3089. return function (v1) {
  3090. if (v1 instanceof Nothing) {
  3091. return Nothing.value;
  3092. }
  3093. ;
  3094. return new Just(v(v1));
  3095. };
  3096. });
  3097. var eqMaybe = function eqMaybe(dictEq) {
  3098. return new Data_Eq.Eq(function (x) {
  3099. return function (y) {
  3100. if (x instanceof Nothing && y instanceof Nothing) {
  3101. return true;
  3102. }
  3103. ;
  3104. if (x instanceof Just && y instanceof Just) {
  3105. return Data_Eq.eq(dictEq)(x.value0)(y.value0);
  3106. }
  3107. ;
  3108. return false;
  3109. };
  3110. });
  3111. };
  3112. var ordMaybe = function ordMaybe(dictOrd) {
  3113. return new Data_Ord.Ord(function () {
  3114. return eqMaybe(dictOrd.Eq0());
  3115. }, function (x) {
  3116. return function (y) {
  3117. if (x instanceof Nothing && y instanceof Nothing) {
  3118. return Data_Ordering.EQ.value;
  3119. }
  3120. ;
  3121. if (x instanceof Nothing) {
  3122. return Data_Ordering.LT.value;
  3123. }
  3124. ;
  3125. if (y instanceof Nothing) {
  3126. return Data_Ordering.GT.value;
  3127. }
  3128. ;
  3129. if (x instanceof Just && y instanceof Just) {
  3130. return Data_Ord.compare(dictOrd)(x.value0)(y.value0);
  3131. }
  3132. ;
  3133. throw new Error("Failed pattern match at Data.Maybe (line 194, column 1 - line 194, column 51): " + [x.constructor.name, y.constructor.name]);
  3134. };
  3135. });
  3136. };
  3137. var eq1Maybe = new Data_Eq.Eq1(function (dictEq) {
  3138. return Data_Eq.eq(eqMaybe(dictEq));
  3139. });
  3140. var ord1Maybe = new Data_Ord.Ord1(function () {
  3141. return eq1Maybe;
  3142. }, function (dictOrd) {
  3143. return Data_Ord.compare(ordMaybe(dictOrd));
  3144. });
  3145. var boundedMaybe = function boundedMaybe(dictBounded) {
  3146. return new Data_Bounded.Bounded(function () {
  3147. return ordMaybe(dictBounded.Ord0());
  3148. }, Nothing.value, new Just(Data_Bounded.top(dictBounded)));
  3149. };
  3150. var applyMaybe = new Control_Apply.Apply(function () {
  3151. return functorMaybe;
  3152. }, function (v) {
  3153. return function (v1) {
  3154. if (v instanceof Just) {
  3155. return Data_Functor.map(functorMaybe)(v.value0)(v1);
  3156. }
  3157. ;
  3158. if (v instanceof Nothing) {
  3159. return Nothing.value;
  3160. }
  3161. ;
  3162. throw new Error("Failed pattern match at Data.Maybe (line 67, column 1 - line 69, column 30): " + [v.constructor.name, v1.constructor.name]);
  3163. };
  3164. });
  3165. var bindMaybe = new Control_Bind.Bind(function () {
  3166. return applyMaybe;
  3167. }, function (v) {
  3168. return function (v1) {
  3169. if (v instanceof Just) {
  3170. return v1(v.value0);
  3171. }
  3172. ;
  3173. if (v instanceof Nothing) {
  3174. return Nothing.value;
  3175. }
  3176. ;
  3177. throw new Error("Failed pattern match at Data.Maybe (line 125, column 1 - line 127, column 28): " + [v.constructor.name, v1.constructor.name]);
  3178. };
  3179. });
  3180. var applicativeMaybe = new Control_Applicative.Applicative(function () {
  3181. return applyMaybe;
  3182. }, Just.create);
  3183. var monadMaybe = new Control_Monad.Monad(function () {
  3184. return applicativeMaybe;
  3185. }, function () {
  3186. return bindMaybe;
  3187. });
  3188. var altMaybe = new Control_Alt.Alt(function () {
  3189. return functorMaybe;
  3190. }, function (v) {
  3191. return function (v1) {
  3192. if (v instanceof Nothing) {
  3193. return v1;
  3194. }
  3195. ;
  3196. return v;
  3197. };
  3198. });
  3199. var plusMaybe = new Control_Plus.Plus(function () {
  3200. return altMaybe;
  3201. }, Nothing.value);
  3202. var alternativeMaybe = new Control_Alternative.Alternative(function () {
  3203. return applicativeMaybe;
  3204. }, function () {
  3205. return plusMaybe;
  3206. });
  3207. var monadZeroMaybe = new Control_MonadZero.MonadZero(function () {
  3208. return alternativeMaybe;
  3209. }, function () {
  3210. return monadMaybe;
  3211. });
  3212. module.exports = {
  3213. Nothing: Nothing,
  3214. Just: Just,
  3215. maybe: maybe,
  3216. "maybe'": maybe$prime,
  3217. fromMaybe: fromMaybe,
  3218. "fromMaybe'": fromMaybe$prime,
  3219. isJust: isJust,
  3220. isNothing: isNothing,
  3221. fromJust: fromJust,
  3222. optional: optional,
  3223. functorMaybe: functorMaybe,
  3224. applyMaybe: applyMaybe,
  3225. applicativeMaybe: applicativeMaybe,
  3226. altMaybe: altMaybe,
  3227. plusMaybe: plusMaybe,
  3228. alternativeMaybe: alternativeMaybe,
  3229. bindMaybe: bindMaybe,
  3230. monadMaybe: monadMaybe,
  3231. monadZeroMaybe: monadZeroMaybe,
  3232. extendMaybe: extendMaybe,
  3233. invariantMaybe: invariantMaybe,
  3234. semigroupMaybe: semigroupMaybe,
  3235. monoidMaybe: monoidMaybe,
  3236. eqMaybe: eqMaybe,
  3237. eq1Maybe: eq1Maybe,
  3238. ordMaybe: ordMaybe,
  3239. ord1Maybe: ord1Maybe,
  3240. boundedMaybe: boundedMaybe,
  3241. showMaybe: showMaybe
  3242. };
  3243. },{"../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) {
  3244. // Generated by purs version 0.13.6
  3245. "use strict";
  3246. var Control_Applicative = require("../Control.Applicative/index.js");
  3247. var Control_Apply = require("../Control.Apply/index.js");
  3248. var Control_Bind = require("../Control.Bind/index.js");
  3249. var Control_Monad = require("../Control.Monad/index.js");
  3250. var Data_Eq = require("../Data.Eq/index.js");
  3251. var Data_Functor = require("../Data.Functor/index.js");
  3252. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  3253. var Data_Monoid = require("../Data.Monoid/index.js");
  3254. var Data_Ord = require("../Data.Ord/index.js");
  3255. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3256. var Data_Semiring = require("../Data.Semiring/index.js");
  3257. var Data_Show = require("../Data.Show/index.js");
  3258. var Conj = function Conj(x) {
  3259. return x;
  3260. };
  3261. var showConj = function showConj(dictShow) {
  3262. return new Data_Show.Show(function (v) {
  3263. return "(Conj " + (Data_Show.show(dictShow)(v) + ")");
  3264. });
  3265. };
  3266. var semiringConj = function semiringConj(dictHeytingAlgebra) {
  3267. return new Data_Semiring.Semiring(function (v) {
  3268. return function (v1) {
  3269. return Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v)(v1);
  3270. };
  3271. }, function (v) {
  3272. return function (v1) {
  3273. return Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v)(v1);
  3274. };
  3275. }, Data_HeytingAlgebra.ff(dictHeytingAlgebra), Data_HeytingAlgebra.tt(dictHeytingAlgebra));
  3276. };
  3277. var semigroupConj = function semigroupConj(dictHeytingAlgebra) {
  3278. return new Data_Semigroup.Semigroup(function (v) {
  3279. return function (v1) {
  3280. return Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v)(v1);
  3281. };
  3282. });
  3283. };
  3284. var ordConj = function ordConj(dictOrd) {
  3285. return dictOrd;
  3286. };
  3287. var monoidConj = function monoidConj(dictHeytingAlgebra) {
  3288. return new Data_Monoid.Monoid(function () {
  3289. return semigroupConj(dictHeytingAlgebra);
  3290. }, Data_HeytingAlgebra.tt(dictHeytingAlgebra));
  3291. };
  3292. var functorConj = new Data_Functor.Functor(function (f) {
  3293. return function (m) {
  3294. return f(m);
  3295. };
  3296. });
  3297. var eqConj = function eqConj(dictEq) {
  3298. return dictEq;
  3299. };
  3300. var eq1Conj = new Data_Eq.Eq1(function (dictEq) {
  3301. return Data_Eq.eq(eqConj(dictEq));
  3302. });
  3303. var ord1Conj = new Data_Ord.Ord1(function () {
  3304. return eq1Conj;
  3305. }, function (dictOrd) {
  3306. return Data_Ord.compare(ordConj(dictOrd));
  3307. });
  3308. var boundedConj = function boundedConj(dictBounded) {
  3309. return dictBounded;
  3310. };
  3311. var applyConj = new Control_Apply.Apply(function () {
  3312. return functorConj;
  3313. }, function (v) {
  3314. return function (v1) {
  3315. return v(v1);
  3316. };
  3317. });
  3318. var bindConj = new Control_Bind.Bind(function () {
  3319. return applyConj;
  3320. }, function (v) {
  3321. return function (f) {
  3322. return f(v);
  3323. };
  3324. });
  3325. var applicativeConj = new Control_Applicative.Applicative(function () {
  3326. return applyConj;
  3327. }, Conj);
  3328. var monadConj = new Control_Monad.Monad(function () {
  3329. return applicativeConj;
  3330. }, function () {
  3331. return bindConj;
  3332. });
  3333. module.exports = {
  3334. Conj: Conj,
  3335. eqConj: eqConj,
  3336. eq1Conj: eq1Conj,
  3337. ordConj: ordConj,
  3338. ord1Conj: ord1Conj,
  3339. boundedConj: boundedConj,
  3340. showConj: showConj,
  3341. functorConj: functorConj,
  3342. applyConj: applyConj,
  3343. applicativeConj: applicativeConj,
  3344. bindConj: bindConj,
  3345. monadConj: monadConj,
  3346. semigroupConj: semigroupConj,
  3347. monoidConj: monoidConj,
  3348. semiringConj: semiringConj
  3349. };
  3350. },{"../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) {
  3351. // Generated by purs version 0.13.6
  3352. "use strict";
  3353. var Control_Applicative = require("../Control.Applicative/index.js");
  3354. var Control_Apply = require("../Control.Apply/index.js");
  3355. var Control_Bind = require("../Control.Bind/index.js");
  3356. var Control_Monad = require("../Control.Monad/index.js");
  3357. var Data_Eq = require("../Data.Eq/index.js");
  3358. var Data_Functor = require("../Data.Functor/index.js");
  3359. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  3360. var Data_Monoid = require("../Data.Monoid/index.js");
  3361. var Data_Ord = require("../Data.Ord/index.js");
  3362. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3363. var Data_Semiring = require("../Data.Semiring/index.js");
  3364. var Data_Show = require("../Data.Show/index.js");
  3365. var Disj = function Disj(x) {
  3366. return x;
  3367. };
  3368. var showDisj = function showDisj(dictShow) {
  3369. return new Data_Show.Show(function (v) {
  3370. return "(Disj " + (Data_Show.show(dictShow)(v) + ")");
  3371. });
  3372. };
  3373. var semiringDisj = function semiringDisj(dictHeytingAlgebra) {
  3374. return new Data_Semiring.Semiring(function (v) {
  3375. return function (v1) {
  3376. return Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v)(v1);
  3377. };
  3378. }, function (v) {
  3379. return function (v1) {
  3380. return Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v)(v1);
  3381. };
  3382. }, Data_HeytingAlgebra.tt(dictHeytingAlgebra), Data_HeytingAlgebra.ff(dictHeytingAlgebra));
  3383. };
  3384. var semigroupDisj = function semigroupDisj(dictHeytingAlgebra) {
  3385. return new Data_Semigroup.Semigroup(function (v) {
  3386. return function (v1) {
  3387. return Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v)(v1);
  3388. };
  3389. });
  3390. };
  3391. var ordDisj = function ordDisj(dictOrd) {
  3392. return dictOrd;
  3393. };
  3394. var monoidDisj = function monoidDisj(dictHeytingAlgebra) {
  3395. return new Data_Monoid.Monoid(function () {
  3396. return semigroupDisj(dictHeytingAlgebra);
  3397. }, Data_HeytingAlgebra.ff(dictHeytingAlgebra));
  3398. };
  3399. var functorDisj = new Data_Functor.Functor(function (f) {
  3400. return function (m) {
  3401. return f(m);
  3402. };
  3403. });
  3404. var eqDisj = function eqDisj(dictEq) {
  3405. return dictEq;
  3406. };
  3407. var eq1Disj = new Data_Eq.Eq1(function (dictEq) {
  3408. return Data_Eq.eq(eqDisj(dictEq));
  3409. });
  3410. var ord1Disj = new Data_Ord.Ord1(function () {
  3411. return eq1Disj;
  3412. }, function (dictOrd) {
  3413. return Data_Ord.compare(ordDisj(dictOrd));
  3414. });
  3415. var boundedDisj = function boundedDisj(dictBounded) {
  3416. return dictBounded;
  3417. };
  3418. var applyDisj = new Control_Apply.Apply(function () {
  3419. return functorDisj;
  3420. }, function (v) {
  3421. return function (v1) {
  3422. return v(v1);
  3423. };
  3424. });
  3425. var bindDisj = new Control_Bind.Bind(function () {
  3426. return applyDisj;
  3427. }, function (v) {
  3428. return function (f) {
  3429. return f(v);
  3430. };
  3431. });
  3432. var applicativeDisj = new Control_Applicative.Applicative(function () {
  3433. return applyDisj;
  3434. }, Disj);
  3435. var monadDisj = new Control_Monad.Monad(function () {
  3436. return applicativeDisj;
  3437. }, function () {
  3438. return bindDisj;
  3439. });
  3440. module.exports = {
  3441. Disj: Disj,
  3442. eqDisj: eqDisj,
  3443. eq1Disj: eq1Disj,
  3444. ordDisj: ordDisj,
  3445. ord1Disj: ord1Disj,
  3446. boundedDisj: boundedDisj,
  3447. showDisj: showDisj,
  3448. functorDisj: functorDisj,
  3449. applyDisj: applyDisj,
  3450. applicativeDisj: applicativeDisj,
  3451. bindDisj: bindDisj,
  3452. monadDisj: monadDisj,
  3453. semigroupDisj: semigroupDisj,
  3454. monoidDisj: monoidDisj,
  3455. semiringDisj: semiringDisj
  3456. };
  3457. },{"../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) {
  3458. // Generated by purs version 0.13.6
  3459. "use strict";
  3460. var Control_Applicative = require("../Control.Applicative/index.js");
  3461. var Control_Apply = require("../Control.Apply/index.js");
  3462. var Control_Bind = require("../Control.Bind/index.js");
  3463. var Control_Monad = require("../Control.Monad/index.js");
  3464. var Data_Eq = require("../Data.Eq/index.js");
  3465. var Data_Functor = require("../Data.Functor/index.js");
  3466. var Data_Monoid = require("../Data.Monoid/index.js");
  3467. var Data_Ord = require("../Data.Ord/index.js");
  3468. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3469. var Data_Show = require("../Data.Show/index.js");
  3470. var Dual = function Dual(x) {
  3471. return x;
  3472. };
  3473. var showDual = function showDual(dictShow) {
  3474. return new Data_Show.Show(function (v) {
  3475. return "(Dual " + (Data_Show.show(dictShow)(v) + ")");
  3476. });
  3477. };
  3478. var semigroupDual = function semigroupDual(dictSemigroup) {
  3479. return new Data_Semigroup.Semigroup(function (v) {
  3480. return function (v1) {
  3481. return Data_Semigroup.append(dictSemigroup)(v1)(v);
  3482. };
  3483. });
  3484. };
  3485. var ordDual = function ordDual(dictOrd) {
  3486. return dictOrd;
  3487. };
  3488. var monoidDual = function monoidDual(dictMonoid) {
  3489. return new Data_Monoid.Monoid(function () {
  3490. return semigroupDual(dictMonoid.Semigroup0());
  3491. }, Data_Monoid.mempty(dictMonoid));
  3492. };
  3493. var functorDual = new Data_Functor.Functor(function (f) {
  3494. return function (m) {
  3495. return f(m);
  3496. };
  3497. });
  3498. var eqDual = function eqDual(dictEq) {
  3499. return dictEq;
  3500. };
  3501. var eq1Dual = new Data_Eq.Eq1(function (dictEq) {
  3502. return Data_Eq.eq(eqDual(dictEq));
  3503. });
  3504. var ord1Dual = new Data_Ord.Ord1(function () {
  3505. return eq1Dual;
  3506. }, function (dictOrd) {
  3507. return Data_Ord.compare(ordDual(dictOrd));
  3508. });
  3509. var boundedDual = function boundedDual(dictBounded) {
  3510. return dictBounded;
  3511. };
  3512. var applyDual = new Control_Apply.Apply(function () {
  3513. return functorDual;
  3514. }, function (v) {
  3515. return function (v1) {
  3516. return v(v1);
  3517. };
  3518. });
  3519. var bindDual = new Control_Bind.Bind(function () {
  3520. return applyDual;
  3521. }, function (v) {
  3522. return function (f) {
  3523. return f(v);
  3524. };
  3525. });
  3526. var applicativeDual = new Control_Applicative.Applicative(function () {
  3527. return applyDual;
  3528. }, Dual);
  3529. var monadDual = new Control_Monad.Monad(function () {
  3530. return applicativeDual;
  3531. }, function () {
  3532. return bindDual;
  3533. });
  3534. module.exports = {
  3535. Dual: Dual,
  3536. eqDual: eqDual,
  3537. eq1Dual: eq1Dual,
  3538. ordDual: ordDual,
  3539. ord1Dual: ord1Dual,
  3540. boundedDual: boundedDual,
  3541. showDual: showDual,
  3542. functorDual: functorDual,
  3543. applyDual: applyDual,
  3544. applicativeDual: applicativeDual,
  3545. bindDual: bindDual,
  3546. monadDual: monadDual,
  3547. semigroupDual: semigroupDual,
  3548. monoidDual: monoidDual
  3549. };
  3550. },{"../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) {
  3551. // Generated by purs version 0.13.6
  3552. "use strict";
  3553. var Control_Category = require("../Control.Category/index.js");
  3554. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  3555. var Data_Monoid = require("../Data.Monoid/index.js");
  3556. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3557. var Data_Show = require("../Data.Show/index.js");
  3558. var Endo = function Endo(x) {
  3559. return x;
  3560. };
  3561. var showEndo = function showEndo(dictShow) {
  3562. return new Data_Show.Show(function (v) {
  3563. return "(Endo " + (Data_Show.show(dictShow)(v) + ")");
  3564. });
  3565. };
  3566. var semigroupEndo = function semigroupEndo(dictSemigroupoid) {
  3567. return new Data_Semigroup.Semigroup(function (v) {
  3568. return function (v1) {
  3569. return Control_Semigroupoid.compose(dictSemigroupoid)(v)(v1);
  3570. };
  3571. });
  3572. };
  3573. var ordEndo = function ordEndo(dictOrd) {
  3574. return dictOrd;
  3575. };
  3576. var monoidEndo = function monoidEndo(dictCategory) {
  3577. return new Data_Monoid.Monoid(function () {
  3578. return semigroupEndo(dictCategory.Semigroupoid0());
  3579. }, Control_Category.identity(dictCategory));
  3580. };
  3581. var eqEndo = function eqEndo(dictEq) {
  3582. return dictEq;
  3583. };
  3584. var boundedEndo = function boundedEndo(dictBounded) {
  3585. return dictBounded;
  3586. };
  3587. module.exports = {
  3588. Endo: Endo,
  3589. eqEndo: eqEndo,
  3590. ordEndo: ordEndo,
  3591. boundedEndo: boundedEndo,
  3592. showEndo: showEndo,
  3593. semigroupEndo: semigroupEndo,
  3594. monoidEndo: monoidEndo
  3595. };
  3596. },{"../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) {
  3597. // Generated by purs version 0.13.6
  3598. "use strict";
  3599. var Control_Applicative = require("../Control.Applicative/index.js");
  3600. var Control_Apply = require("../Control.Apply/index.js");
  3601. var Control_Bind = require("../Control.Bind/index.js");
  3602. var Control_Monad = require("../Control.Monad/index.js");
  3603. var Data_Eq = require("../Data.Eq/index.js");
  3604. var Data_Functor = require("../Data.Functor/index.js");
  3605. var Data_Monoid = require("../Data.Monoid/index.js");
  3606. var Data_Ord = require("../Data.Ord/index.js");
  3607. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3608. var Data_Semiring = require("../Data.Semiring/index.js");
  3609. var Data_Show = require("../Data.Show/index.js");
  3610. var Additive = function Additive(x) {
  3611. return x;
  3612. };
  3613. var showAdditive = function showAdditive(dictShow) {
  3614. return new Data_Show.Show(function (v) {
  3615. return "(Additive " + (Data_Show.show(dictShow)(v) + ")");
  3616. });
  3617. };
  3618. var semigroupAdditive = function semigroupAdditive(dictSemiring) {
  3619. return new Data_Semigroup.Semigroup(function (v) {
  3620. return function (v1) {
  3621. return Data_Semiring.add(dictSemiring)(v)(v1);
  3622. };
  3623. });
  3624. };
  3625. var ordAdditive = function ordAdditive(dictOrd) {
  3626. return dictOrd;
  3627. };
  3628. var monoidAdditive = function monoidAdditive(dictSemiring) {
  3629. return new Data_Monoid.Monoid(function () {
  3630. return semigroupAdditive(dictSemiring);
  3631. }, Data_Semiring.zero(dictSemiring));
  3632. };
  3633. var functorAdditive = new Data_Functor.Functor(function (f) {
  3634. return function (m) {
  3635. return f(m);
  3636. };
  3637. });
  3638. var eqAdditive = function eqAdditive(dictEq) {
  3639. return dictEq;
  3640. };
  3641. var eq1Additive = new Data_Eq.Eq1(function (dictEq) {
  3642. return Data_Eq.eq(eqAdditive(dictEq));
  3643. });
  3644. var ord1Additive = new Data_Ord.Ord1(function () {
  3645. return eq1Additive;
  3646. }, function (dictOrd) {
  3647. return Data_Ord.compare(ordAdditive(dictOrd));
  3648. });
  3649. var boundedAdditive = function boundedAdditive(dictBounded) {
  3650. return dictBounded;
  3651. };
  3652. var applyAdditive = new Control_Apply.Apply(function () {
  3653. return functorAdditive;
  3654. }, function (v) {
  3655. return function (v1) {
  3656. return v(v1);
  3657. };
  3658. });
  3659. var bindAdditive = new Control_Bind.Bind(function () {
  3660. return applyAdditive;
  3661. }, function (v) {
  3662. return function (f) {
  3663. return f(v);
  3664. };
  3665. });
  3666. var applicativeAdditive = new Control_Applicative.Applicative(function () {
  3667. return applyAdditive;
  3668. }, Additive);
  3669. var monadAdditive = new Control_Monad.Monad(function () {
  3670. return applicativeAdditive;
  3671. }, function () {
  3672. return bindAdditive;
  3673. });
  3674. module.exports = {
  3675. Additive: Additive,
  3676. eqAdditive: eqAdditive,
  3677. eq1Additive: eq1Additive,
  3678. ordAdditive: ordAdditive,
  3679. ord1Additive: ord1Additive,
  3680. boundedAdditive: boundedAdditive,
  3681. showAdditive: showAdditive,
  3682. functorAdditive: functorAdditive,
  3683. applyAdditive: applyAdditive,
  3684. applicativeAdditive: applicativeAdditive,
  3685. bindAdditive: bindAdditive,
  3686. monadAdditive: monadAdditive,
  3687. semigroupAdditive: semigroupAdditive,
  3688. monoidAdditive: monoidAdditive
  3689. };
  3690. },{"../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) {
  3691. // Generated by purs version 0.13.6
  3692. "use strict";
  3693. var Control_Applicative = require("../Control.Applicative/index.js");
  3694. var Control_Apply = require("../Control.Apply/index.js");
  3695. var Control_Bind = require("../Control.Bind/index.js");
  3696. var Control_Monad = require("../Control.Monad/index.js");
  3697. var Data_Eq = require("../Data.Eq/index.js");
  3698. var Data_Functor = require("../Data.Functor/index.js");
  3699. var Data_Monoid = require("../Data.Monoid/index.js");
  3700. var Data_Ord = require("../Data.Ord/index.js");
  3701. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3702. var Data_Semiring = require("../Data.Semiring/index.js");
  3703. var Data_Show = require("../Data.Show/index.js");
  3704. var Multiplicative = function Multiplicative(x) {
  3705. return x;
  3706. };
  3707. var showMultiplicative = function showMultiplicative(dictShow) {
  3708. return new Data_Show.Show(function (v) {
  3709. return "(Multiplicative " + (Data_Show.show(dictShow)(v) + ")");
  3710. });
  3711. };
  3712. var semigroupMultiplicative = function semigroupMultiplicative(dictSemiring) {
  3713. return new Data_Semigroup.Semigroup(function (v) {
  3714. return function (v1) {
  3715. return Data_Semiring.mul(dictSemiring)(v)(v1);
  3716. };
  3717. });
  3718. };
  3719. var ordMultiplicative = function ordMultiplicative(dictOrd) {
  3720. return dictOrd;
  3721. };
  3722. var monoidMultiplicative = function monoidMultiplicative(dictSemiring) {
  3723. return new Data_Monoid.Monoid(function () {
  3724. return semigroupMultiplicative(dictSemiring);
  3725. }, Data_Semiring.one(dictSemiring));
  3726. };
  3727. var functorMultiplicative = new Data_Functor.Functor(function (f) {
  3728. return function (m) {
  3729. return f(m);
  3730. };
  3731. });
  3732. var eqMultiplicative = function eqMultiplicative(dictEq) {
  3733. return dictEq;
  3734. };
  3735. var eq1Multiplicative = new Data_Eq.Eq1(function (dictEq) {
  3736. return Data_Eq.eq(eqMultiplicative(dictEq));
  3737. });
  3738. var ord1Multiplicative = new Data_Ord.Ord1(function () {
  3739. return eq1Multiplicative;
  3740. }, function (dictOrd) {
  3741. return Data_Ord.compare(ordMultiplicative(dictOrd));
  3742. });
  3743. var boundedMultiplicative = function boundedMultiplicative(dictBounded) {
  3744. return dictBounded;
  3745. };
  3746. var applyMultiplicative = new Control_Apply.Apply(function () {
  3747. return functorMultiplicative;
  3748. }, function (v) {
  3749. return function (v1) {
  3750. return v(v1);
  3751. };
  3752. });
  3753. var bindMultiplicative = new Control_Bind.Bind(function () {
  3754. return applyMultiplicative;
  3755. }, function (v) {
  3756. return function (f) {
  3757. return f(v);
  3758. };
  3759. });
  3760. var applicativeMultiplicative = new Control_Applicative.Applicative(function () {
  3761. return applyMultiplicative;
  3762. }, Multiplicative);
  3763. var monadMultiplicative = new Control_Monad.Monad(function () {
  3764. return applicativeMultiplicative;
  3765. }, function () {
  3766. return bindMultiplicative;
  3767. });
  3768. module.exports = {
  3769. Multiplicative: Multiplicative,
  3770. eqMultiplicative: eqMultiplicative,
  3771. eq1Multiplicative: eq1Multiplicative,
  3772. ordMultiplicative: ordMultiplicative,
  3773. ord1Multiplicative: ord1Multiplicative,
  3774. boundedMultiplicative: boundedMultiplicative,
  3775. showMultiplicative: showMultiplicative,
  3776. functorMultiplicative: functorMultiplicative,
  3777. applyMultiplicative: applyMultiplicative,
  3778. applicativeMultiplicative: applicativeMultiplicative,
  3779. bindMultiplicative: bindMultiplicative,
  3780. monadMultiplicative: monadMultiplicative,
  3781. semigroupMultiplicative: semigroupMultiplicative,
  3782. monoidMultiplicative: monoidMultiplicative
  3783. };
  3784. },{"../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) {
  3785. // Generated by purs version 0.13.6
  3786. "use strict";
  3787. var Control_Applicative = require("../Control.Applicative/index.js");
  3788. var Control_Apply = require("../Control.Apply/index.js");
  3789. var Control_Bind = require("../Control.Bind/index.js");
  3790. var Control_Monad = require("../Control.Monad/index.js");
  3791. var Data_Eq = require("../Data.Eq/index.js");
  3792. var Data_Functor = require("../Data.Functor/index.js");
  3793. var Data_Ord = require("../Data.Ord/index.js");
  3794. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3795. var Data_Show = require("../Data.Show/index.js");
  3796. var First = function First(x) {
  3797. return x;
  3798. };
  3799. var showFirst = function showFirst(dictShow) {
  3800. return new Data_Show.Show(function (v) {
  3801. return "(First " + (Data_Show.show(dictShow)(v) + ")");
  3802. });
  3803. };
  3804. var semigroupFirst = new Data_Semigroup.Semigroup(function (x) {
  3805. return function (v) {
  3806. return x;
  3807. };
  3808. });
  3809. var ordFirst = function ordFirst(dictOrd) {
  3810. return dictOrd;
  3811. };
  3812. var functorFirst = new Data_Functor.Functor(function (f) {
  3813. return function (m) {
  3814. return f(m);
  3815. };
  3816. });
  3817. var eqFirst = function eqFirst(dictEq) {
  3818. return dictEq;
  3819. };
  3820. var eq1First = new Data_Eq.Eq1(function (dictEq) {
  3821. return Data_Eq.eq(eqFirst(dictEq));
  3822. });
  3823. var ord1First = new Data_Ord.Ord1(function () {
  3824. return eq1First;
  3825. }, function (dictOrd) {
  3826. return Data_Ord.compare(ordFirst(dictOrd));
  3827. });
  3828. var boundedFirst = function boundedFirst(dictBounded) {
  3829. return dictBounded;
  3830. };
  3831. var applyFirst = new Control_Apply.Apply(function () {
  3832. return functorFirst;
  3833. }, function (v) {
  3834. return function (v1) {
  3835. return v(v1);
  3836. };
  3837. });
  3838. var bindFirst = new Control_Bind.Bind(function () {
  3839. return applyFirst;
  3840. }, function (v) {
  3841. return function (f) {
  3842. return f(v);
  3843. };
  3844. });
  3845. var applicativeFirst = new Control_Applicative.Applicative(function () {
  3846. return applyFirst;
  3847. }, First);
  3848. var monadFirst = new Control_Monad.Monad(function () {
  3849. return applicativeFirst;
  3850. }, function () {
  3851. return bindFirst;
  3852. });
  3853. module.exports = {
  3854. First: First,
  3855. eqFirst: eqFirst,
  3856. eq1First: eq1First,
  3857. ordFirst: ordFirst,
  3858. ord1First: ord1First,
  3859. boundedFirst: boundedFirst,
  3860. showFirst: showFirst,
  3861. functorFirst: functorFirst,
  3862. applyFirst: applyFirst,
  3863. applicativeFirst: applicativeFirst,
  3864. bindFirst: bindFirst,
  3865. monadFirst: monadFirst,
  3866. semigroupFirst: semigroupFirst
  3867. };
  3868. },{"../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) {
  3869. // Generated by purs version 0.13.6
  3870. "use strict";
  3871. var Control_Applicative = require("../Control.Applicative/index.js");
  3872. var Control_Apply = require("../Control.Apply/index.js");
  3873. var Control_Bind = require("../Control.Bind/index.js");
  3874. var Control_Monad = require("../Control.Monad/index.js");
  3875. var Data_Eq = require("../Data.Eq/index.js");
  3876. var Data_Functor = require("../Data.Functor/index.js");
  3877. var Data_Ord = require("../Data.Ord/index.js");
  3878. var Data_Semigroup = require("../Data.Semigroup/index.js");
  3879. var Data_Show = require("../Data.Show/index.js");
  3880. var Last = function Last(x) {
  3881. return x;
  3882. };
  3883. var showLast = function showLast(dictShow) {
  3884. return new Data_Show.Show(function (v) {
  3885. return "(Last " + (Data_Show.show(dictShow)(v) + ")");
  3886. });
  3887. };
  3888. var semigroupLast = new Data_Semigroup.Semigroup(function (v) {
  3889. return function (x) {
  3890. return x;
  3891. };
  3892. });
  3893. var ordLast = function ordLast(dictOrd) {
  3894. return dictOrd;
  3895. };
  3896. var functorLast = new Data_Functor.Functor(function (f) {
  3897. return function (m) {
  3898. return f(m);
  3899. };
  3900. });
  3901. var eqLast = function eqLast(dictEq) {
  3902. return dictEq;
  3903. };
  3904. var eq1Last = new Data_Eq.Eq1(function (dictEq) {
  3905. return Data_Eq.eq(eqLast(dictEq));
  3906. });
  3907. var ord1Last = new Data_Ord.Ord1(function () {
  3908. return eq1Last;
  3909. }, function (dictOrd) {
  3910. return Data_Ord.compare(ordLast(dictOrd));
  3911. });
  3912. var boundedLast = function boundedLast(dictBounded) {
  3913. return dictBounded;
  3914. };
  3915. var applyLast = new Control_Apply.Apply(function () {
  3916. return functorLast;
  3917. }, function (v) {
  3918. return function (v1) {
  3919. return v(v1);
  3920. };
  3921. });
  3922. var bindLast = new Control_Bind.Bind(function () {
  3923. return applyLast;
  3924. }, function (v) {
  3925. return function (f) {
  3926. return f(v);
  3927. };
  3928. });
  3929. var applicativeLast = new Control_Applicative.Applicative(function () {
  3930. return applyLast;
  3931. }, Last);
  3932. var monadLast = new Control_Monad.Monad(function () {
  3933. return applicativeLast;
  3934. }, function () {
  3935. return bindLast;
  3936. });
  3937. module.exports = {
  3938. Last: Last,
  3939. eqLast: eqLast,
  3940. eq1Last: eq1Last,
  3941. ordLast: ordLast,
  3942. ord1Last: ord1Last,
  3943. boundedLast: boundedLast,
  3944. showLast: showLast,
  3945. functorLast: functorLast,
  3946. applyLast: applyLast,
  3947. applicativeLast: applicativeLast,
  3948. bindLast: bindLast,
  3949. monadLast: monadLast,
  3950. semigroupLast: semigroupLast
  3951. };
  3952. },{"../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) {
  3953. // Generated by purs version 0.13.6
  3954. "use strict";
  3955. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  3956. var Data_Function = require("../Data.Function/index.js");
  3957. var Data_Functor = require("../Data.Functor/index.js");
  3958. var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js");
  3959. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  3960. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  3961. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  3962. var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
  3963. var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
  3964. var Data_Semigroup_First = require("../Data.Semigroup.First/index.js");
  3965. var Data_Semigroup_Last = require("../Data.Semigroup.Last/index.js");
  3966. var Newtype = function Newtype(unwrap, wrap) {
  3967. this.unwrap = unwrap;
  3968. this.wrap = wrap;
  3969. };
  3970. var wrap = function wrap(dict) {
  3971. return dict.wrap;
  3972. };
  3973. var unwrap = function unwrap(dict) {
  3974. return dict.unwrap;
  3975. };
  3976. var underF2 = function underF2(dictFunctor) {
  3977. return function (dictFunctor1) {
  3978. return function (dictNewtype) {
  3979. return function (dictNewtype1) {
  3980. return function (v) {
  3981. return function (f) {
  3982. var $66 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(Data_Functor.map(dictFunctor1)(unwrap(dictNewtype1)));
  3983. var $67 = Data_Function.on(f)(Data_Functor.map(dictFunctor)(wrap(dictNewtype)));
  3984. return function ($68) {
  3985. return $66($67($68));
  3986. };
  3987. };
  3988. };
  3989. };
  3990. };
  3991. };
  3992. };
  3993. var underF = function underF(dictFunctor) {
  3994. return function (dictFunctor1) {
  3995. return function (dictNewtype) {
  3996. return function (dictNewtype1) {
  3997. return function (v) {
  3998. return function (f) {
  3999. var $69 = Data_Functor.map(dictFunctor1)(unwrap(dictNewtype1));
  4000. var $70 = Data_Functor.map(dictFunctor)(wrap(dictNewtype));
  4001. return function ($71) {
  4002. return $69(f($70($71)));
  4003. };
  4004. };
  4005. };
  4006. };
  4007. };
  4008. };
  4009. };
  4010. var under2 = function under2(dictNewtype) {
  4011. return function (dictNewtype1) {
  4012. return function (v) {
  4013. return function (f) {
  4014. var $72 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(unwrap(dictNewtype1));
  4015. var $73 = Data_Function.on(f)(wrap(dictNewtype));
  4016. return function ($74) {
  4017. return $72($73($74));
  4018. };
  4019. };
  4020. };
  4021. };
  4022. };
  4023. var under = function under(dictNewtype) {
  4024. return function (dictNewtype1) {
  4025. return function (v) {
  4026. return function (f) {
  4027. var $75 = unwrap(dictNewtype1);
  4028. var $76 = wrap(dictNewtype);
  4029. return function ($77) {
  4030. return $75(f($76($77)));
  4031. };
  4032. };
  4033. };
  4034. };
  4035. };
  4036. var un = function un(dictNewtype) {
  4037. return function (v) {
  4038. return unwrap(dictNewtype);
  4039. };
  4040. };
  4041. var traverse = function traverse(dictFunctor) {
  4042. return function (dictNewtype) {
  4043. return function (v) {
  4044. return function (f) {
  4045. var $78 = Data_Functor.map(dictFunctor)(wrap(dictNewtype));
  4046. var $79 = unwrap(dictNewtype);
  4047. return function ($80) {
  4048. return $78(f($79($80)));
  4049. };
  4050. };
  4051. };
  4052. };
  4053. };
  4054. var overF2 = function overF2(dictFunctor) {
  4055. return function (dictFunctor1) {
  4056. return function (dictNewtype) {
  4057. return function (dictNewtype1) {
  4058. return function (v) {
  4059. return function (f) {
  4060. var $81 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(Data_Functor.map(dictFunctor1)(wrap(dictNewtype1)));
  4061. var $82 = Data_Function.on(f)(Data_Functor.map(dictFunctor)(unwrap(dictNewtype)));
  4062. return function ($83) {
  4063. return $81($82($83));
  4064. };
  4065. };
  4066. };
  4067. };
  4068. };
  4069. };
  4070. };
  4071. var overF = function overF(dictFunctor) {
  4072. return function (dictFunctor1) {
  4073. return function (dictNewtype) {
  4074. return function (dictNewtype1) {
  4075. return function (v) {
  4076. return function (f) {
  4077. var $84 = Data_Functor.map(dictFunctor1)(wrap(dictNewtype1));
  4078. var $85 = Data_Functor.map(dictFunctor)(unwrap(dictNewtype));
  4079. return function ($86) {
  4080. return $84(f($85($86)));
  4081. };
  4082. };
  4083. };
  4084. };
  4085. };
  4086. };
  4087. };
  4088. var over2 = function over2(dictNewtype) {
  4089. return function (dictNewtype1) {
  4090. return function (v) {
  4091. return function (f) {
  4092. var $87 = Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn)(wrap(dictNewtype1));
  4093. var $88 = Data_Function.on(f)(unwrap(dictNewtype));
  4094. return function ($89) {
  4095. return $87($88($89));
  4096. };
  4097. };
  4098. };
  4099. };
  4100. };
  4101. var over = function over(dictNewtype) {
  4102. return function (dictNewtype1) {
  4103. return function (v) {
  4104. return function (f) {
  4105. var $90 = wrap(dictNewtype1);
  4106. var $91 = unwrap(dictNewtype);
  4107. return function ($92) {
  4108. return $90(f($91($92)));
  4109. };
  4110. };
  4111. };
  4112. };
  4113. };
  4114. var op = function op(dictNewtype) {
  4115. return un(dictNewtype);
  4116. };
  4117. var newtypeMultiplicative = new Newtype(function (v) {
  4118. return v;
  4119. }, Data_Monoid_Multiplicative.Multiplicative);
  4120. var newtypeLast = new Newtype(function (v) {
  4121. return v;
  4122. }, Data_Semigroup_Last.Last);
  4123. var newtypeFirst = new Newtype(function (v) {
  4124. return v;
  4125. }, Data_Semigroup_First.First);
  4126. var newtypeEndo = new Newtype(function (v) {
  4127. return v;
  4128. }, Data_Monoid_Endo.Endo);
  4129. var newtypeDual = new Newtype(function (v) {
  4130. return v;
  4131. }, Data_Monoid_Dual.Dual);
  4132. var newtypeDisj = new Newtype(function (v) {
  4133. return v;
  4134. }, Data_Monoid_Disj.Disj);
  4135. var newtypeConj = new Newtype(function (v) {
  4136. return v;
  4137. }, Data_Monoid_Conj.Conj);
  4138. var newtypeAdditive = new Newtype(function (v) {
  4139. return v;
  4140. }, Data_Monoid_Additive.Additive);
  4141. var collect = function collect(dictFunctor) {
  4142. return function (dictNewtype) {
  4143. return function (v) {
  4144. return function (f) {
  4145. var $93 = wrap(dictNewtype);
  4146. var $94 = Data_Functor.map(dictFunctor)(unwrap(dictNewtype));
  4147. return function ($95) {
  4148. return $93(f($94($95)));
  4149. };
  4150. };
  4151. };
  4152. };
  4153. };
  4154. var alaF = function alaF(dictFunctor) {
  4155. return function (dictFunctor1) {
  4156. return function (dictNewtype) {
  4157. return function (dictNewtype1) {
  4158. return function (v) {
  4159. return function (f) {
  4160. var $96 = Data_Functor.map(dictFunctor1)(unwrap(dictNewtype1));
  4161. var $97 = Data_Functor.map(dictFunctor)(wrap(dictNewtype));
  4162. return function ($98) {
  4163. return $96(f($97($98)));
  4164. };
  4165. };
  4166. };
  4167. };
  4168. };
  4169. };
  4170. };
  4171. var ala = function ala(dictFunctor) {
  4172. return function (dictNewtype) {
  4173. return function (dictNewtype1) {
  4174. return function (v) {
  4175. return function (f) {
  4176. return Data_Functor.map(dictFunctor)(unwrap(dictNewtype))(f(wrap(dictNewtype1)));
  4177. };
  4178. };
  4179. };
  4180. };
  4181. };
  4182. module.exports = {
  4183. unwrap: unwrap,
  4184. wrap: wrap,
  4185. Newtype: Newtype,
  4186. un: un,
  4187. op: op,
  4188. ala: ala,
  4189. alaF: alaF,
  4190. over: over,
  4191. overF: overF,
  4192. under: under,
  4193. underF: underF,
  4194. over2: over2,
  4195. overF2: overF2,
  4196. under2: under2,
  4197. underF2: underF2,
  4198. traverse: traverse,
  4199. collect: collect,
  4200. newtypeAdditive: newtypeAdditive,
  4201. newtypeMultiplicative: newtypeMultiplicative,
  4202. newtypeConj: newtypeConj,
  4203. newtypeDisj: newtypeDisj,
  4204. newtypeDual: newtypeDual,
  4205. newtypeEndo: newtypeEndo,
  4206. newtypeFirst: newtypeFirst,
  4207. newtypeLast: newtypeLast
  4208. };
  4209. },{"../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) {
  4210. // Generated by purs version 0.13.6
  4211. "use strict";
  4212. var $foreign = require("./foreign.js");
  4213. var Control_Alt = require("../Control.Alt/index.js");
  4214. var Control_Applicative = require("../Control.Applicative/index.js");
  4215. var Control_Apply = require("../Control.Apply/index.js");
  4216. var Control_Bind = require("../Control.Bind/index.js");
  4217. var Control_Category = require("../Control.Category/index.js");
  4218. var Control_Plus = require("../Control.Plus/index.js");
  4219. var Data_Eq = require("../Data.Eq/index.js");
  4220. var Data_Function = require("../Data.Function/index.js");
  4221. var Data_Functor = require("../Data.Functor/index.js");
  4222. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  4223. var Data_Maybe = require("../Data.Maybe/index.js");
  4224. var Data_Monoid = require("../Data.Monoid/index.js");
  4225. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  4226. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  4227. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  4228. var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
  4229. var Data_Newtype = require("../Data.Newtype/index.js");
  4230. var Data_Ord = require("../Data.Ord/index.js");
  4231. var Data_Ordering = require("../Data.Ordering/index.js");
  4232. var Data_Semigroup = require("../Data.Semigroup/index.js");
  4233. var Data_Semiring = require("../Data.Semiring/index.js");
  4234. var Data_Unit = require("../Data.Unit/index.js");
  4235. var Foldable = function Foldable(foldMap, foldl, foldr) {
  4236. this.foldMap = foldMap;
  4237. this.foldl = foldl;
  4238. this.foldr = foldr;
  4239. };
  4240. var foldr = function foldr(dict) {
  4241. return dict.foldr;
  4242. };
  4243. var indexr = function indexr(dictFoldable) {
  4244. return function (idx) {
  4245. var go = function go(a) {
  4246. return function (cursor) {
  4247. if (cursor.elem instanceof Data_Maybe.Just) {
  4248. return cursor;
  4249. }
  4250. ;
  4251. var $106 = cursor.pos === idx;
  4252. if ($106) {
  4253. return {
  4254. elem: new Data_Maybe.Just(a),
  4255. pos: cursor.pos
  4256. };
  4257. }
  4258. ;
  4259. return {
  4260. pos: cursor.pos + 1 | 0,
  4261. elem: cursor.elem
  4262. };
  4263. };
  4264. };
  4265. var $193 = foldr(dictFoldable)(go)({
  4266. elem: Data_Maybe.Nothing.value,
  4267. pos: 0
  4268. });
  4269. return function ($194) {
  4270. return function (v) {
  4271. return v.elem;
  4272. }($193($194));
  4273. };
  4274. };
  4275. };
  4276. var $$null = function $$null(dictFoldable) {
  4277. return foldr(dictFoldable)(function (v) {
  4278. return function (v1) {
  4279. return false;
  4280. };
  4281. })(true);
  4282. };
  4283. var oneOf = function oneOf(dictFoldable) {
  4284. return function (dictPlus) {
  4285. return foldr(dictFoldable)(Control_Alt.alt(dictPlus.Alt0()))(Control_Plus.empty(dictPlus));
  4286. };
  4287. };
  4288. var oneOfMap = function oneOfMap(dictFoldable) {
  4289. return function (dictPlus) {
  4290. return function (f) {
  4291. return foldr(dictFoldable)(function () {
  4292. var $195 = Control_Alt.alt(dictPlus.Alt0());
  4293. return function ($196) {
  4294. return $195(f($196));
  4295. };
  4296. }())(Control_Plus.empty(dictPlus));
  4297. };
  4298. };
  4299. };
  4300. var traverse_ = function traverse_(dictApplicative) {
  4301. return function (dictFoldable) {
  4302. return function (f) {
  4303. return foldr(dictFoldable)(function () {
  4304. var $197 = Control_Apply.applySecond(dictApplicative.Apply0());
  4305. return function ($198) {
  4306. return $197(f($198));
  4307. };
  4308. }())(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
  4309. };
  4310. };
  4311. };
  4312. var for_ = function for_(dictApplicative) {
  4313. return function (dictFoldable) {
  4314. return Data_Function.flip(traverse_(dictApplicative)(dictFoldable));
  4315. };
  4316. };
  4317. var sequence_ = function sequence_(dictApplicative) {
  4318. return function (dictFoldable) {
  4319. return traverse_(dictApplicative)(dictFoldable)(Control_Category.identity(Control_Category.categoryFn));
  4320. };
  4321. };
  4322. var foldl = function foldl(dict) {
  4323. return dict.foldl;
  4324. };
  4325. var indexl = function indexl(dictFoldable) {
  4326. return function (idx) {
  4327. var go = function go(cursor) {
  4328. return function (a) {
  4329. if (cursor.elem instanceof Data_Maybe.Just) {
  4330. return cursor;
  4331. }
  4332. ;
  4333. var $109 = cursor.pos === idx;
  4334. if ($109) {
  4335. return {
  4336. elem: new Data_Maybe.Just(a),
  4337. pos: cursor.pos
  4338. };
  4339. }
  4340. ;
  4341. return {
  4342. pos: cursor.pos + 1 | 0,
  4343. elem: cursor.elem
  4344. };
  4345. };
  4346. };
  4347. var $199 = foldl(dictFoldable)(go)({
  4348. elem: Data_Maybe.Nothing.value,
  4349. pos: 0
  4350. });
  4351. return function ($200) {
  4352. return function (v) {
  4353. return v.elem;
  4354. }($199($200));
  4355. };
  4356. };
  4357. };
  4358. var intercalate = function intercalate(dictFoldable) {
  4359. return function (dictMonoid) {
  4360. return function (sep) {
  4361. return function (xs) {
  4362. var go = function go(v) {
  4363. return function (x) {
  4364. if (v.init) {
  4365. return {
  4366. init: false,
  4367. acc: x
  4368. };
  4369. }
  4370. ;
  4371. return {
  4372. init: false,
  4373. acc: Data_Semigroup.append(dictMonoid.Semigroup0())(v.acc)(Data_Semigroup.append(dictMonoid.Semigroup0())(sep)(x))
  4374. };
  4375. };
  4376. };
  4377. return foldl(dictFoldable)(go)({
  4378. init: true,
  4379. acc: Data_Monoid.mempty(dictMonoid)
  4380. })(xs).acc;
  4381. };
  4382. };
  4383. };
  4384. };
  4385. var length = function length(dictFoldable) {
  4386. return function (dictSemiring) {
  4387. return foldl(dictFoldable)(function (c) {
  4388. return function (v) {
  4389. return Data_Semiring.add(dictSemiring)(Data_Semiring.one(dictSemiring))(c);
  4390. };
  4391. })(Data_Semiring.zero(dictSemiring));
  4392. };
  4393. };
  4394. var maximumBy = function maximumBy(dictFoldable) {
  4395. return function (cmp) {
  4396. var max$prime = function max$prime(v) {
  4397. return function (v1) {
  4398. if (v instanceof Data_Maybe.Nothing) {
  4399. return new Data_Maybe.Just(v1);
  4400. }
  4401. ;
  4402. if (v instanceof Data_Maybe.Just) {
  4403. return new Data_Maybe.Just(function () {
  4404. var $116 = Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v1))(Data_Ordering.GT.value);
  4405. if ($116) {
  4406. return v.value0;
  4407. }
  4408. ;
  4409. return v1;
  4410. }());
  4411. }
  4412. ;
  4413. throw new Error("Failed pattern match at Data.Foldable (line 389, column 3 - line 389, column 27): " + [v.constructor.name, v1.constructor.name]);
  4414. };
  4415. };
  4416. return foldl(dictFoldable)(max$prime)(Data_Maybe.Nothing.value);
  4417. };
  4418. };
  4419. var maximum = function maximum(dictOrd) {
  4420. return function (dictFoldable) {
  4421. return maximumBy(dictFoldable)(Data_Ord.compare(dictOrd));
  4422. };
  4423. };
  4424. var minimumBy = function minimumBy(dictFoldable) {
  4425. return function (cmp) {
  4426. var min$prime = function min$prime(v) {
  4427. return function (v1) {
  4428. if (v instanceof Data_Maybe.Nothing) {
  4429. return new Data_Maybe.Just(v1);
  4430. }
  4431. ;
  4432. if (v instanceof Data_Maybe.Just) {
  4433. return new Data_Maybe.Just(function () {
  4434. var $120 = Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v1))(Data_Ordering.LT.value);
  4435. if ($120) {
  4436. return v.value0;
  4437. }
  4438. ;
  4439. return v1;
  4440. }());
  4441. }
  4442. ;
  4443. throw new Error("Failed pattern match at Data.Foldable (line 402, column 3 - line 402, column 27): " + [v.constructor.name, v1.constructor.name]);
  4444. };
  4445. };
  4446. return foldl(dictFoldable)(min$prime)(Data_Maybe.Nothing.value);
  4447. };
  4448. };
  4449. var minimum = function minimum(dictOrd) {
  4450. return function (dictFoldable) {
  4451. return minimumBy(dictFoldable)(Data_Ord.compare(dictOrd));
  4452. };
  4453. };
  4454. var product = function product(dictFoldable) {
  4455. return function (dictSemiring) {
  4456. return foldl(dictFoldable)(Data_Semiring.mul(dictSemiring))(Data_Semiring.one(dictSemiring));
  4457. };
  4458. };
  4459. var sum = function sum(dictFoldable) {
  4460. return function (dictSemiring) {
  4461. return foldl(dictFoldable)(Data_Semiring.add(dictSemiring))(Data_Semiring.zero(dictSemiring));
  4462. };
  4463. };
  4464. var foldableMultiplicative = new Foldable(function (dictMonoid) {
  4465. return function (f) {
  4466. return function (v) {
  4467. return f(v);
  4468. };
  4469. };
  4470. }, function (f) {
  4471. return function (z) {
  4472. return function (v) {
  4473. return f(z)(v);
  4474. };
  4475. };
  4476. }, function (f) {
  4477. return function (z) {
  4478. return function (v) {
  4479. return f(v)(z);
  4480. };
  4481. };
  4482. });
  4483. var foldableMaybe = new Foldable(function (dictMonoid) {
  4484. return function (f) {
  4485. return function (v) {
  4486. if (v instanceof Data_Maybe.Nothing) {
  4487. return Data_Monoid.mempty(dictMonoid);
  4488. }
  4489. ;
  4490. if (v instanceof Data_Maybe.Just) {
  4491. return f(v.value0);
  4492. }
  4493. ;
  4494. throw new Error("Failed pattern match at Data.Foldable (line 129, column 1 - line 135, column 27): " + [f.constructor.name, v.constructor.name]);
  4495. };
  4496. };
  4497. }, function (v) {
  4498. return function (z) {
  4499. return function (v1) {
  4500. if (v1 instanceof Data_Maybe.Nothing) {
  4501. return z;
  4502. }
  4503. ;
  4504. if (v1 instanceof Data_Maybe.Just) {
  4505. return v(z)(v1.value0);
  4506. }
  4507. ;
  4508. 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]);
  4509. };
  4510. };
  4511. }, function (v) {
  4512. return function (z) {
  4513. return function (v1) {
  4514. if (v1 instanceof Data_Maybe.Nothing) {
  4515. return z;
  4516. }
  4517. ;
  4518. if (v1 instanceof Data_Maybe.Just) {
  4519. return v(v1.value0)(z);
  4520. }
  4521. ;
  4522. 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]);
  4523. };
  4524. };
  4525. });
  4526. var foldableDual = new Foldable(function (dictMonoid) {
  4527. return function (f) {
  4528. return function (v) {
  4529. return f(v);
  4530. };
  4531. };
  4532. }, function (f) {
  4533. return function (z) {
  4534. return function (v) {
  4535. return f(z)(v);
  4536. };
  4537. };
  4538. }, function (f) {
  4539. return function (z) {
  4540. return function (v) {
  4541. return f(v)(z);
  4542. };
  4543. };
  4544. });
  4545. var foldableDisj = new Foldable(function (dictMonoid) {
  4546. return function (f) {
  4547. return function (v) {
  4548. return f(v);
  4549. };
  4550. };
  4551. }, function (f) {
  4552. return function (z) {
  4553. return function (v) {
  4554. return f(z)(v);
  4555. };
  4556. };
  4557. }, function (f) {
  4558. return function (z) {
  4559. return function (v) {
  4560. return f(v)(z);
  4561. };
  4562. };
  4563. });
  4564. var foldableConj = new Foldable(function (dictMonoid) {
  4565. return function (f) {
  4566. return function (v) {
  4567. return f(v);
  4568. };
  4569. };
  4570. }, function (f) {
  4571. return function (z) {
  4572. return function (v) {
  4573. return f(z)(v);
  4574. };
  4575. };
  4576. }, function (f) {
  4577. return function (z) {
  4578. return function (v) {
  4579. return f(v)(z);
  4580. };
  4581. };
  4582. });
  4583. var foldableAdditive = new Foldable(function (dictMonoid) {
  4584. return function (f) {
  4585. return function (v) {
  4586. return f(v);
  4587. };
  4588. };
  4589. }, function (f) {
  4590. return function (z) {
  4591. return function (v) {
  4592. return f(z)(v);
  4593. };
  4594. };
  4595. }, function (f) {
  4596. return function (z) {
  4597. return function (v) {
  4598. return f(v)(z);
  4599. };
  4600. };
  4601. });
  4602. var foldMapDefaultR = function foldMapDefaultR(dictFoldable) {
  4603. return function (dictMonoid) {
  4604. return function (f) {
  4605. return foldr(dictFoldable)(function (x) {
  4606. return function (acc) {
  4607. return Data_Semigroup.append(dictMonoid.Semigroup0())(f(x))(acc);
  4608. };
  4609. })(Data_Monoid.mempty(dictMonoid));
  4610. };
  4611. };
  4612. };
  4613. var foldableArray = new Foldable(function (dictMonoid) {
  4614. return foldMapDefaultR(foldableArray)(dictMonoid);
  4615. }, $foreign.foldlArray, $foreign.foldrArray);
  4616. var foldMapDefaultL = function foldMapDefaultL(dictFoldable) {
  4617. return function (dictMonoid) {
  4618. return function (f) {
  4619. return foldl(dictFoldable)(function (acc) {
  4620. return function (x) {
  4621. return Data_Semigroup.append(dictMonoid.Semigroup0())(acc)(f(x));
  4622. };
  4623. })(Data_Monoid.mempty(dictMonoid));
  4624. };
  4625. };
  4626. };
  4627. var foldMap = function foldMap(dict) {
  4628. return dict.foldMap;
  4629. };
  4630. var foldableFirst = new Foldable(function (dictMonoid) {
  4631. return function (f) {
  4632. return function (v) {
  4633. return foldMap(foldableMaybe)(dictMonoid)(f)(v);
  4634. };
  4635. };
  4636. }, function (f) {
  4637. return function (z) {
  4638. return function (v) {
  4639. return foldl(foldableMaybe)(f)(z)(v);
  4640. };
  4641. };
  4642. }, function (f) {
  4643. return function (z) {
  4644. return function (v) {
  4645. return foldr(foldableMaybe)(f)(z)(v);
  4646. };
  4647. };
  4648. });
  4649. var foldableLast = new Foldable(function (dictMonoid) {
  4650. return function (f) {
  4651. return function (v) {
  4652. return foldMap(foldableMaybe)(dictMonoid)(f)(v);
  4653. };
  4654. };
  4655. }, function (f) {
  4656. return function (z) {
  4657. return function (v) {
  4658. return foldl(foldableMaybe)(f)(z)(v);
  4659. };
  4660. };
  4661. }, function (f) {
  4662. return function (z) {
  4663. return function (v) {
  4664. return foldr(foldableMaybe)(f)(z)(v);
  4665. };
  4666. };
  4667. });
  4668. var foldlDefault = function foldlDefault(dictFoldable) {
  4669. return function (c) {
  4670. return function (u) {
  4671. return function (xs) {
  4672. 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 () {
  4673. var $201 = Data_Function.flip(c);
  4674. return function ($202) {
  4675. return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($201($202)));
  4676. };
  4677. }())(xs)))(u);
  4678. };
  4679. };
  4680. };
  4681. };
  4682. var foldrDefault = function foldrDefault(dictFoldable) {
  4683. return function (c) {
  4684. return function (u) {
  4685. return function (xs) {
  4686. return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMap(dictFoldable)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(function ($203) {
  4687. return Data_Monoid_Endo.Endo(c($203));
  4688. })(xs))(u);
  4689. };
  4690. };
  4691. };
  4692. };
  4693. var surroundMap = function surroundMap(dictFoldable) {
  4694. return function (dictSemigroup) {
  4695. return function (d) {
  4696. return function (t) {
  4697. return function (f) {
  4698. var joined = function joined(a) {
  4699. return function (m) {
  4700. return Data_Semigroup.append(dictSemigroup)(d)(Data_Semigroup.append(dictSemigroup)(t(a))(m));
  4701. };
  4702. };
  4703. return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMap(dictFoldable)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(joined)(f))(d);
  4704. };
  4705. };
  4706. };
  4707. };
  4708. };
  4709. var surround = function surround(dictFoldable) {
  4710. return function (dictSemigroup) {
  4711. return function (d) {
  4712. return surroundMap(dictFoldable)(dictSemigroup)(d)(Control_Category.identity(Control_Category.categoryFn));
  4713. };
  4714. };
  4715. };
  4716. var foldM = function foldM(dictFoldable) {
  4717. return function (dictMonad) {
  4718. return function (f) {
  4719. return function (a0) {
  4720. return foldl(dictFoldable)(function (ma) {
  4721. return function (b) {
  4722. return Control_Bind.bind(dictMonad.Bind1())(ma)(Data_Function.flip(f)(b));
  4723. };
  4724. })(Control_Applicative.pure(dictMonad.Applicative0())(a0));
  4725. };
  4726. };
  4727. };
  4728. };
  4729. var fold = function fold(dictFoldable) {
  4730. return function (dictMonoid) {
  4731. return foldMap(dictFoldable)(dictMonoid)(Control_Category.identity(Control_Category.categoryFn));
  4732. };
  4733. };
  4734. var findMap = function findMap(dictFoldable) {
  4735. return function (p) {
  4736. var go = function go(v) {
  4737. return function (v1) {
  4738. if (v instanceof Data_Maybe.Nothing) {
  4739. return p(v1);
  4740. }
  4741. ;
  4742. return v;
  4743. };
  4744. };
  4745. return foldl(dictFoldable)(go)(Data_Maybe.Nothing.value);
  4746. };
  4747. };
  4748. var find = function find(dictFoldable) {
  4749. return function (p) {
  4750. var go = function go(v) {
  4751. return function (v1) {
  4752. if (v instanceof Data_Maybe.Nothing && p(v1)) {
  4753. return new Data_Maybe.Just(v1);
  4754. }
  4755. ;
  4756. return v;
  4757. };
  4758. };
  4759. return foldl(dictFoldable)(go)(Data_Maybe.Nothing.value);
  4760. };
  4761. };
  4762. var any = function any(dictFoldable) {
  4763. return function (dictHeytingAlgebra) {
  4764. 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)));
  4765. };
  4766. };
  4767. var elem = function elem(dictFoldable) {
  4768. return function (dictEq) {
  4769. var $204 = any(dictFoldable)(Data_HeytingAlgebra.heytingAlgebraBoolean);
  4770. var $205 = Data_Eq.eq(dictEq);
  4771. return function ($206) {
  4772. return $204($205($206));
  4773. };
  4774. };
  4775. };
  4776. var notElem = function notElem(dictFoldable) {
  4777. return function (dictEq) {
  4778. return function (x) {
  4779. var $207 = Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean);
  4780. var $208 = elem(dictFoldable)(dictEq)(x);
  4781. return function ($209) {
  4782. return $207($208($209));
  4783. };
  4784. };
  4785. };
  4786. };
  4787. var or = function or(dictFoldable) {
  4788. return function (dictHeytingAlgebra) {
  4789. return any(dictFoldable)(dictHeytingAlgebra)(Control_Category.identity(Control_Category.categoryFn));
  4790. };
  4791. };
  4792. var all = function all(dictFoldable) {
  4793. return function (dictHeytingAlgebra) {
  4794. 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)));
  4795. };
  4796. };
  4797. var and = function and(dictFoldable) {
  4798. return function (dictHeytingAlgebra) {
  4799. return all(dictFoldable)(dictHeytingAlgebra)(Control_Category.identity(Control_Category.categoryFn));
  4800. };
  4801. };
  4802. module.exports = {
  4803. Foldable: Foldable,
  4804. foldr: foldr,
  4805. foldl: foldl,
  4806. foldMap: foldMap,
  4807. foldrDefault: foldrDefault,
  4808. foldlDefault: foldlDefault,
  4809. foldMapDefaultL: foldMapDefaultL,
  4810. foldMapDefaultR: foldMapDefaultR,
  4811. fold: fold,
  4812. foldM: foldM,
  4813. traverse_: traverse_,
  4814. for_: for_,
  4815. sequence_: sequence_,
  4816. oneOf: oneOf,
  4817. oneOfMap: oneOfMap,
  4818. intercalate: intercalate,
  4819. surroundMap: surroundMap,
  4820. surround: surround,
  4821. and: and,
  4822. or: or,
  4823. all: all,
  4824. any: any,
  4825. sum: sum,
  4826. product: product,
  4827. elem: elem,
  4828. notElem: notElem,
  4829. indexl: indexl,
  4830. indexr: indexr,
  4831. find: find,
  4832. findMap: findMap,
  4833. maximum: maximum,
  4834. maximumBy: maximumBy,
  4835. minimum: minimum,
  4836. minimumBy: minimumBy,
  4837. "null": $$null,
  4838. length: length,
  4839. foldableArray: foldableArray,
  4840. foldableMaybe: foldableMaybe,
  4841. foldableFirst: foldableFirst,
  4842. foldableLast: foldableLast,
  4843. foldableAdditive: foldableAdditive,
  4844. foldableDual: foldableDual,
  4845. foldableDisj: foldableDisj,
  4846. foldableConj: foldableConj,
  4847. foldableMultiplicative: foldableMultiplicative
  4848. };
  4849. },{"./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) {
  4850. // Generated by purs version 0.13.6
  4851. "use strict";
  4852. var Control_Applicative = require("../Control.Applicative/index.js");
  4853. var Control_Apply = require("../Control.Apply/index.js");
  4854. var Control_Category = require("../Control.Category/index.js");
  4855. var Data_Foldable = require("../Data.Foldable/index.js");
  4856. var Data_Function = require("../Data.Function/index.js");
  4857. var Data_Monoid = require("../Data.Monoid/index.js");
  4858. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  4859. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  4860. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  4861. var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
  4862. var Data_Newtype = require("../Data.Newtype/index.js");
  4863. var Data_Semigroup = require("../Data.Semigroup/index.js");
  4864. var Data_Unit = require("../Data.Unit/index.js");
  4865. var Bifoldable = function Bifoldable(bifoldMap, bifoldl, bifoldr) {
  4866. this.bifoldMap = bifoldMap;
  4867. this.bifoldl = bifoldl;
  4868. this.bifoldr = bifoldr;
  4869. };
  4870. var bifoldr = function bifoldr(dict) {
  4871. return dict.bifoldr;
  4872. };
  4873. var bitraverse_ = function bitraverse_(dictBifoldable) {
  4874. return function (dictApplicative) {
  4875. return function (f) {
  4876. return function (g) {
  4877. return bifoldr(dictBifoldable)(function () {
  4878. var $97 = Control_Apply.applySecond(dictApplicative.Apply0());
  4879. return function ($98) {
  4880. return $97(f($98));
  4881. };
  4882. }())(function () {
  4883. var $99 = Control_Apply.applySecond(dictApplicative.Apply0());
  4884. return function ($100) {
  4885. return $99(g($100));
  4886. };
  4887. }())(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
  4888. };
  4889. };
  4890. };
  4891. };
  4892. var bifor_ = function bifor_(dictBifoldable) {
  4893. return function (dictApplicative) {
  4894. return function (t) {
  4895. return function (f) {
  4896. return function (g) {
  4897. return bitraverse_(dictBifoldable)(dictApplicative)(f)(g)(t);
  4898. };
  4899. };
  4900. };
  4901. };
  4902. };
  4903. var bisequence_ = function bisequence_(dictBifoldable) {
  4904. return function (dictApplicative) {
  4905. return bitraverse_(dictBifoldable)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn));
  4906. };
  4907. };
  4908. var bifoldl = function bifoldl(dict) {
  4909. return dict.bifoldl;
  4910. };
  4911. var bifoldableJoker = function bifoldableJoker(dictFoldable) {
  4912. return new Bifoldable(function (dictMonoid) {
  4913. return function (v) {
  4914. return function (r) {
  4915. return function (v1) {
  4916. return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(r)(v1);
  4917. };
  4918. };
  4919. };
  4920. }, function (v) {
  4921. return function (r) {
  4922. return function (u) {
  4923. return function (v1) {
  4924. return Data_Foldable.foldl(dictFoldable)(r)(u)(v1);
  4925. };
  4926. };
  4927. };
  4928. }, function (v) {
  4929. return function (r) {
  4930. return function (u) {
  4931. return function (v1) {
  4932. return Data_Foldable.foldr(dictFoldable)(r)(u)(v1);
  4933. };
  4934. };
  4935. };
  4936. });
  4937. };
  4938. var bifoldableClown = function bifoldableClown(dictFoldable) {
  4939. return new Bifoldable(function (dictMonoid) {
  4940. return function (l) {
  4941. return function (v) {
  4942. return function (v1) {
  4943. return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(l)(v1);
  4944. };
  4945. };
  4946. };
  4947. }, function (l) {
  4948. return function (v) {
  4949. return function (u) {
  4950. return function (v1) {
  4951. return Data_Foldable.foldl(dictFoldable)(l)(u)(v1);
  4952. };
  4953. };
  4954. };
  4955. }, function (l) {
  4956. return function (v) {
  4957. return function (u) {
  4958. return function (v1) {
  4959. return Data_Foldable.foldr(dictFoldable)(l)(u)(v1);
  4960. };
  4961. };
  4962. };
  4963. });
  4964. };
  4965. var bifoldMapDefaultR = function bifoldMapDefaultR(dictBifoldable) {
  4966. return function (dictMonoid) {
  4967. return function (f) {
  4968. return function (g) {
  4969. return bifoldr(dictBifoldable)(function () {
  4970. var $101 = Data_Semigroup.append(dictMonoid.Semigroup0());
  4971. return function ($102) {
  4972. return $101(f($102));
  4973. };
  4974. }())(function () {
  4975. var $103 = Data_Semigroup.append(dictMonoid.Semigroup0());
  4976. return function ($104) {
  4977. return $103(g($104));
  4978. };
  4979. }())(Data_Monoid.mempty(dictMonoid));
  4980. };
  4981. };
  4982. };
  4983. };
  4984. var bifoldMapDefaultL = function bifoldMapDefaultL(dictBifoldable) {
  4985. return function (dictMonoid) {
  4986. return function (f) {
  4987. return function (g) {
  4988. return bifoldl(dictBifoldable)(function (m) {
  4989. return function (a) {
  4990. return Data_Semigroup.append(dictMonoid.Semigroup0())(m)(f(a));
  4991. };
  4992. })(function (m) {
  4993. return function (b) {
  4994. return Data_Semigroup.append(dictMonoid.Semigroup0())(m)(g(b));
  4995. };
  4996. })(Data_Monoid.mempty(dictMonoid));
  4997. };
  4998. };
  4999. };
  5000. };
  5001. var bifoldMap = function bifoldMap(dict) {
  5002. return dict.bifoldMap;
  5003. };
  5004. var bifoldableFlip = function bifoldableFlip(dictBifoldable) {
  5005. return new Bifoldable(function (dictMonoid) {
  5006. return function (r) {
  5007. return function (l) {
  5008. return function (v) {
  5009. return bifoldMap(dictBifoldable)(dictMonoid)(l)(r)(v);
  5010. };
  5011. };
  5012. };
  5013. }, function (r) {
  5014. return function (l) {
  5015. return function (u) {
  5016. return function (v) {
  5017. return bifoldl(dictBifoldable)(l)(r)(u)(v);
  5018. };
  5019. };
  5020. };
  5021. }, function (r) {
  5022. return function (l) {
  5023. return function (u) {
  5024. return function (v) {
  5025. return bifoldr(dictBifoldable)(l)(r)(u)(v);
  5026. };
  5027. };
  5028. };
  5029. });
  5030. };
  5031. var bifoldableWrap = function bifoldableWrap(dictBifoldable) {
  5032. return new Bifoldable(function (dictMonoid) {
  5033. return function (l) {
  5034. return function (r) {
  5035. return function (v) {
  5036. return bifoldMap(dictBifoldable)(dictMonoid)(l)(r)(v);
  5037. };
  5038. };
  5039. };
  5040. }, function (l) {
  5041. return function (r) {
  5042. return function (u) {
  5043. return function (v) {
  5044. return bifoldl(dictBifoldable)(l)(r)(u)(v);
  5045. };
  5046. };
  5047. };
  5048. }, function (l) {
  5049. return function (r) {
  5050. return function (u) {
  5051. return function (v) {
  5052. return bifoldr(dictBifoldable)(l)(r)(u)(v);
  5053. };
  5054. };
  5055. };
  5056. });
  5057. };
  5058. var bifoldlDefault = function bifoldlDefault(dictBifoldable) {
  5059. return function (f) {
  5060. return function (g) {
  5061. return function (z) {
  5062. return function (p) {
  5063. 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 () {
  5064. var $105 = Data_Function.flip(f);
  5065. return function ($106) {
  5066. return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($105($106)));
  5067. };
  5068. }())(function () {
  5069. var $107 = Data_Function.flip(g);
  5070. return function ($108) {
  5071. return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($107($108)));
  5072. };
  5073. }())(p)))(z);
  5074. };
  5075. };
  5076. };
  5077. };
  5078. };
  5079. var bifoldrDefault = function bifoldrDefault(dictBifoldable) {
  5080. return function (f) {
  5081. return function (g) {
  5082. return function (z) {
  5083. return function (p) {
  5084. return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(bifoldMap(dictBifoldable)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(function ($109) {
  5085. return Data_Monoid_Endo.Endo(f($109));
  5086. })(function ($110) {
  5087. return Data_Monoid_Endo.Endo(g($110));
  5088. })(p))(z);
  5089. };
  5090. };
  5091. };
  5092. };
  5093. };
  5094. var bifoldableProduct = function bifoldableProduct(dictBifoldable) {
  5095. return function (dictBifoldable1) {
  5096. return new Bifoldable(function (dictMonoid) {
  5097. return function (l) {
  5098. return function (r) {
  5099. return function (v) {
  5100. return Data_Semigroup.append(dictMonoid.Semigroup0())(bifoldMap(dictBifoldable)(dictMonoid)(l)(r)(v.value0))(bifoldMap(dictBifoldable1)(dictMonoid)(l)(r)(v.value1));
  5101. };
  5102. };
  5103. };
  5104. }, function (l) {
  5105. return function (r) {
  5106. return function (u) {
  5107. return function (m) {
  5108. return bifoldlDefault(bifoldableProduct(dictBifoldable)(dictBifoldable1))(l)(r)(u)(m);
  5109. };
  5110. };
  5111. };
  5112. }, function (l) {
  5113. return function (r) {
  5114. return function (u) {
  5115. return function (m) {
  5116. return bifoldrDefault(bifoldableProduct(dictBifoldable)(dictBifoldable1))(l)(r)(u)(m);
  5117. };
  5118. };
  5119. };
  5120. });
  5121. };
  5122. };
  5123. var bifold = function bifold(dictBifoldable) {
  5124. return function (dictMonoid) {
  5125. return bifoldMap(dictBifoldable)(dictMonoid)(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn));
  5126. };
  5127. };
  5128. var biany = function biany(dictBifoldable) {
  5129. return function (dictBooleanAlgebra) {
  5130. return function (p) {
  5131. return function (q) {
  5132. var $111 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
  5133. var $112 = bifoldMap(dictBifoldable)(Data_Monoid_Disj.monoidDisj(dictBooleanAlgebra.HeytingAlgebra0()))(function ($114) {
  5134. return Data_Monoid_Disj.Disj(p($114));
  5135. })(function ($115) {
  5136. return Data_Monoid_Disj.Disj(q($115));
  5137. });
  5138. return function ($113) {
  5139. return $111($112($113));
  5140. };
  5141. };
  5142. };
  5143. };
  5144. };
  5145. var biall = function biall(dictBifoldable) {
  5146. return function (dictBooleanAlgebra) {
  5147. return function (p) {
  5148. return function (q) {
  5149. var $116 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
  5150. var $117 = bifoldMap(dictBifoldable)(Data_Monoid_Conj.monoidConj(dictBooleanAlgebra.HeytingAlgebra0()))(function ($119) {
  5151. return Data_Monoid_Conj.Conj(p($119));
  5152. })(function ($120) {
  5153. return Data_Monoid_Conj.Conj(q($120));
  5154. });
  5155. return function ($118) {
  5156. return $116($117($118));
  5157. };
  5158. };
  5159. };
  5160. };
  5161. };
  5162. module.exports = {
  5163. bifoldMap: bifoldMap,
  5164. bifoldl: bifoldl,
  5165. bifoldr: bifoldr,
  5166. Bifoldable: Bifoldable,
  5167. bifoldrDefault: bifoldrDefault,
  5168. bifoldlDefault: bifoldlDefault,
  5169. bifoldMapDefaultR: bifoldMapDefaultR,
  5170. bifoldMapDefaultL: bifoldMapDefaultL,
  5171. bifold: bifold,
  5172. bitraverse_: bitraverse_,
  5173. bifor_: bifor_,
  5174. bisequence_: bisequence_,
  5175. biany: biany,
  5176. biall: biall,
  5177. bifoldableClown: bifoldableClown,
  5178. bifoldableJoker: bifoldableJoker,
  5179. bifoldableFlip: bifoldableFlip,
  5180. bifoldableProduct: bifoldableProduct,
  5181. bifoldableWrap: bifoldableWrap
  5182. };
  5183. },{"../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) {
  5184. // Generated by purs version 0.13.6
  5185. "use strict";
  5186. var Control_Category = require("../Control.Category/index.js");
  5187. var Bifunctor = function Bifunctor(bimap) {
  5188. this.bimap = bimap;
  5189. };
  5190. var bimap = function bimap(dict) {
  5191. return dict.bimap;
  5192. };
  5193. var lmap = function lmap(dictBifunctor) {
  5194. return function (f) {
  5195. return bimap(dictBifunctor)(f)(Control_Category.identity(Control_Category.categoryFn));
  5196. };
  5197. };
  5198. var rmap = function rmap(dictBifunctor) {
  5199. return bimap(dictBifunctor)(Control_Category.identity(Control_Category.categoryFn));
  5200. };
  5201. module.exports = {
  5202. bimap: bimap,
  5203. Bifunctor: Bifunctor,
  5204. lmap: lmap,
  5205. rmap: rmap
  5206. };
  5207. },{"../Control.Category/index.js":"../output/Control.Category/index.js"}],"../output/Control.Biapplicative/index.js":[function(require,module,exports) {
  5208. // Generated by purs version 0.13.6
  5209. "use strict";
  5210. var Biapplicative = function Biapplicative(Biapply0, bipure) {
  5211. this.Biapply0 = Biapply0;
  5212. this.bipure = bipure;
  5213. };
  5214. var bipure = function bipure(dict) {
  5215. return dict.bipure;
  5216. };
  5217. module.exports = {
  5218. bipure: bipure,
  5219. Biapplicative: Biapplicative
  5220. };
  5221. },{}],"../output/Control.Biapply/index.js":[function(require,module,exports) {
  5222. // Generated by purs version 0.13.6
  5223. "use strict";
  5224. var Control_Category = require("../Control.Category/index.js");
  5225. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  5226. var Data_Function = require("../Data.Function/index.js");
  5227. var Biapply = function Biapply(Bifunctor0, biapply) {
  5228. this.Bifunctor0 = Bifunctor0;
  5229. this.biapply = biapply;
  5230. };
  5231. var biapply = function biapply(dict) {
  5232. return dict.biapply;
  5233. };
  5234. var biapplyFirst = function biapplyFirst(dictBiapply) {
  5235. return function (a) {
  5236. return function (b) {
  5237. 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);
  5238. };
  5239. };
  5240. };
  5241. var biapplySecond = function biapplySecond(dictBiapply) {
  5242. return function (a) {
  5243. return function (b) {
  5244. return biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(Data_Function["const"])(Data_Function["const"]))(a))(b);
  5245. };
  5246. };
  5247. };
  5248. var bilift2 = function bilift2(dictBiapply) {
  5249. return function (f) {
  5250. return function (g) {
  5251. return function (a) {
  5252. return function (b) {
  5253. return biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(f)(g))(a))(b);
  5254. };
  5255. };
  5256. };
  5257. };
  5258. };
  5259. var bilift3 = function bilift3(dictBiapply) {
  5260. return function (f) {
  5261. return function (g) {
  5262. return function (a) {
  5263. return function (b) {
  5264. return function (c) {
  5265. return biapply(dictBiapply)(biapply(dictBiapply)(Control_Category.identity(Control_Category.categoryFn)(Data_Bifunctor.bimap(dictBiapply.Bifunctor0())(f)(g))(a))(b))(c);
  5266. };
  5267. };
  5268. };
  5269. };
  5270. };
  5271. };
  5272. module.exports = {
  5273. biapply: biapply,
  5274. Biapply: Biapply,
  5275. biapplyFirst: biapplyFirst,
  5276. biapplySecond: biapplySecond,
  5277. bilift2: bilift2,
  5278. bilift3: bilift3
  5279. };
  5280. },{"../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) {
  5281. // Generated by purs version 0.13.6
  5282. "use strict";
  5283. var Control_Applicative = require("../Control.Applicative/index.js");
  5284. var Control_Apply = require("../Control.Apply/index.js");
  5285. var Control_Biapplicative = require("../Control.Biapplicative/index.js");
  5286. var Control_Biapply = require("../Control.Biapply/index.js");
  5287. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  5288. var Data_Functor = require("../Data.Functor/index.js");
  5289. var Data_Newtype = require("../Data.Newtype/index.js");
  5290. var Data_Show = require("../Data.Show/index.js");
  5291. var Clown = function Clown(x) {
  5292. return x;
  5293. };
  5294. var showClown = function showClown(dictShow) {
  5295. return new Data_Show.Show(function (v) {
  5296. return "(Clown " + (Data_Show.show(dictShow)(v) + ")");
  5297. });
  5298. };
  5299. var ordClown = function ordClown(dictOrd) {
  5300. return dictOrd;
  5301. };
  5302. var newtypeClown = new Data_Newtype.Newtype(function (n) {
  5303. return n;
  5304. }, Clown);
  5305. var functorClown = new Data_Functor.Functor(function (v) {
  5306. return function (v1) {
  5307. return v1;
  5308. };
  5309. });
  5310. var eqClown = function eqClown(dictEq) {
  5311. return dictEq;
  5312. };
  5313. var bifunctorClown = function bifunctorClown(dictFunctor) {
  5314. return new Data_Bifunctor.Bifunctor(function (f) {
  5315. return function (v) {
  5316. return function (v1) {
  5317. return Data_Functor.map(dictFunctor)(f)(v1);
  5318. };
  5319. };
  5320. });
  5321. };
  5322. var biapplyClown = function biapplyClown(dictApply) {
  5323. return new Control_Biapply.Biapply(function () {
  5324. return bifunctorClown(dictApply.Functor0());
  5325. }, function (v) {
  5326. return function (v1) {
  5327. return Control_Apply.apply(dictApply)(v)(v1);
  5328. };
  5329. });
  5330. };
  5331. var biapplicativeClown = function biapplicativeClown(dictApplicative) {
  5332. return new Control_Biapplicative.Biapplicative(function () {
  5333. return biapplyClown(dictApplicative.Apply0());
  5334. }, function (a) {
  5335. return function (v) {
  5336. return Control_Applicative.pure(dictApplicative)(a);
  5337. };
  5338. });
  5339. };
  5340. module.exports = {
  5341. Clown: Clown,
  5342. newtypeClown: newtypeClown,
  5343. eqClown: eqClown,
  5344. ordClown: ordClown,
  5345. showClown: showClown,
  5346. functorClown: functorClown,
  5347. bifunctorClown: bifunctorClown,
  5348. biapplyClown: biapplyClown,
  5349. biapplicativeClown: biapplicativeClown
  5350. };
  5351. },{"../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) {
  5352. // Generated by purs version 0.13.6
  5353. "use strict";
  5354. var Control_Biapplicative = require("../Control.Biapplicative/index.js");
  5355. var Control_Biapply = require("../Control.Biapply/index.js");
  5356. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  5357. var Data_Functor = require("../Data.Functor/index.js");
  5358. var Data_Newtype = require("../Data.Newtype/index.js");
  5359. var Data_Show = require("../Data.Show/index.js");
  5360. var Flip = function Flip(x) {
  5361. return x;
  5362. };
  5363. var showFlip = function showFlip(dictShow) {
  5364. return new Data_Show.Show(function (v) {
  5365. return "(Flip " + (Data_Show.show(dictShow)(v) + ")");
  5366. });
  5367. };
  5368. var ordFlip = function ordFlip(dictOrd) {
  5369. return dictOrd;
  5370. };
  5371. var newtypeFlip = new Data_Newtype.Newtype(function (n) {
  5372. return n;
  5373. }, Flip);
  5374. var functorFlip = function functorFlip(dictBifunctor) {
  5375. return new Data_Functor.Functor(function (f) {
  5376. return function (v) {
  5377. return Data_Bifunctor.lmap(dictBifunctor)(f)(v);
  5378. };
  5379. });
  5380. };
  5381. var eqFlip = function eqFlip(dictEq) {
  5382. return dictEq;
  5383. };
  5384. var bifunctorFlip = function bifunctorFlip(dictBifunctor) {
  5385. return new Data_Bifunctor.Bifunctor(function (f) {
  5386. return function (g) {
  5387. return function (v) {
  5388. return Data_Bifunctor.bimap(dictBifunctor)(g)(f)(v);
  5389. };
  5390. };
  5391. });
  5392. };
  5393. var biapplyFlip = function biapplyFlip(dictBiapply) {
  5394. return new Control_Biapply.Biapply(function () {
  5395. return bifunctorFlip(dictBiapply.Bifunctor0());
  5396. }, function (v) {
  5397. return function (v1) {
  5398. return Control_Biapply.biapply(dictBiapply)(v)(v1);
  5399. };
  5400. });
  5401. };
  5402. var biapplicativeFlip = function biapplicativeFlip(dictBiapplicative) {
  5403. return new Control_Biapplicative.Biapplicative(function () {
  5404. return biapplyFlip(dictBiapplicative.Biapply0());
  5405. }, function (a) {
  5406. return function (b) {
  5407. return Control_Biapplicative.bipure(dictBiapplicative)(b)(a);
  5408. };
  5409. });
  5410. };
  5411. module.exports = {
  5412. Flip: Flip,
  5413. newtypeFlip: newtypeFlip,
  5414. eqFlip: eqFlip,
  5415. ordFlip: ordFlip,
  5416. showFlip: showFlip,
  5417. functorFlip: functorFlip,
  5418. bifunctorFlip: bifunctorFlip,
  5419. biapplyFlip: biapplyFlip,
  5420. biapplicativeFlip: biapplicativeFlip
  5421. };
  5422. },{"../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) {
  5423. // Generated by purs version 0.13.6
  5424. "use strict";
  5425. var Control_Applicative = require("../Control.Applicative/index.js");
  5426. var Control_Apply = require("../Control.Apply/index.js");
  5427. var Control_Biapplicative = require("../Control.Biapplicative/index.js");
  5428. var Control_Biapply = require("../Control.Biapply/index.js");
  5429. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  5430. var Data_Functor = require("../Data.Functor/index.js");
  5431. var Data_Newtype = require("../Data.Newtype/index.js");
  5432. var Data_Show = require("../Data.Show/index.js");
  5433. var Joker = function Joker(x) {
  5434. return x;
  5435. };
  5436. var showJoker = function showJoker(dictShow) {
  5437. return new Data_Show.Show(function (v) {
  5438. return "(Joker " + (Data_Show.show(dictShow)(v) + ")");
  5439. });
  5440. };
  5441. var ordJoker = function ordJoker(dictOrd) {
  5442. return dictOrd;
  5443. };
  5444. var newtypeJoker = new Data_Newtype.Newtype(function (n) {
  5445. return n;
  5446. }, Joker);
  5447. var functorJoker = function functorJoker(dictFunctor) {
  5448. return new Data_Functor.Functor(function (g) {
  5449. return function (v) {
  5450. return Data_Functor.map(dictFunctor)(g)(v);
  5451. };
  5452. });
  5453. };
  5454. var eqJoker = function eqJoker(dictEq) {
  5455. return dictEq;
  5456. };
  5457. var bifunctorJoker = function bifunctorJoker(dictFunctor) {
  5458. return new Data_Bifunctor.Bifunctor(function (v) {
  5459. return function (g) {
  5460. return function (v1) {
  5461. return Data_Functor.map(dictFunctor)(g)(v1);
  5462. };
  5463. };
  5464. });
  5465. };
  5466. var biapplyJoker = function biapplyJoker(dictApply) {
  5467. return new Control_Biapply.Biapply(function () {
  5468. return bifunctorJoker(dictApply.Functor0());
  5469. }, function (v) {
  5470. return function (v1) {
  5471. return Control_Apply.apply(dictApply)(v)(v1);
  5472. };
  5473. });
  5474. };
  5475. var biapplicativeJoker = function biapplicativeJoker(dictApplicative) {
  5476. return new Control_Biapplicative.Biapplicative(function () {
  5477. return biapplyJoker(dictApplicative.Apply0());
  5478. }, function (v) {
  5479. return function (b) {
  5480. return Control_Applicative.pure(dictApplicative)(b);
  5481. };
  5482. });
  5483. };
  5484. module.exports = {
  5485. Joker: Joker,
  5486. newtypeJoker: newtypeJoker,
  5487. eqJoker: eqJoker,
  5488. ordJoker: ordJoker,
  5489. showJoker: showJoker,
  5490. functorJoker: functorJoker,
  5491. bifunctorJoker: bifunctorJoker,
  5492. biapplyJoker: biapplyJoker,
  5493. biapplicativeJoker: biapplicativeJoker
  5494. };
  5495. },{"../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) {
  5496. // Generated by purs version 0.13.6
  5497. "use strict";
  5498. var Control_Biapplicative = require("../Control.Biapplicative/index.js");
  5499. var Control_Biapply = require("../Control.Biapply/index.js");
  5500. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  5501. var Data_Eq = require("../Data.Eq/index.js");
  5502. var Data_Ord = require("../Data.Ord/index.js");
  5503. var Data_Ordering = require("../Data.Ordering/index.js");
  5504. var Data_Show = require("../Data.Show/index.js");
  5505. var Product = function () {
  5506. function Product(value0, value1) {
  5507. this.value0 = value0;
  5508. this.value1 = value1;
  5509. }
  5510. ;
  5511. Product.create = function (value0) {
  5512. return function (value1) {
  5513. return new Product(value0, value1);
  5514. };
  5515. };
  5516. return Product;
  5517. }();
  5518. var showProduct = function showProduct(dictShow) {
  5519. return function (dictShow1) {
  5520. return new Data_Show.Show(function (v) {
  5521. return "(Product " + (Data_Show.show(dictShow)(v.value0) + (" " + (Data_Show.show(dictShow1)(v.value1) + ")")));
  5522. });
  5523. };
  5524. };
  5525. var eqProduct = function eqProduct(dictEq) {
  5526. return function (dictEq1) {
  5527. return new Data_Eq.Eq(function (x) {
  5528. return function (y) {
  5529. return Data_Eq.eq(dictEq)(x.value0)(y.value0) && Data_Eq.eq(dictEq1)(x.value1)(y.value1);
  5530. };
  5531. });
  5532. };
  5533. };
  5534. var ordProduct = function ordProduct(dictOrd) {
  5535. return function (dictOrd1) {
  5536. return new Data_Ord.Ord(function () {
  5537. return eqProduct(dictOrd.Eq0())(dictOrd1.Eq0());
  5538. }, function (x) {
  5539. return function (y) {
  5540. var v = Data_Ord.compare(dictOrd)(x.value0)(y.value0);
  5541. if (v instanceof Data_Ordering.LT) {
  5542. return Data_Ordering.LT.value;
  5543. }
  5544. ;
  5545. if (v instanceof Data_Ordering.GT) {
  5546. return Data_Ordering.GT.value;
  5547. }
  5548. ;
  5549. return Data_Ord.compare(dictOrd1)(x.value1)(y.value1);
  5550. };
  5551. });
  5552. };
  5553. };
  5554. var bifunctorProduct = function bifunctorProduct(dictBifunctor) {
  5555. return function (dictBifunctor1) {
  5556. return new Data_Bifunctor.Bifunctor(function (f) {
  5557. return function (g) {
  5558. return function (v) {
  5559. return new Product(Data_Bifunctor.bimap(dictBifunctor)(f)(g)(v.value0), Data_Bifunctor.bimap(dictBifunctor1)(f)(g)(v.value1));
  5560. };
  5561. };
  5562. });
  5563. };
  5564. };
  5565. var biapplyProduct = function biapplyProduct(dictBiapply) {
  5566. return function (dictBiapply1) {
  5567. return new Control_Biapply.Biapply(function () {
  5568. return bifunctorProduct(dictBiapply.Bifunctor0())(dictBiapply1.Bifunctor0());
  5569. }, function (v) {
  5570. return function (v1) {
  5571. return new Product(Control_Biapply.biapply(dictBiapply)(v.value0)(v1.value0), Control_Biapply.biapply(dictBiapply1)(v.value1)(v1.value1));
  5572. };
  5573. });
  5574. };
  5575. };
  5576. var biapplicativeProduct = function biapplicativeProduct(dictBiapplicative) {
  5577. return function (dictBiapplicative1) {
  5578. return new Control_Biapplicative.Biapplicative(function () {
  5579. return biapplyProduct(dictBiapplicative.Biapply0())(dictBiapplicative1.Biapply0());
  5580. }, function (a) {
  5581. return function (b) {
  5582. return new Product(Control_Biapplicative.bipure(dictBiapplicative)(a)(b), Control_Biapplicative.bipure(dictBiapplicative1)(a)(b));
  5583. };
  5584. });
  5585. };
  5586. };
  5587. module.exports = {
  5588. Product: Product,
  5589. eqProduct: eqProduct,
  5590. ordProduct: ordProduct,
  5591. showProduct: showProduct,
  5592. bifunctorProduct: bifunctorProduct,
  5593. biapplyProduct: biapplyProduct,
  5594. biapplicativeProduct: biapplicativeProduct
  5595. };
  5596. },{"../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) {
  5597. // Generated by purs version 0.13.6
  5598. "use strict";
  5599. var Control_Biapplicative = require("../Control.Biapplicative/index.js");
  5600. var Control_Biapply = require("../Control.Biapply/index.js");
  5601. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  5602. var Data_Functor = require("../Data.Functor/index.js");
  5603. var Data_Newtype = require("../Data.Newtype/index.js");
  5604. var Data_Show = require("../Data.Show/index.js");
  5605. var Wrap = function Wrap(x) {
  5606. return x;
  5607. };
  5608. var showWrap = function showWrap(dictShow) {
  5609. return new Data_Show.Show(function (v) {
  5610. return "(Wrap " + (Data_Show.show(dictShow)(v) + ")");
  5611. });
  5612. };
  5613. var ordWrap = function ordWrap(dictOrd) {
  5614. return dictOrd;
  5615. };
  5616. var newtypeWrap = new Data_Newtype.Newtype(function (n) {
  5617. return n;
  5618. }, Wrap);
  5619. var functorWrap = function functorWrap(dictBifunctor) {
  5620. return new Data_Functor.Functor(function (f) {
  5621. return function (v) {
  5622. return Data_Bifunctor.rmap(dictBifunctor)(f)(v);
  5623. };
  5624. });
  5625. };
  5626. var eqWrap = function eqWrap(dictEq) {
  5627. return dictEq;
  5628. };
  5629. var bifunctorWrap = function bifunctorWrap(dictBifunctor) {
  5630. return new Data_Bifunctor.Bifunctor(function (f) {
  5631. return function (g) {
  5632. return function (v) {
  5633. return Data_Bifunctor.bimap(dictBifunctor)(f)(g)(v);
  5634. };
  5635. };
  5636. });
  5637. };
  5638. var biapplyWrap = function biapplyWrap(dictBiapply) {
  5639. return new Control_Biapply.Biapply(function () {
  5640. return bifunctorWrap(dictBiapply.Bifunctor0());
  5641. }, function (v) {
  5642. return function (v1) {
  5643. return Control_Biapply.biapply(dictBiapply)(v)(v1);
  5644. };
  5645. });
  5646. };
  5647. var biapplicativeWrap = function biapplicativeWrap(dictBiapplicative) {
  5648. return new Control_Biapplicative.Biapplicative(function () {
  5649. return biapplyWrap(dictBiapplicative.Biapply0());
  5650. }, function (a) {
  5651. return function (b) {
  5652. return Control_Biapplicative.bipure(dictBiapplicative)(a)(b);
  5653. };
  5654. });
  5655. };
  5656. module.exports = {
  5657. Wrap: Wrap,
  5658. newtypeWrap: newtypeWrap,
  5659. eqWrap: eqWrap,
  5660. ordWrap: ordWrap,
  5661. showWrap: showWrap,
  5662. functorWrap: functorWrap,
  5663. bifunctorWrap: bifunctorWrap,
  5664. biapplyWrap: biapplyWrap,
  5665. biapplicativeWrap: biapplicativeWrap
  5666. };
  5667. },{"../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) {
  5668. "use strict"; // jshint maxparams: 3
  5669. exports.traverseArrayImpl = function () {
  5670. function array1(a) {
  5671. return [a];
  5672. }
  5673. function array2(a) {
  5674. return function (b) {
  5675. return [a, b];
  5676. };
  5677. }
  5678. function array3(a) {
  5679. return function (b) {
  5680. return function (c) {
  5681. return [a, b, c];
  5682. };
  5683. };
  5684. }
  5685. function concat2(xs) {
  5686. return function (ys) {
  5687. return xs.concat(ys);
  5688. };
  5689. }
  5690. return function (apply) {
  5691. return function (map) {
  5692. return function (pure) {
  5693. return function (f) {
  5694. return function (array) {
  5695. function go(bot, top) {
  5696. switch (top - bot) {
  5697. case 0:
  5698. return pure([]);
  5699. case 1:
  5700. return map(array1)(f(array[bot]));
  5701. case 2:
  5702. return apply(map(array2)(f(array[bot])))(f(array[bot + 1]));
  5703. case 3:
  5704. return apply(apply(map(array3)(f(array[bot])))(f(array[bot + 1])))(f(array[bot + 2]));
  5705. default:
  5706. // This slightly tricky pivot selection aims to produce two
  5707. // even-length partitions where possible.
  5708. var pivot = bot + Math.floor((top - bot) / 4) * 2;
  5709. return apply(map(concat2)(go(bot, pivot)))(go(pivot, top));
  5710. }
  5711. }
  5712. return go(0, array.length);
  5713. };
  5714. };
  5715. };
  5716. };
  5717. };
  5718. }();
  5719. },{}],"../output/Data.Maybe.First/index.js":[function(require,module,exports) {
  5720. // Generated by purs version 0.13.6
  5721. "use strict";
  5722. var Control_Alt = require("../Control.Alt/index.js");
  5723. var Control_Alternative = require("../Control.Alternative/index.js");
  5724. var Control_MonadZero = require("../Control.MonadZero/index.js");
  5725. var Control_Plus = require("../Control.Plus/index.js");
  5726. var Data_Maybe = require("../Data.Maybe/index.js");
  5727. var Data_Monoid = require("../Data.Monoid/index.js");
  5728. var Data_Newtype = require("../Data.Newtype/index.js");
  5729. var Data_Semigroup = require("../Data.Semigroup/index.js");
  5730. var Data_Show = require("../Data.Show/index.js");
  5731. var First = function First(x) {
  5732. return x;
  5733. };
  5734. var showFirst = function showFirst(dictShow) {
  5735. return new Data_Show.Show(function (v) {
  5736. return "First (" + (Data_Show.show(Data_Maybe.showMaybe(dictShow))(v) + ")");
  5737. });
  5738. };
  5739. var semigroupFirst = new Data_Semigroup.Semigroup(function (v) {
  5740. return function (v1) {
  5741. if (v instanceof Data_Maybe.Just) {
  5742. return v;
  5743. }
  5744. ;
  5745. return v1;
  5746. };
  5747. });
  5748. var ordFirst = function ordFirst(dictOrd) {
  5749. return Data_Maybe.ordMaybe(dictOrd);
  5750. };
  5751. var ord1First = Data_Maybe.ord1Maybe;
  5752. var newtypeFirst = new Data_Newtype.Newtype(function (n) {
  5753. return n;
  5754. }, First);
  5755. var monoidFirst = new Data_Monoid.Monoid(function () {
  5756. return semigroupFirst;
  5757. }, Data_Maybe.Nothing.value);
  5758. var monadFirst = Data_Maybe.monadMaybe;
  5759. var invariantFirst = Data_Maybe.invariantMaybe;
  5760. var functorFirst = Data_Maybe.functorMaybe;
  5761. var extendFirst = Data_Maybe.extendMaybe;
  5762. var eqFirst = function eqFirst(dictEq) {
  5763. return Data_Maybe.eqMaybe(dictEq);
  5764. };
  5765. var eq1First = Data_Maybe.eq1Maybe;
  5766. var boundedFirst = function boundedFirst(dictBounded) {
  5767. return Data_Maybe.boundedMaybe(dictBounded);
  5768. };
  5769. var bindFirst = Data_Maybe.bindMaybe;
  5770. var applyFirst = Data_Maybe.applyMaybe;
  5771. var applicativeFirst = Data_Maybe.applicativeMaybe;
  5772. var altFirst = new Control_Alt.Alt(function () {
  5773. return functorFirst;
  5774. }, Data_Semigroup.append(semigroupFirst));
  5775. var plusFirst = new Control_Plus.Plus(function () {
  5776. return altFirst;
  5777. }, Data_Monoid.mempty(monoidFirst));
  5778. var alternativeFirst = new Control_Alternative.Alternative(function () {
  5779. return applicativeFirst;
  5780. }, function () {
  5781. return plusFirst;
  5782. });
  5783. var monadZeroFirst = new Control_MonadZero.MonadZero(function () {
  5784. return alternativeFirst;
  5785. }, function () {
  5786. return monadFirst;
  5787. });
  5788. module.exports = {
  5789. First: First,
  5790. newtypeFirst: newtypeFirst,
  5791. eqFirst: eqFirst,
  5792. eq1First: eq1First,
  5793. ordFirst: ordFirst,
  5794. ord1First: ord1First,
  5795. boundedFirst: boundedFirst,
  5796. functorFirst: functorFirst,
  5797. invariantFirst: invariantFirst,
  5798. applyFirst: applyFirst,
  5799. applicativeFirst: applicativeFirst,
  5800. bindFirst: bindFirst,
  5801. monadFirst: monadFirst,
  5802. extendFirst: extendFirst,
  5803. showFirst: showFirst,
  5804. semigroupFirst: semigroupFirst,
  5805. monoidFirst: monoidFirst,
  5806. altFirst: altFirst,
  5807. plusFirst: plusFirst,
  5808. alternativeFirst: alternativeFirst,
  5809. monadZeroFirst: monadZeroFirst
  5810. };
  5811. },{"../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) {
  5812. // Generated by purs version 0.13.6
  5813. "use strict";
  5814. var Control_Alt = require("../Control.Alt/index.js");
  5815. var Control_Alternative = require("../Control.Alternative/index.js");
  5816. var Control_MonadZero = require("../Control.MonadZero/index.js");
  5817. var Control_Plus = require("../Control.Plus/index.js");
  5818. var Data_Maybe = require("../Data.Maybe/index.js");
  5819. var Data_Monoid = require("../Data.Monoid/index.js");
  5820. var Data_Newtype = require("../Data.Newtype/index.js");
  5821. var Data_Semigroup = require("../Data.Semigroup/index.js");
  5822. var Data_Show = require("../Data.Show/index.js");
  5823. var Last = function Last(x) {
  5824. return x;
  5825. };
  5826. var showLast = function showLast(dictShow) {
  5827. return new Data_Show.Show(function (v) {
  5828. return "(Last " + (Data_Show.show(Data_Maybe.showMaybe(dictShow))(v) + ")");
  5829. });
  5830. };
  5831. var semigroupLast = new Data_Semigroup.Semigroup(function (v) {
  5832. return function (v1) {
  5833. if (v1 instanceof Data_Maybe.Just) {
  5834. return v1;
  5835. }
  5836. ;
  5837. if (v1 instanceof Data_Maybe.Nothing) {
  5838. return v;
  5839. }
  5840. ;
  5841. throw new Error("Failed pattern match at Data.Maybe.Last (line 52, column 1 - line 54, column 36): " + [v.constructor.name, v1.constructor.name]);
  5842. };
  5843. });
  5844. var ordLast = function ordLast(dictOrd) {
  5845. return Data_Maybe.ordMaybe(dictOrd);
  5846. };
  5847. var ord1Last = Data_Maybe.ord1Maybe;
  5848. var newtypeLast = new Data_Newtype.Newtype(function (n) {
  5849. return n;
  5850. }, Last);
  5851. var monoidLast = new Data_Monoid.Monoid(function () {
  5852. return semigroupLast;
  5853. }, Data_Maybe.Nothing.value);
  5854. var monadLast = Data_Maybe.monadMaybe;
  5855. var invariantLast = Data_Maybe.invariantMaybe;
  5856. var functorLast = Data_Maybe.functorMaybe;
  5857. var extendLast = Data_Maybe.extendMaybe;
  5858. var eqLast = function eqLast(dictEq) {
  5859. return Data_Maybe.eqMaybe(dictEq);
  5860. };
  5861. var eq1Last = Data_Maybe.eq1Maybe;
  5862. var boundedLast = function boundedLast(dictBounded) {
  5863. return Data_Maybe.boundedMaybe(dictBounded);
  5864. };
  5865. var bindLast = Data_Maybe.bindMaybe;
  5866. var applyLast = Data_Maybe.applyMaybe;
  5867. var applicativeLast = Data_Maybe.applicativeMaybe;
  5868. var altLast = new Control_Alt.Alt(function () {
  5869. return functorLast;
  5870. }, Data_Semigroup.append(semigroupLast));
  5871. var plusLast = new Control_Plus.Plus(function () {
  5872. return altLast;
  5873. }, Data_Monoid.mempty(monoidLast));
  5874. var alternativeLast = new Control_Alternative.Alternative(function () {
  5875. return applicativeLast;
  5876. }, function () {
  5877. return plusLast;
  5878. });
  5879. var monadZeroLast = new Control_MonadZero.MonadZero(function () {
  5880. return alternativeLast;
  5881. }, function () {
  5882. return monadLast;
  5883. });
  5884. module.exports = {
  5885. Last: Last,
  5886. newtypeLast: newtypeLast,
  5887. eqLast: eqLast,
  5888. eq1Last: eq1Last,
  5889. ordLast: ordLast,
  5890. ord1Last: ord1Last,
  5891. boundedLast: boundedLast,
  5892. functorLast: functorLast,
  5893. invariantLast: invariantLast,
  5894. applyLast: applyLast,
  5895. applicativeLast: applicativeLast,
  5896. bindLast: bindLast,
  5897. monadLast: monadLast,
  5898. extendLast: extendLast,
  5899. showLast: showLast,
  5900. semigroupLast: semigroupLast,
  5901. monoidLast: monoidLast,
  5902. altLast: altLast,
  5903. plusLast: plusLast,
  5904. alternativeLast: alternativeLast,
  5905. monadZeroLast: monadZeroLast
  5906. };
  5907. },{"../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) {
  5908. // Generated by purs version 0.13.6
  5909. "use strict";
  5910. var Control_Applicative = require("../Control.Applicative/index.js");
  5911. var Control_Apply = require("../Control.Apply/index.js");
  5912. var Data_Functor = require("../Data.Functor/index.js");
  5913. var StateR = function StateR(x) {
  5914. return x;
  5915. };
  5916. var StateL = function StateL(x) {
  5917. return x;
  5918. };
  5919. var stateR = function stateR(v) {
  5920. return v;
  5921. };
  5922. var stateL = function stateL(v) {
  5923. return v;
  5924. };
  5925. var functorStateR = new Data_Functor.Functor(function (f) {
  5926. return function (k) {
  5927. return function (s) {
  5928. var v = stateR(k)(s);
  5929. return {
  5930. accum: v.accum,
  5931. value: f(v.value)
  5932. };
  5933. };
  5934. };
  5935. });
  5936. var functorStateL = new Data_Functor.Functor(function (f) {
  5937. return function (k) {
  5938. return function (s) {
  5939. var v = stateL(k)(s);
  5940. return {
  5941. accum: v.accum,
  5942. value: f(v.value)
  5943. };
  5944. };
  5945. };
  5946. });
  5947. var applyStateR = new Control_Apply.Apply(function () {
  5948. return functorStateR;
  5949. }, function (f) {
  5950. return function (x) {
  5951. return function (s) {
  5952. var v = stateR(x)(s);
  5953. var v1 = stateR(f)(v.accum);
  5954. return {
  5955. accum: v1.accum,
  5956. value: v1.value(v.value)
  5957. };
  5958. };
  5959. };
  5960. });
  5961. var applyStateL = new Control_Apply.Apply(function () {
  5962. return functorStateL;
  5963. }, function (f) {
  5964. return function (x) {
  5965. return function (s) {
  5966. var v = stateL(f)(s);
  5967. var v1 = stateL(x)(v.accum);
  5968. return {
  5969. accum: v1.accum,
  5970. value: v.value(v1.value)
  5971. };
  5972. };
  5973. };
  5974. });
  5975. var applicativeStateR = new Control_Applicative.Applicative(function () {
  5976. return applyStateR;
  5977. }, function (a) {
  5978. return function (s) {
  5979. return {
  5980. accum: s,
  5981. value: a
  5982. };
  5983. };
  5984. });
  5985. var applicativeStateL = new Control_Applicative.Applicative(function () {
  5986. return applyStateL;
  5987. }, function (a) {
  5988. return function (s) {
  5989. return {
  5990. accum: s,
  5991. value: a
  5992. };
  5993. };
  5994. });
  5995. module.exports = {
  5996. StateL: StateL,
  5997. stateL: stateL,
  5998. StateR: StateR,
  5999. stateR: stateR,
  6000. functorStateL: functorStateL,
  6001. applyStateL: applyStateL,
  6002. applicativeStateL: applicativeStateL,
  6003. functorStateR: functorStateR,
  6004. applyStateR: applyStateR,
  6005. applicativeStateR: applicativeStateR
  6006. };
  6007. },{"../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) {
  6008. // Generated by purs version 0.13.6
  6009. "use strict";
  6010. var $foreign = require("./foreign.js");
  6011. var Control_Applicative = require("../Control.Applicative/index.js");
  6012. var Control_Apply = require("../Control.Apply/index.js");
  6013. var Control_Category = require("../Control.Category/index.js");
  6014. var Data_Foldable = require("../Data.Foldable/index.js");
  6015. var Data_Functor = require("../Data.Functor/index.js");
  6016. var Data_Maybe = require("../Data.Maybe/index.js");
  6017. var Data_Maybe_First = require("../Data.Maybe.First/index.js");
  6018. var Data_Maybe_Last = require("../Data.Maybe.Last/index.js");
  6019. var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js");
  6020. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  6021. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  6022. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  6023. var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
  6024. var Data_Traversable_Accum_Internal = require("../Data.Traversable.Accum.Internal/index.js");
  6025. var Traversable = function Traversable(Foldable1, Functor0, sequence, traverse) {
  6026. this.Foldable1 = Foldable1;
  6027. this.Functor0 = Functor0;
  6028. this.sequence = sequence;
  6029. this.traverse = traverse;
  6030. };
  6031. var traverse = function traverse(dict) {
  6032. return dict.traverse;
  6033. };
  6034. var traversableMultiplicative = new Traversable(function () {
  6035. return Data_Foldable.foldableMultiplicative;
  6036. }, function () {
  6037. return Data_Monoid_Multiplicative.functorMultiplicative;
  6038. }, function (dictApplicative) {
  6039. return function (v) {
  6040. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Multiplicative.Multiplicative)(v);
  6041. };
  6042. }, function (dictApplicative) {
  6043. return function (f) {
  6044. return function (v) {
  6045. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Multiplicative.Multiplicative)(f(v));
  6046. };
  6047. };
  6048. });
  6049. var traversableMaybe = new Traversable(function () {
  6050. return Data_Foldable.foldableMaybe;
  6051. }, function () {
  6052. return Data_Maybe.functorMaybe;
  6053. }, function (dictApplicative) {
  6054. return function (v) {
  6055. if (v instanceof Data_Maybe.Nothing) {
  6056. return Control_Applicative.pure(dictApplicative)(Data_Maybe.Nothing.value);
  6057. }
  6058. ;
  6059. if (v instanceof Data_Maybe.Just) {
  6060. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe.Just.create)(v.value0);
  6061. }
  6062. ;
  6063. throw new Error("Failed pattern match at Data.Traversable (line 86, column 1 - line 90, column 33): " + [v.constructor.name]);
  6064. };
  6065. }, function (dictApplicative) {
  6066. return function (v) {
  6067. return function (v1) {
  6068. if (v1 instanceof Data_Maybe.Nothing) {
  6069. return Control_Applicative.pure(dictApplicative)(Data_Maybe.Nothing.value);
  6070. }
  6071. ;
  6072. if (v1 instanceof Data_Maybe.Just) {
  6073. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe.Just.create)(v(v1.value0));
  6074. }
  6075. ;
  6076. throw new Error("Failed pattern match at Data.Traversable (line 86, column 1 - line 90, column 33): " + [v.constructor.name, v1.constructor.name]);
  6077. };
  6078. };
  6079. });
  6080. var traversableDual = new Traversable(function () {
  6081. return Data_Foldable.foldableDual;
  6082. }, function () {
  6083. return Data_Monoid_Dual.functorDual;
  6084. }, function (dictApplicative) {
  6085. return function (v) {
  6086. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Dual.Dual)(v);
  6087. };
  6088. }, function (dictApplicative) {
  6089. return function (f) {
  6090. return function (v) {
  6091. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Dual.Dual)(f(v));
  6092. };
  6093. };
  6094. });
  6095. var traversableDisj = new Traversable(function () {
  6096. return Data_Foldable.foldableDisj;
  6097. }, function () {
  6098. return Data_Monoid_Disj.functorDisj;
  6099. }, function (dictApplicative) {
  6100. return function (v) {
  6101. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Disj.Disj)(v);
  6102. };
  6103. }, function (dictApplicative) {
  6104. return function (f) {
  6105. return function (v) {
  6106. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Disj.Disj)(f(v));
  6107. };
  6108. };
  6109. });
  6110. var traversableConj = new Traversable(function () {
  6111. return Data_Foldable.foldableConj;
  6112. }, function () {
  6113. return Data_Monoid_Conj.functorConj;
  6114. }, function (dictApplicative) {
  6115. return function (v) {
  6116. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Conj.Conj)(v);
  6117. };
  6118. }, function (dictApplicative) {
  6119. return function (f) {
  6120. return function (v) {
  6121. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Conj.Conj)(f(v));
  6122. };
  6123. };
  6124. });
  6125. var traversableAdditive = new Traversable(function () {
  6126. return Data_Foldable.foldableAdditive;
  6127. }, function () {
  6128. return Data_Monoid_Additive.functorAdditive;
  6129. }, function (dictApplicative) {
  6130. return function (v) {
  6131. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Additive.Additive)(v);
  6132. };
  6133. }, function (dictApplicative) {
  6134. return function (f) {
  6135. return function (v) {
  6136. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Monoid_Additive.Additive)(f(v));
  6137. };
  6138. };
  6139. });
  6140. var sequenceDefault = function sequenceDefault(dictTraversable) {
  6141. return function (dictApplicative) {
  6142. return traverse(dictTraversable)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
  6143. };
  6144. };
  6145. var traversableArray = new Traversable(function () {
  6146. return Data_Foldable.foldableArray;
  6147. }, function () {
  6148. return Data_Functor.functorArray;
  6149. }, function (dictApplicative) {
  6150. return sequenceDefault(traversableArray)(dictApplicative);
  6151. }, function (dictApplicative) {
  6152. return $foreign.traverseArrayImpl(Control_Apply.apply(dictApplicative.Apply0()))(Data_Functor.map(dictApplicative.Apply0().Functor0()))(Control_Applicative.pure(dictApplicative));
  6153. });
  6154. var sequence = function sequence(dict) {
  6155. return dict.sequence;
  6156. };
  6157. var traversableFirst = new Traversable(function () {
  6158. return Data_Foldable.foldableFirst;
  6159. }, function () {
  6160. return Data_Maybe_First.functorFirst;
  6161. }, function (dictApplicative) {
  6162. return function (v) {
  6163. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_First.First)(sequence(traversableMaybe)(dictApplicative)(v));
  6164. };
  6165. }, function (dictApplicative) {
  6166. return function (f) {
  6167. return function (v) {
  6168. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_First.First)(traverse(traversableMaybe)(dictApplicative)(f)(v));
  6169. };
  6170. };
  6171. });
  6172. var traversableLast = new Traversable(function () {
  6173. return Data_Foldable.foldableLast;
  6174. }, function () {
  6175. return Data_Maybe_Last.functorLast;
  6176. }, function (dictApplicative) {
  6177. return function (v) {
  6178. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Maybe_Last.Last)(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_Last.Last)(traverse(traversableMaybe)(dictApplicative)(f)(v));
  6184. };
  6185. };
  6186. });
  6187. var traverseDefault = function traverseDefault(dictTraversable) {
  6188. return function (dictApplicative) {
  6189. return function (f) {
  6190. return function (ta) {
  6191. return sequence(dictTraversable)(dictApplicative)(Data_Functor.map(dictTraversable.Functor0())(f)(ta));
  6192. };
  6193. };
  6194. };
  6195. };
  6196. var mapAccumR = function mapAccumR(dictTraversable) {
  6197. return function (f) {
  6198. return function (s0) {
  6199. return function (xs) {
  6200. return Data_Traversable_Accum_Internal.stateR(traverse(dictTraversable)(Data_Traversable_Accum_Internal.applicativeStateR)(function (a) {
  6201. return function (s) {
  6202. return f(s)(a);
  6203. };
  6204. })(xs))(s0);
  6205. };
  6206. };
  6207. };
  6208. };
  6209. var scanr = function scanr(dictTraversable) {
  6210. return function (f) {
  6211. return function (b0) {
  6212. return function (xs) {
  6213. return mapAccumR(dictTraversable)(function (b) {
  6214. return function (a) {
  6215. var b$prime = f(a)(b);
  6216. return {
  6217. accum: b$prime,
  6218. value: b$prime
  6219. };
  6220. };
  6221. })(b0)(xs).value;
  6222. };
  6223. };
  6224. };
  6225. };
  6226. var mapAccumL = function mapAccumL(dictTraversable) {
  6227. return function (f) {
  6228. return function (s0) {
  6229. return function (xs) {
  6230. return Data_Traversable_Accum_Internal.stateL(traverse(dictTraversable)(Data_Traversable_Accum_Internal.applicativeStateL)(function (a) {
  6231. return function (s) {
  6232. return f(s)(a);
  6233. };
  6234. })(xs))(s0);
  6235. };
  6236. };
  6237. };
  6238. };
  6239. var scanl = function scanl(dictTraversable) {
  6240. return function (f) {
  6241. return function (b0) {
  6242. return function (xs) {
  6243. return mapAccumL(dictTraversable)(function (b) {
  6244. return function (a) {
  6245. var b$prime = f(b)(a);
  6246. return {
  6247. accum: b$prime,
  6248. value: b$prime
  6249. };
  6250. };
  6251. })(b0)(xs).value;
  6252. };
  6253. };
  6254. };
  6255. };
  6256. var $$for = function $$for(dictApplicative) {
  6257. return function (dictTraversable) {
  6258. return function (x) {
  6259. return function (f) {
  6260. return traverse(dictTraversable)(dictApplicative)(f)(x);
  6261. };
  6262. };
  6263. };
  6264. };
  6265. module.exports = {
  6266. Traversable: Traversable,
  6267. traverse: traverse,
  6268. sequence: sequence,
  6269. traverseDefault: traverseDefault,
  6270. sequenceDefault: sequenceDefault,
  6271. "for": $$for,
  6272. scanl: scanl,
  6273. scanr: scanr,
  6274. mapAccumL: mapAccumL,
  6275. mapAccumR: mapAccumR,
  6276. traversableArray: traversableArray,
  6277. traversableMaybe: traversableMaybe,
  6278. traversableFirst: traversableFirst,
  6279. traversableLast: traversableLast,
  6280. traversableAdditive: traversableAdditive,
  6281. traversableDual: traversableDual,
  6282. traversableConj: traversableConj,
  6283. traversableDisj: traversableDisj,
  6284. traversableMultiplicative: traversableMultiplicative
  6285. };
  6286. },{"./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) {
  6287. // Generated by purs version 0.13.6
  6288. "use strict";
  6289. var Control_Applicative = require("../Control.Applicative/index.js");
  6290. var Control_Apply = require("../Control.Apply/index.js");
  6291. var Control_Category = require("../Control.Category/index.js");
  6292. var Data_Bifoldable = require("../Data.Bifoldable/index.js");
  6293. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  6294. var Data_Bifunctor_Clown = require("../Data.Bifunctor.Clown/index.js");
  6295. var Data_Bifunctor_Flip = require("../Data.Bifunctor.Flip/index.js");
  6296. var Data_Bifunctor_Joker = require("../Data.Bifunctor.Joker/index.js");
  6297. var Data_Bifunctor_Product = require("../Data.Bifunctor.Product/index.js");
  6298. var Data_Bifunctor_Wrap = require("../Data.Bifunctor.Wrap/index.js");
  6299. var Data_Functor = require("../Data.Functor/index.js");
  6300. var Data_Traversable = require("../Data.Traversable/index.js");
  6301. var Bitraversable = function Bitraversable(Bifoldable1, Bifunctor0, bisequence, bitraverse) {
  6302. this.Bifoldable1 = Bifoldable1;
  6303. this.Bifunctor0 = Bifunctor0;
  6304. this.bisequence = bisequence;
  6305. this.bitraverse = bitraverse;
  6306. };
  6307. var bitraverse = function bitraverse(dict) {
  6308. return dict.bitraverse;
  6309. };
  6310. var lfor = function lfor(dictBitraversable) {
  6311. return function (dictApplicative) {
  6312. return function (t) {
  6313. return function (f) {
  6314. return bitraverse(dictBitraversable)(dictApplicative)(f)(Control_Applicative.pure(dictApplicative))(t);
  6315. };
  6316. };
  6317. };
  6318. };
  6319. var ltraverse = function ltraverse(dictBitraversable) {
  6320. return function (dictApplicative) {
  6321. return function (f) {
  6322. return bitraverse(dictBitraversable)(dictApplicative)(f)(Control_Applicative.pure(dictApplicative));
  6323. };
  6324. };
  6325. };
  6326. var rfor = function rfor(dictBitraversable) {
  6327. return function (dictApplicative) {
  6328. return function (t) {
  6329. return function (f) {
  6330. return bitraverse(dictBitraversable)(dictApplicative)(Control_Applicative.pure(dictApplicative))(f)(t);
  6331. };
  6332. };
  6333. };
  6334. };
  6335. var rtraverse = function rtraverse(dictBitraversable) {
  6336. return function (dictApplicative) {
  6337. return bitraverse(dictBitraversable)(dictApplicative)(Control_Applicative.pure(dictApplicative));
  6338. };
  6339. };
  6340. var bitraversableJoker = function bitraversableJoker(dictTraversable) {
  6341. return new Bitraversable(function () {
  6342. return Data_Bifoldable.bifoldableJoker(dictTraversable.Foldable1());
  6343. }, function () {
  6344. return Data_Bifunctor_Joker.bifunctorJoker(dictTraversable.Functor0());
  6345. }, function (dictApplicative) {
  6346. return function (v) {
  6347. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Joker.Joker)(Data_Traversable.sequence(dictTraversable)(dictApplicative)(v));
  6348. };
  6349. }, function (dictApplicative) {
  6350. return function (v) {
  6351. return function (r) {
  6352. return function (v1) {
  6353. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Joker.Joker)(Data_Traversable.traverse(dictTraversable)(dictApplicative)(r)(v1));
  6354. };
  6355. };
  6356. };
  6357. });
  6358. };
  6359. var bitraversableClown = function bitraversableClown(dictTraversable) {
  6360. return new Bitraversable(function () {
  6361. return Data_Bifoldable.bifoldableClown(dictTraversable.Foldable1());
  6362. }, function () {
  6363. return Data_Bifunctor_Clown.bifunctorClown(dictTraversable.Functor0());
  6364. }, function (dictApplicative) {
  6365. return function (v) {
  6366. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Clown.Clown)(Data_Traversable.sequence(dictTraversable)(dictApplicative)(v));
  6367. };
  6368. }, function (dictApplicative) {
  6369. return function (l) {
  6370. return function (v) {
  6371. return function (v1) {
  6372. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Clown.Clown)(Data_Traversable.traverse(dictTraversable)(dictApplicative)(l)(v1));
  6373. };
  6374. };
  6375. };
  6376. });
  6377. };
  6378. var bisequenceDefault = function bisequenceDefault(dictBitraversable) {
  6379. return function (dictApplicative) {
  6380. return bitraverse(dictBitraversable)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn));
  6381. };
  6382. };
  6383. var bisequence = function bisequence(dict) {
  6384. return dict.bisequence;
  6385. };
  6386. var bitraversableFlip = function bitraversableFlip(dictBitraversable) {
  6387. return new Bitraversable(function () {
  6388. return Data_Bifoldable.bifoldableFlip(dictBitraversable.Bifoldable1());
  6389. }, function () {
  6390. return Data_Bifunctor_Flip.bifunctorFlip(dictBitraversable.Bifunctor0());
  6391. }, function (dictApplicative) {
  6392. return function (v) {
  6393. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Flip.Flip)(bisequence(dictBitraversable)(dictApplicative)(v));
  6394. };
  6395. }, function (dictApplicative) {
  6396. return function (r) {
  6397. return function (l) {
  6398. return function (v) {
  6399. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Flip.Flip)(bitraverse(dictBitraversable)(dictApplicative)(l)(r)(v));
  6400. };
  6401. };
  6402. };
  6403. });
  6404. };
  6405. var bitraversableProduct = function bitraversableProduct(dictBitraversable) {
  6406. return function (dictBitraversable1) {
  6407. return new Bitraversable(function () {
  6408. return Data_Bifoldable.bifoldableProduct(dictBitraversable.Bifoldable1())(dictBitraversable1.Bifoldable1());
  6409. }, function () {
  6410. return Data_Bifunctor_Product.bifunctorProduct(dictBitraversable.Bifunctor0())(dictBitraversable1.Bifunctor0());
  6411. }, function (dictApplicative) {
  6412. return function (v) {
  6413. 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));
  6414. };
  6415. }, function (dictApplicative) {
  6416. return function (l) {
  6417. return function (r) {
  6418. return function (v) {
  6419. 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));
  6420. };
  6421. };
  6422. };
  6423. });
  6424. };
  6425. };
  6426. var bitraversableWrap = function bitraversableWrap(dictBitraversable) {
  6427. return new Bitraversable(function () {
  6428. return Data_Bifoldable.bifoldableWrap(dictBitraversable.Bifoldable1());
  6429. }, function () {
  6430. return Data_Bifunctor_Wrap.bifunctorWrap(dictBitraversable.Bifunctor0());
  6431. }, function (dictApplicative) {
  6432. return function (v) {
  6433. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Wrap.Wrap)(bisequence(dictBitraversable)(dictApplicative)(v));
  6434. };
  6435. }, function (dictApplicative) {
  6436. return function (l) {
  6437. return function (r) {
  6438. return function (v) {
  6439. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Bifunctor_Wrap.Wrap)(bitraverse(dictBitraversable)(dictApplicative)(l)(r)(v));
  6440. };
  6441. };
  6442. };
  6443. });
  6444. };
  6445. var bitraverseDefault = function bitraverseDefault(dictBitraversable) {
  6446. return function (dictApplicative) {
  6447. return function (f) {
  6448. return function (g) {
  6449. return function (t) {
  6450. return bisequence(dictBitraversable)(dictApplicative)(Data_Bifunctor.bimap(dictBitraversable.Bifunctor0())(f)(g)(t));
  6451. };
  6452. };
  6453. };
  6454. };
  6455. };
  6456. var bifor = function bifor(dictBitraversable) {
  6457. return function (dictApplicative) {
  6458. return function (t) {
  6459. return function (f) {
  6460. return function (g) {
  6461. return bitraverse(dictBitraversable)(dictApplicative)(f)(g)(t);
  6462. };
  6463. };
  6464. };
  6465. };
  6466. };
  6467. module.exports = {
  6468. Bitraversable: Bitraversable,
  6469. bitraverse: bitraverse,
  6470. bisequence: bisequence,
  6471. bitraverseDefault: bitraverseDefault,
  6472. bisequenceDefault: bisequenceDefault,
  6473. ltraverse: ltraverse,
  6474. rtraverse: rtraverse,
  6475. bifor: bifor,
  6476. lfor: lfor,
  6477. rfor: rfor,
  6478. bitraversableClown: bitraversableClown,
  6479. bitraversableJoker: bitraversableJoker,
  6480. bitraversableFlip: bitraversableFlip,
  6481. bitraversableProduct: bitraversableProduct,
  6482. bitraversableWrap: bitraversableWrap
  6483. };
  6484. },{"../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) {
  6485. "use strict";
  6486. exports.mapWithIndexArray = function (f) {
  6487. return function (xs) {
  6488. var l = xs.length;
  6489. var result = Array(l);
  6490. for (var i = 0; i < l; i++) {
  6491. result[i] = f(i)(xs[i]);
  6492. }
  6493. return result;
  6494. };
  6495. };
  6496. },{}],"../output/Data.FunctorWithIndex/index.js":[function(require,module,exports) {
  6497. // Generated by purs version 0.13.6
  6498. "use strict";
  6499. var $foreign = require("./foreign.js");
  6500. var Data_Function = require("../Data.Function/index.js");
  6501. var Data_Functor = require("../Data.Functor/index.js");
  6502. var Data_Maybe = require("../Data.Maybe/index.js");
  6503. var Data_Maybe_First = require("../Data.Maybe.First/index.js");
  6504. var Data_Maybe_Last = require("../Data.Maybe.Last/index.js");
  6505. var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js");
  6506. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  6507. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  6508. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  6509. var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
  6510. var Data_Unit = require("../Data.Unit/index.js");
  6511. var FunctorWithIndex = function FunctorWithIndex(Functor0, mapWithIndex) {
  6512. this.Functor0 = Functor0;
  6513. this.mapWithIndex = mapWithIndex;
  6514. };
  6515. var mapWithIndex = function mapWithIndex(dict) {
  6516. return dict.mapWithIndex;
  6517. };
  6518. var mapDefault = function mapDefault(dictFunctorWithIndex) {
  6519. return function (f) {
  6520. return mapWithIndex(dictFunctorWithIndex)(Data_Function["const"](f));
  6521. };
  6522. };
  6523. var functorWithIndexMultiplicative = new FunctorWithIndex(function () {
  6524. return Data_Monoid_Multiplicative.functorMultiplicative;
  6525. }, function (f) {
  6526. return Data_Functor.map(Data_Monoid_Multiplicative.functorMultiplicative)(f(Data_Unit.unit));
  6527. });
  6528. var functorWithIndexMaybe = new FunctorWithIndex(function () {
  6529. return Data_Maybe.functorMaybe;
  6530. }, function (f) {
  6531. return Data_Functor.map(Data_Maybe.functorMaybe)(f(Data_Unit.unit));
  6532. });
  6533. var functorWithIndexLast = new FunctorWithIndex(function () {
  6534. return Data_Maybe_Last.functorLast;
  6535. }, function (f) {
  6536. return Data_Functor.map(Data_Maybe_Last.functorLast)(f(Data_Unit.unit));
  6537. });
  6538. var functorWithIndexFirst = new FunctorWithIndex(function () {
  6539. return Data_Maybe_First.functorFirst;
  6540. }, function (f) {
  6541. return Data_Functor.map(Data_Maybe_First.functorFirst)(f(Data_Unit.unit));
  6542. });
  6543. var functorWithIndexDual = new FunctorWithIndex(function () {
  6544. return Data_Monoid_Dual.functorDual;
  6545. }, function (f) {
  6546. return Data_Functor.map(Data_Monoid_Dual.functorDual)(f(Data_Unit.unit));
  6547. });
  6548. var functorWithIndexDisj = new FunctorWithIndex(function () {
  6549. return Data_Monoid_Disj.functorDisj;
  6550. }, function (f) {
  6551. return Data_Functor.map(Data_Monoid_Disj.functorDisj)(f(Data_Unit.unit));
  6552. });
  6553. var functorWithIndexConj = new FunctorWithIndex(function () {
  6554. return Data_Monoid_Conj.functorConj;
  6555. }, function (f) {
  6556. return Data_Functor.map(Data_Monoid_Conj.functorConj)(f(Data_Unit.unit));
  6557. });
  6558. var functorWithIndexArray = new FunctorWithIndex(function () {
  6559. return Data_Functor.functorArray;
  6560. }, $foreign.mapWithIndexArray);
  6561. var functorWithIndexAdditive = new FunctorWithIndex(function () {
  6562. return Data_Monoid_Additive.functorAdditive;
  6563. }, function (f) {
  6564. return Data_Functor.map(Data_Monoid_Additive.functorAdditive)(f(Data_Unit.unit));
  6565. });
  6566. module.exports = {
  6567. FunctorWithIndex: FunctorWithIndex,
  6568. mapWithIndex: mapWithIndex,
  6569. mapDefault: mapDefault,
  6570. functorWithIndexArray: functorWithIndexArray,
  6571. functorWithIndexMaybe: functorWithIndexMaybe,
  6572. functorWithIndexFirst: functorWithIndexFirst,
  6573. functorWithIndexLast: functorWithIndexLast,
  6574. functorWithIndexAdditive: functorWithIndexAdditive,
  6575. functorWithIndexDual: functorWithIndexDual,
  6576. functorWithIndexConj: functorWithIndexConj,
  6577. functorWithIndexDisj: functorWithIndexDisj,
  6578. functorWithIndexMultiplicative: functorWithIndexMultiplicative
  6579. };
  6580. },{"./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) {
  6581. // Generated by purs version 0.13.6
  6582. "use strict";
  6583. var Control_Applicative = require("../Control.Applicative/index.js");
  6584. var Control_Apply = require("../Control.Apply/index.js");
  6585. var Control_Bind = require("../Control.Bind/index.js");
  6586. var Control_Category = require("../Control.Category/index.js");
  6587. var Data_Foldable = require("../Data.Foldable/index.js");
  6588. var Data_Function = require("../Data.Function/index.js");
  6589. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  6590. var Data_Maybe = require("../Data.Maybe/index.js");
  6591. var Data_Monoid = require("../Data.Monoid/index.js");
  6592. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  6593. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  6594. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  6595. var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
  6596. var Data_Newtype = require("../Data.Newtype/index.js");
  6597. var Data_Semigroup = require("../Data.Semigroup/index.js");
  6598. var Data_Unit = require("../Data.Unit/index.js");
  6599. var Tuple = function () {
  6600. function Tuple(value0, value1) {
  6601. this.value0 = value0;
  6602. this.value1 = value1;
  6603. }
  6604. ;
  6605. Tuple.create = function (value0) {
  6606. return function (value1) {
  6607. return new Tuple(value0, value1);
  6608. };
  6609. };
  6610. return Tuple;
  6611. }();
  6612. var FoldableWithIndex = function FoldableWithIndex(Foldable0, foldMapWithIndex, foldlWithIndex, foldrWithIndex) {
  6613. this.Foldable0 = Foldable0;
  6614. this.foldMapWithIndex = foldMapWithIndex;
  6615. this.foldlWithIndex = foldlWithIndex;
  6616. this.foldrWithIndex = foldrWithIndex;
  6617. };
  6618. var foldrWithIndex = function foldrWithIndex(dict) {
  6619. return dict.foldrWithIndex;
  6620. };
  6621. var traverseWithIndex_ = function traverseWithIndex_(dictApplicative) {
  6622. return function (dictFoldableWithIndex) {
  6623. return function (f) {
  6624. return foldrWithIndex(dictFoldableWithIndex)(function (i) {
  6625. var $46 = Control_Apply.applySecond(dictApplicative.Apply0());
  6626. var $47 = f(i);
  6627. return function ($48) {
  6628. return $46($47($48));
  6629. };
  6630. })(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
  6631. };
  6632. };
  6633. };
  6634. var forWithIndex_ = function forWithIndex_(dictApplicative) {
  6635. return function (dictFoldableWithIndex) {
  6636. return Data_Function.flip(traverseWithIndex_(dictApplicative)(dictFoldableWithIndex));
  6637. };
  6638. };
  6639. var foldrDefault = function foldrDefault(dictFoldableWithIndex) {
  6640. return function (f) {
  6641. return foldrWithIndex(dictFoldableWithIndex)(Data_Function["const"](f));
  6642. };
  6643. };
  6644. var foldlWithIndex = function foldlWithIndex(dict) {
  6645. return dict.foldlWithIndex;
  6646. };
  6647. var foldlDefault = function foldlDefault(dictFoldableWithIndex) {
  6648. return function (f) {
  6649. return foldlWithIndex(dictFoldableWithIndex)(Data_Function["const"](f));
  6650. };
  6651. };
  6652. var foldableWithIndexMultiplicative = new FoldableWithIndex(function () {
  6653. return Data_Foldable.foldableMultiplicative;
  6654. }, function (dictMonoid) {
  6655. return function (f) {
  6656. return Data_Foldable.foldMap(Data_Foldable.foldableMultiplicative)(dictMonoid)(f(Data_Unit.unit));
  6657. };
  6658. }, function (f) {
  6659. return Data_Foldable.foldl(Data_Foldable.foldableMultiplicative)(f(Data_Unit.unit));
  6660. }, function (f) {
  6661. return Data_Foldable.foldr(Data_Foldable.foldableMultiplicative)(f(Data_Unit.unit));
  6662. });
  6663. var foldableWithIndexMaybe = new FoldableWithIndex(function () {
  6664. return Data_Foldable.foldableMaybe;
  6665. }, function (dictMonoid) {
  6666. return function (f) {
  6667. return Data_Foldable.foldMap(Data_Foldable.foldableMaybe)(dictMonoid)(f(Data_Unit.unit));
  6668. };
  6669. }, function (f) {
  6670. return Data_Foldable.foldl(Data_Foldable.foldableMaybe)(f(Data_Unit.unit));
  6671. }, function (f) {
  6672. return Data_Foldable.foldr(Data_Foldable.foldableMaybe)(f(Data_Unit.unit));
  6673. });
  6674. var foldableWithIndexLast = new FoldableWithIndex(function () {
  6675. return Data_Foldable.foldableLast;
  6676. }, function (dictMonoid) {
  6677. return function (f) {
  6678. return Data_Foldable.foldMap(Data_Foldable.foldableLast)(dictMonoid)(f(Data_Unit.unit));
  6679. };
  6680. }, function (f) {
  6681. return Data_Foldable.foldl(Data_Foldable.foldableLast)(f(Data_Unit.unit));
  6682. }, function (f) {
  6683. return Data_Foldable.foldr(Data_Foldable.foldableLast)(f(Data_Unit.unit));
  6684. });
  6685. var foldableWithIndexFirst = new FoldableWithIndex(function () {
  6686. return Data_Foldable.foldableFirst;
  6687. }, function (dictMonoid) {
  6688. return function (f) {
  6689. return Data_Foldable.foldMap(Data_Foldable.foldableFirst)(dictMonoid)(f(Data_Unit.unit));
  6690. };
  6691. }, function (f) {
  6692. return Data_Foldable.foldl(Data_Foldable.foldableFirst)(f(Data_Unit.unit));
  6693. }, function (f) {
  6694. return Data_Foldable.foldr(Data_Foldable.foldableFirst)(f(Data_Unit.unit));
  6695. });
  6696. var foldableWithIndexDual = new FoldableWithIndex(function () {
  6697. return Data_Foldable.foldableDual;
  6698. }, function (dictMonoid) {
  6699. return function (f) {
  6700. return Data_Foldable.foldMap(Data_Foldable.foldableDual)(dictMonoid)(f(Data_Unit.unit));
  6701. };
  6702. }, function (f) {
  6703. return Data_Foldable.foldl(Data_Foldable.foldableDual)(f(Data_Unit.unit));
  6704. }, function (f) {
  6705. return Data_Foldable.foldr(Data_Foldable.foldableDual)(f(Data_Unit.unit));
  6706. });
  6707. var foldableWithIndexDisj = new FoldableWithIndex(function () {
  6708. return Data_Foldable.foldableDisj;
  6709. }, function (dictMonoid) {
  6710. return function (f) {
  6711. return Data_Foldable.foldMap(Data_Foldable.foldableDisj)(dictMonoid)(f(Data_Unit.unit));
  6712. };
  6713. }, function (f) {
  6714. return Data_Foldable.foldl(Data_Foldable.foldableDisj)(f(Data_Unit.unit));
  6715. }, function (f) {
  6716. return Data_Foldable.foldr(Data_Foldable.foldableDisj)(f(Data_Unit.unit));
  6717. });
  6718. var foldableWithIndexConj = new FoldableWithIndex(function () {
  6719. return Data_Foldable.foldableConj;
  6720. }, function (dictMonoid) {
  6721. return function (f) {
  6722. return Data_Foldable.foldMap(Data_Foldable.foldableConj)(dictMonoid)(f(Data_Unit.unit));
  6723. };
  6724. }, function (f) {
  6725. return Data_Foldable.foldl(Data_Foldable.foldableConj)(f(Data_Unit.unit));
  6726. }, function (f) {
  6727. return Data_Foldable.foldr(Data_Foldable.foldableConj)(f(Data_Unit.unit));
  6728. });
  6729. var foldableWithIndexAdditive = new FoldableWithIndex(function () {
  6730. return Data_Foldable.foldableAdditive;
  6731. }, function (dictMonoid) {
  6732. return function (f) {
  6733. return Data_Foldable.foldMap(Data_Foldable.foldableAdditive)(dictMonoid)(f(Data_Unit.unit));
  6734. };
  6735. }, function (f) {
  6736. return Data_Foldable.foldl(Data_Foldable.foldableAdditive)(f(Data_Unit.unit));
  6737. }, function (f) {
  6738. return Data_Foldable.foldr(Data_Foldable.foldableAdditive)(f(Data_Unit.unit));
  6739. });
  6740. var foldWithIndexM = function foldWithIndexM(dictFoldableWithIndex) {
  6741. return function (dictMonad) {
  6742. return function (f) {
  6743. return function (a0) {
  6744. return foldlWithIndex(dictFoldableWithIndex)(function (i) {
  6745. return function (ma) {
  6746. return function (b) {
  6747. return Control_Bind.bind(dictMonad.Bind1())(ma)(Data_Function.flip(f(i))(b));
  6748. };
  6749. };
  6750. })(Control_Applicative.pure(dictMonad.Applicative0())(a0));
  6751. };
  6752. };
  6753. };
  6754. };
  6755. var foldMapWithIndexDefaultR = function foldMapWithIndexDefaultR(dictFoldableWithIndex) {
  6756. return function (dictMonoid) {
  6757. return function (f) {
  6758. return foldrWithIndex(dictFoldableWithIndex)(function (i) {
  6759. return function (x) {
  6760. return function (acc) {
  6761. return Data_Semigroup.append(dictMonoid.Semigroup0())(f(i)(x))(acc);
  6762. };
  6763. };
  6764. })(Data_Monoid.mempty(dictMonoid));
  6765. };
  6766. };
  6767. };
  6768. var foldableWithIndexArray = new FoldableWithIndex(function () {
  6769. return Data_Foldable.foldableArray;
  6770. }, function (dictMonoid) {
  6771. return foldMapWithIndexDefaultR(foldableWithIndexArray)(dictMonoid);
  6772. }, function (f) {
  6773. return function (z) {
  6774. var $49 = Data_Foldable.foldl(Data_Foldable.foldableArray)(function (y) {
  6775. return function (v) {
  6776. return f(v.value0)(y)(v.value1);
  6777. };
  6778. })(z);
  6779. var $50 = Data_FunctorWithIndex.mapWithIndex(Data_FunctorWithIndex.functorWithIndexArray)(Tuple.create);
  6780. return function ($51) {
  6781. return $49($50($51));
  6782. };
  6783. };
  6784. }, function (f) {
  6785. return function (z) {
  6786. var $52 = Data_Foldable.foldr(Data_Foldable.foldableArray)(function (v) {
  6787. return function (y) {
  6788. return f(v.value0)(v.value1)(y);
  6789. };
  6790. })(z);
  6791. var $53 = Data_FunctorWithIndex.mapWithIndex(Data_FunctorWithIndex.functorWithIndexArray)(Tuple.create);
  6792. return function ($54) {
  6793. return $52($53($54));
  6794. };
  6795. };
  6796. });
  6797. var foldMapWithIndexDefaultL = function foldMapWithIndexDefaultL(dictFoldableWithIndex) {
  6798. return function (dictMonoid) {
  6799. return function (f) {
  6800. return foldlWithIndex(dictFoldableWithIndex)(function (i) {
  6801. return function (acc) {
  6802. return function (x) {
  6803. return Data_Semigroup.append(dictMonoid.Semigroup0())(acc)(f(i)(x));
  6804. };
  6805. };
  6806. })(Data_Monoid.mempty(dictMonoid));
  6807. };
  6808. };
  6809. };
  6810. var foldMapWithIndex = function foldMapWithIndex(dict) {
  6811. return dict.foldMapWithIndex;
  6812. };
  6813. var foldlWithIndexDefault = function foldlWithIndexDefault(dictFoldableWithIndex) {
  6814. return function (c) {
  6815. return function (u) {
  6816. return function (xs) {
  6817. 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) {
  6818. var $55 = Data_Function.flip(c(i));
  6819. return function ($56) {
  6820. return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($55($56)));
  6821. };
  6822. })(xs)))(u);
  6823. };
  6824. };
  6825. };
  6826. };
  6827. var foldrWithIndexDefault = function foldrWithIndexDefault(dictFoldableWithIndex) {
  6828. return function (c) {
  6829. return function (u) {
  6830. return function (xs) {
  6831. return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(function (i) {
  6832. var $57 = c(i);
  6833. return function ($58) {
  6834. return Data_Monoid_Endo.Endo($57($58));
  6835. };
  6836. })(xs))(u);
  6837. };
  6838. };
  6839. };
  6840. };
  6841. var surroundMapWithIndex = function surroundMapWithIndex(dictFoldableWithIndex) {
  6842. return function (dictSemigroup) {
  6843. return function (d) {
  6844. return function (t) {
  6845. return function (f) {
  6846. var joined = function joined(i) {
  6847. return function (a) {
  6848. return function (m) {
  6849. return Data_Semigroup.append(dictSemigroup)(d)(Data_Semigroup.append(dictSemigroup)(t(i)(a))(m));
  6850. };
  6851. };
  6852. };
  6853. return Data_Newtype.unwrap(Data_Newtype.newtypeEndo)(foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Endo.monoidEndo(Control_Category.categoryFn))(joined)(f))(d);
  6854. };
  6855. };
  6856. };
  6857. };
  6858. };
  6859. var foldMapDefault = function foldMapDefault(dictFoldableWithIndex) {
  6860. return function (dictMonoid) {
  6861. return function (f) {
  6862. return foldMapWithIndex(dictFoldableWithIndex)(dictMonoid)(Data_Function["const"](f));
  6863. };
  6864. };
  6865. };
  6866. var findWithIndex = function findWithIndex(dictFoldableWithIndex) {
  6867. return function (p) {
  6868. var go = function go(v) {
  6869. return function (v1) {
  6870. return function (v2) {
  6871. if (v1 instanceof Data_Maybe.Nothing && p(v)(v2)) {
  6872. return new Data_Maybe.Just({
  6873. index: v,
  6874. value: v2
  6875. });
  6876. }
  6877. ;
  6878. return v1;
  6879. };
  6880. };
  6881. };
  6882. return foldlWithIndex(dictFoldableWithIndex)(go)(Data_Maybe.Nothing.value);
  6883. };
  6884. };
  6885. var anyWithIndex = function anyWithIndex(dictFoldableWithIndex) {
  6886. return function (dictHeytingAlgebra) {
  6887. return function (t) {
  6888. var $59 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
  6889. var $60 = foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Disj.monoidDisj(dictHeytingAlgebra))(function (i) {
  6890. var $62 = t(i);
  6891. return function ($63) {
  6892. return Data_Monoid_Disj.Disj($62($63));
  6893. };
  6894. });
  6895. return function ($61) {
  6896. return $59($60($61));
  6897. };
  6898. };
  6899. };
  6900. };
  6901. var allWithIndex = function allWithIndex(dictFoldableWithIndex) {
  6902. return function (dictHeytingAlgebra) {
  6903. return function (t) {
  6904. var $64 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
  6905. var $65 = foldMapWithIndex(dictFoldableWithIndex)(Data_Monoid_Conj.monoidConj(dictHeytingAlgebra))(function (i) {
  6906. var $67 = t(i);
  6907. return function ($68) {
  6908. return Data_Monoid_Conj.Conj($67($68));
  6909. };
  6910. });
  6911. return function ($66) {
  6912. return $64($65($66));
  6913. };
  6914. };
  6915. };
  6916. };
  6917. module.exports = {
  6918. FoldableWithIndex: FoldableWithIndex,
  6919. foldrWithIndex: foldrWithIndex,
  6920. foldlWithIndex: foldlWithIndex,
  6921. foldMapWithIndex: foldMapWithIndex,
  6922. foldrWithIndexDefault: foldrWithIndexDefault,
  6923. foldlWithIndexDefault: foldlWithIndexDefault,
  6924. foldMapWithIndexDefaultR: foldMapWithIndexDefaultR,
  6925. foldMapWithIndexDefaultL: foldMapWithIndexDefaultL,
  6926. foldWithIndexM: foldWithIndexM,
  6927. traverseWithIndex_: traverseWithIndex_,
  6928. forWithIndex_: forWithIndex_,
  6929. surroundMapWithIndex: surroundMapWithIndex,
  6930. allWithIndex: allWithIndex,
  6931. anyWithIndex: anyWithIndex,
  6932. findWithIndex: findWithIndex,
  6933. foldrDefault: foldrDefault,
  6934. foldlDefault: foldlDefault,
  6935. foldMapDefault: foldMapDefault,
  6936. foldableWithIndexArray: foldableWithIndexArray,
  6937. foldableWithIndexMaybe: foldableWithIndexMaybe,
  6938. foldableWithIndexFirst: foldableWithIndexFirst,
  6939. foldableWithIndexLast: foldableWithIndexLast,
  6940. foldableWithIndexAdditive: foldableWithIndexAdditive,
  6941. foldableWithIndexDual: foldableWithIndexDual,
  6942. foldableWithIndexDisj: foldableWithIndexDisj,
  6943. foldableWithIndexConj: foldableWithIndexConj,
  6944. foldableWithIndexMultiplicative: foldableWithIndexMultiplicative
  6945. };
  6946. },{"../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) {
  6947. // Generated by purs version 0.13.6
  6948. "use strict";
  6949. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  6950. var Data_Function = require("../Data.Function/index.js");
  6951. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  6952. var Data_Traversable = require("../Data.Traversable/index.js");
  6953. var Data_Traversable_Accum_Internal = require("../Data.Traversable.Accum.Internal/index.js");
  6954. var Data_Unit = require("../Data.Unit/index.js");
  6955. var TraversableWithIndex = function TraversableWithIndex(FoldableWithIndex1, FunctorWithIndex0, Traversable2, traverseWithIndex) {
  6956. this.FoldableWithIndex1 = FoldableWithIndex1;
  6957. this.FunctorWithIndex0 = FunctorWithIndex0;
  6958. this.Traversable2 = Traversable2;
  6959. this.traverseWithIndex = traverseWithIndex;
  6960. };
  6961. var traverseWithIndexDefault = function traverseWithIndexDefault(dictTraversableWithIndex) {
  6962. return function (dictApplicative) {
  6963. return function (f) {
  6964. var $19 = Data_Traversable.sequence(dictTraversableWithIndex.Traversable2())(dictApplicative);
  6965. var $20 = Data_FunctorWithIndex.mapWithIndex(dictTraversableWithIndex.FunctorWithIndex0())(f);
  6966. return function ($21) {
  6967. return $19($20($21));
  6968. };
  6969. };
  6970. };
  6971. };
  6972. var traverseWithIndex = function traverseWithIndex(dict) {
  6973. return dict.traverseWithIndex;
  6974. };
  6975. var traverseDefault = function traverseDefault(dictTraversableWithIndex) {
  6976. return function (dictApplicative) {
  6977. return function (f) {
  6978. return traverseWithIndex(dictTraversableWithIndex)(dictApplicative)(Data_Function["const"](f));
  6979. };
  6980. };
  6981. };
  6982. var traversableWithIndexMultiplicative = new TraversableWithIndex(function () {
  6983. return Data_FoldableWithIndex.foldableWithIndexMultiplicative;
  6984. }, function () {
  6985. return Data_FunctorWithIndex.functorWithIndexMultiplicative;
  6986. }, function () {
  6987. return Data_Traversable.traversableMultiplicative;
  6988. }, function (dictApplicative) {
  6989. return function (f) {
  6990. return Data_Traversable.traverse(Data_Traversable.traversableMultiplicative)(dictApplicative)(f(Data_Unit.unit));
  6991. };
  6992. });
  6993. var traversableWithIndexMaybe = new TraversableWithIndex(function () {
  6994. return Data_FoldableWithIndex.foldableWithIndexMaybe;
  6995. }, function () {
  6996. return Data_FunctorWithIndex.functorWithIndexMaybe;
  6997. }, function () {
  6998. return Data_Traversable.traversableMaybe;
  6999. }, function (dictApplicative) {
  7000. return function (f) {
  7001. return Data_Traversable.traverse(Data_Traversable.traversableMaybe)(dictApplicative)(f(Data_Unit.unit));
  7002. };
  7003. });
  7004. var traversableWithIndexLast = new TraversableWithIndex(function () {
  7005. return Data_FoldableWithIndex.foldableWithIndexLast;
  7006. }, function () {
  7007. return Data_FunctorWithIndex.functorWithIndexLast;
  7008. }, function () {
  7009. return Data_Traversable.traversableLast;
  7010. }, function (dictApplicative) {
  7011. return function (f) {
  7012. return Data_Traversable.traverse(Data_Traversable.traversableLast)(dictApplicative)(f(Data_Unit.unit));
  7013. };
  7014. });
  7015. var traversableWithIndexFirst = new TraversableWithIndex(function () {
  7016. return Data_FoldableWithIndex.foldableWithIndexFirst;
  7017. }, function () {
  7018. return Data_FunctorWithIndex.functorWithIndexFirst;
  7019. }, function () {
  7020. return Data_Traversable.traversableFirst;
  7021. }, function (dictApplicative) {
  7022. return function (f) {
  7023. return Data_Traversable.traverse(Data_Traversable.traversableFirst)(dictApplicative)(f(Data_Unit.unit));
  7024. };
  7025. });
  7026. var traversableWithIndexDual = new TraversableWithIndex(function () {
  7027. return Data_FoldableWithIndex.foldableWithIndexDual;
  7028. }, function () {
  7029. return Data_FunctorWithIndex.functorWithIndexDual;
  7030. }, function () {
  7031. return Data_Traversable.traversableDual;
  7032. }, function (dictApplicative) {
  7033. return function (f) {
  7034. return Data_Traversable.traverse(Data_Traversable.traversableDual)(dictApplicative)(f(Data_Unit.unit));
  7035. };
  7036. });
  7037. var traversableWithIndexDisj = new TraversableWithIndex(function () {
  7038. return Data_FoldableWithIndex.foldableWithIndexDisj;
  7039. }, function () {
  7040. return Data_FunctorWithIndex.functorWithIndexDisj;
  7041. }, function () {
  7042. return Data_Traversable.traversableDisj;
  7043. }, function (dictApplicative) {
  7044. return function (f) {
  7045. return Data_Traversable.traverse(Data_Traversable.traversableDisj)(dictApplicative)(f(Data_Unit.unit));
  7046. };
  7047. });
  7048. var traversableWithIndexConj = new TraversableWithIndex(function () {
  7049. return Data_FoldableWithIndex.foldableWithIndexConj;
  7050. }, function () {
  7051. return Data_FunctorWithIndex.functorWithIndexConj;
  7052. }, function () {
  7053. return Data_Traversable.traversableConj;
  7054. }, function (dictApplicative) {
  7055. return function (f) {
  7056. return Data_Traversable.traverse(Data_Traversable.traversableConj)(dictApplicative)(f(Data_Unit.unit));
  7057. };
  7058. });
  7059. var traversableWithIndexArray = new TraversableWithIndex(function () {
  7060. return Data_FoldableWithIndex.foldableWithIndexArray;
  7061. }, function () {
  7062. return Data_FunctorWithIndex.functorWithIndexArray;
  7063. }, function () {
  7064. return Data_Traversable.traversableArray;
  7065. }, function (dictApplicative) {
  7066. return traverseWithIndexDefault(traversableWithIndexArray)(dictApplicative);
  7067. });
  7068. var traversableWithIndexAdditive = new TraversableWithIndex(function () {
  7069. return Data_FoldableWithIndex.foldableWithIndexAdditive;
  7070. }, function () {
  7071. return Data_FunctorWithIndex.functorWithIndexAdditive;
  7072. }, function () {
  7073. return Data_Traversable.traversableAdditive;
  7074. }, function (dictApplicative) {
  7075. return function (f) {
  7076. return Data_Traversable.traverse(Data_Traversable.traversableAdditive)(dictApplicative)(f(Data_Unit.unit));
  7077. };
  7078. });
  7079. var mapAccumRWithIndex = function mapAccumRWithIndex(dictTraversableWithIndex) {
  7080. return function (f) {
  7081. return function (s0) {
  7082. return function (xs) {
  7083. return Data_Traversable_Accum_Internal.stateR(traverseWithIndex(dictTraversableWithIndex)(Data_Traversable_Accum_Internal.applicativeStateR)(function (i) {
  7084. return function (a) {
  7085. return function (s) {
  7086. return f(i)(s)(a);
  7087. };
  7088. };
  7089. })(xs))(s0);
  7090. };
  7091. };
  7092. };
  7093. };
  7094. var scanrWithIndex = function scanrWithIndex(dictTraversableWithIndex) {
  7095. return function (f) {
  7096. return function (b0) {
  7097. return function (xs) {
  7098. return mapAccumRWithIndex(dictTraversableWithIndex)(function (i) {
  7099. return function (b) {
  7100. return function (a) {
  7101. var b$prime = f(i)(a)(b);
  7102. return {
  7103. accum: b$prime,
  7104. value: b$prime
  7105. };
  7106. };
  7107. };
  7108. })(b0)(xs).value;
  7109. };
  7110. };
  7111. };
  7112. };
  7113. var mapAccumLWithIndex = function mapAccumLWithIndex(dictTraversableWithIndex) {
  7114. return function (f) {
  7115. return function (s0) {
  7116. return function (xs) {
  7117. return Data_Traversable_Accum_Internal.stateL(traverseWithIndex(dictTraversableWithIndex)(Data_Traversable_Accum_Internal.applicativeStateL)(function (i) {
  7118. return function (a) {
  7119. return function (s) {
  7120. return f(i)(s)(a);
  7121. };
  7122. };
  7123. })(xs))(s0);
  7124. };
  7125. };
  7126. };
  7127. };
  7128. var scanlWithIndex = function scanlWithIndex(dictTraversableWithIndex) {
  7129. return function (f) {
  7130. return function (b0) {
  7131. return function (xs) {
  7132. return mapAccumLWithIndex(dictTraversableWithIndex)(function (i) {
  7133. return function (b) {
  7134. return function (a) {
  7135. var b$prime = f(i)(b)(a);
  7136. return {
  7137. accum: b$prime,
  7138. value: b$prime
  7139. };
  7140. };
  7141. };
  7142. })(b0)(xs).value;
  7143. };
  7144. };
  7145. };
  7146. };
  7147. var forWithIndex = function forWithIndex(dictApplicative) {
  7148. return function (dictTraversableWithIndex) {
  7149. return Data_Function.flip(traverseWithIndex(dictTraversableWithIndex)(dictApplicative));
  7150. };
  7151. };
  7152. module.exports = {
  7153. TraversableWithIndex: TraversableWithIndex,
  7154. traverseWithIndex: traverseWithIndex,
  7155. traverseWithIndexDefault: traverseWithIndexDefault,
  7156. forWithIndex: forWithIndex,
  7157. scanlWithIndex: scanlWithIndex,
  7158. mapAccumLWithIndex: mapAccumLWithIndex,
  7159. scanrWithIndex: scanrWithIndex,
  7160. mapAccumRWithIndex: mapAccumRWithIndex,
  7161. traverseDefault: traverseDefault,
  7162. traversableWithIndexArray: traversableWithIndexArray,
  7163. traversableWithIndexMaybe: traversableWithIndexMaybe,
  7164. traversableWithIndexFirst: traversableWithIndexFirst,
  7165. traversableWithIndexLast: traversableWithIndexLast,
  7166. traversableWithIndexAdditive: traversableWithIndexAdditive,
  7167. traversableWithIndexDual: traversableWithIndexDual,
  7168. traversableWithIndexConj: traversableWithIndexConj,
  7169. traversableWithIndexDisj: traversableWithIndexDisj,
  7170. traversableWithIndexMultiplicative: traversableWithIndexMultiplicative
  7171. };
  7172. },{"../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) {
  7173. // Generated by purs version 0.13.6
  7174. "use strict";
  7175. var Control_Alt = require("../Control.Alt/index.js");
  7176. var Control_Applicative = require("../Control.Applicative/index.js");
  7177. var Control_Apply = require("../Control.Apply/index.js");
  7178. var Control_Bind = require("../Control.Bind/index.js");
  7179. var Control_Extend = require("../Control.Extend/index.js");
  7180. var Control_Monad = require("../Control.Monad/index.js");
  7181. var Data_Bifoldable = require("../Data.Bifoldable/index.js");
  7182. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  7183. var Data_Bitraversable = require("../Data.Bitraversable/index.js");
  7184. var Data_Bounded = require("../Data.Bounded/index.js");
  7185. var Data_Eq = require("../Data.Eq/index.js");
  7186. var Data_Foldable = require("../Data.Foldable/index.js");
  7187. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  7188. var Data_Function = require("../Data.Function/index.js");
  7189. var Data_Functor = require("../Data.Functor/index.js");
  7190. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  7191. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  7192. var Data_Maybe = require("../Data.Maybe/index.js");
  7193. var Data_Monoid = require("../Data.Monoid/index.js");
  7194. var Data_Ord = require("../Data.Ord/index.js");
  7195. var Data_Ordering = require("../Data.Ordering/index.js");
  7196. var Data_Semigroup = require("../Data.Semigroup/index.js");
  7197. var Data_Show = require("../Data.Show/index.js");
  7198. var Data_Traversable = require("../Data.Traversable/index.js");
  7199. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  7200. var Data_Unit = require("../Data.Unit/index.js");
  7201. var Left = function () {
  7202. function Left(value0) {
  7203. this.value0 = value0;
  7204. }
  7205. ;
  7206. Left.create = function (value0) {
  7207. return new Left(value0);
  7208. };
  7209. return Left;
  7210. }();
  7211. var Right = function () {
  7212. function Right(value0) {
  7213. this.value0 = value0;
  7214. }
  7215. ;
  7216. Right.create = function (value0) {
  7217. return new Right(value0);
  7218. };
  7219. return Right;
  7220. }();
  7221. var showEither = function showEither(dictShow) {
  7222. return function (dictShow1) {
  7223. return new Data_Show.Show(function (v) {
  7224. if (v instanceof Left) {
  7225. return "(Left " + (Data_Show.show(dictShow)(v.value0) + ")");
  7226. }
  7227. ;
  7228. if (v instanceof Right) {
  7229. return "(Right " + (Data_Show.show(dictShow1)(v.value0) + ")");
  7230. }
  7231. ;
  7232. throw new Error("Failed pattern match at Data.Either (line 163, column 1 - line 165, column 46): " + [v.constructor.name]);
  7233. });
  7234. };
  7235. };
  7236. var note$prime = function note$prime(f) {
  7237. return Data_Maybe["maybe'"](function ($198) {
  7238. return Left.create(f($198));
  7239. })(Right.create);
  7240. };
  7241. var note = function note(a) {
  7242. return Data_Maybe.maybe(new Left(a))(Right.create);
  7243. };
  7244. var functorEither = new Data_Functor.Functor(function (f) {
  7245. return function (m) {
  7246. if (m instanceof Left) {
  7247. return new Left(m.value0);
  7248. }
  7249. ;
  7250. if (m instanceof Right) {
  7251. return new Right(f(m.value0));
  7252. }
  7253. ;
  7254. throw new Error("Failed pattern match at Data.Either (line 38, column 1 - line 38, column 52): " + [m.constructor.name]);
  7255. };
  7256. });
  7257. var functorWithIndexEither = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  7258. return functorEither;
  7259. }, function (f) {
  7260. return Data_Functor.map(functorEither)(f(Data_Unit.unit));
  7261. });
  7262. var invariantEither = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorEither));
  7263. var fromRight = function fromRight(dictPartial) {
  7264. return function (v) {
  7265. if (v instanceof Right) {
  7266. return v.value0;
  7267. }
  7268. ;
  7269. throw new Error("Failed pattern match at Data.Either (line 261, column 1 - line 261, column 52): " + [v.constructor.name]);
  7270. };
  7271. };
  7272. var fromLeft = function fromLeft(dictPartial) {
  7273. return function (v) {
  7274. if (v instanceof Left) {
  7275. return v.value0;
  7276. }
  7277. ;
  7278. throw new Error("Failed pattern match at Data.Either (line 256, column 1 - line 256, column 51): " + [v.constructor.name]);
  7279. };
  7280. };
  7281. var foldableEither = new Data_Foldable.Foldable(function (dictMonoid) {
  7282. return function (f) {
  7283. return function (v) {
  7284. if (v instanceof Left) {
  7285. return Data_Monoid.mempty(dictMonoid);
  7286. }
  7287. ;
  7288. if (v instanceof Right) {
  7289. return f(v.value0);
  7290. }
  7291. ;
  7292. throw new Error("Failed pattern match at Data.Either (line 187, column 1 - line 193, column 28): " + [f.constructor.name, v.constructor.name]);
  7293. };
  7294. };
  7295. }, function (v) {
  7296. return function (z) {
  7297. return function (v1) {
  7298. if (v1 instanceof Left) {
  7299. return z;
  7300. }
  7301. ;
  7302. if (v1 instanceof Right) {
  7303. return v(z)(v1.value0);
  7304. }
  7305. ;
  7306. 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]);
  7307. };
  7308. };
  7309. }, function (v) {
  7310. return function (z) {
  7311. return function (v1) {
  7312. if (v1 instanceof Left) {
  7313. return z;
  7314. }
  7315. ;
  7316. if (v1 instanceof Right) {
  7317. return v(v1.value0)(z);
  7318. }
  7319. ;
  7320. 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]);
  7321. };
  7322. };
  7323. });
  7324. var foldableWithIndexEither = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  7325. return foldableEither;
  7326. }, function (dictMonoid) {
  7327. return function (f) {
  7328. return function (v) {
  7329. if (v instanceof Left) {
  7330. return Data_Monoid.mempty(dictMonoid);
  7331. }
  7332. ;
  7333. if (v instanceof Right) {
  7334. return f(Data_Unit.unit)(v.value0);
  7335. }
  7336. ;
  7337. throw new Error("Failed pattern match at Data.Either (line 195, column 1 - line 201, column 42): " + [f.constructor.name, v.constructor.name]);
  7338. };
  7339. };
  7340. }, function (v) {
  7341. return function (z) {
  7342. return function (v1) {
  7343. if (v1 instanceof Left) {
  7344. return z;
  7345. }
  7346. ;
  7347. if (v1 instanceof Right) {
  7348. return v(Data_Unit.unit)(z)(v1.value0);
  7349. }
  7350. ;
  7351. 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]);
  7352. };
  7353. };
  7354. }, function (v) {
  7355. return function (z) {
  7356. return function (v1) {
  7357. if (v1 instanceof Left) {
  7358. return z;
  7359. }
  7360. ;
  7361. if (v1 instanceof Right) {
  7362. return v(Data_Unit.unit)(v1.value0)(z);
  7363. }
  7364. ;
  7365. 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]);
  7366. };
  7367. };
  7368. });
  7369. var traversableEither = new Data_Traversable.Traversable(function () {
  7370. return foldableEither;
  7371. }, function () {
  7372. return functorEither;
  7373. }, function (dictApplicative) {
  7374. return function (v) {
  7375. if (v instanceof Left) {
  7376. return Control_Applicative.pure(dictApplicative)(new Left(v.value0));
  7377. }
  7378. ;
  7379. if (v instanceof Right) {
  7380. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v.value0);
  7381. }
  7382. ;
  7383. throw new Error("Failed pattern match at Data.Either (line 211, column 1 - line 215, column 36): " + [v.constructor.name]);
  7384. };
  7385. }, function (dictApplicative) {
  7386. return function (v) {
  7387. return function (v1) {
  7388. if (v1 instanceof Left) {
  7389. return Control_Applicative.pure(dictApplicative)(new Left(v1.value0));
  7390. }
  7391. ;
  7392. if (v1 instanceof Right) {
  7393. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v(v1.value0));
  7394. }
  7395. ;
  7396. throw new Error("Failed pattern match at Data.Either (line 211, column 1 - line 215, column 36): " + [v.constructor.name, v1.constructor.name]);
  7397. };
  7398. };
  7399. });
  7400. var traversableWithIndexEither = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  7401. return foldableWithIndexEither;
  7402. }, function () {
  7403. return functorWithIndexEither;
  7404. }, function () {
  7405. return traversableEither;
  7406. }, function (dictApplicative) {
  7407. return function (v) {
  7408. return function (v1) {
  7409. if (v1 instanceof Left) {
  7410. return Control_Applicative.pure(dictApplicative)(new Left(v1.value0));
  7411. }
  7412. ;
  7413. if (v1 instanceof Right) {
  7414. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v(Data_Unit.unit)(v1.value0));
  7415. }
  7416. ;
  7417. throw new Error("Failed pattern match at Data.Either (line 217, column 1 - line 219, column 53): " + [v.constructor.name, v1.constructor.name]);
  7418. };
  7419. };
  7420. });
  7421. var extendEither = new Control_Extend.Extend(function () {
  7422. return functorEither;
  7423. }, function (v) {
  7424. return function (v1) {
  7425. if (v1 instanceof Left) {
  7426. return new Left(v1.value0);
  7427. }
  7428. ;
  7429. return new Right(v(v1));
  7430. };
  7431. });
  7432. var eqEither = function eqEither(dictEq) {
  7433. return function (dictEq1) {
  7434. return new Data_Eq.Eq(function (x) {
  7435. return function (y) {
  7436. if (x instanceof Left && y instanceof Left) {
  7437. return Data_Eq.eq(dictEq)(x.value0)(y.value0);
  7438. }
  7439. ;
  7440. if (x instanceof Right && y instanceof Right) {
  7441. return Data_Eq.eq(dictEq1)(x.value0)(y.value0);
  7442. }
  7443. ;
  7444. return false;
  7445. };
  7446. });
  7447. };
  7448. };
  7449. var ordEither = function ordEither(dictOrd) {
  7450. return function (dictOrd1) {
  7451. return new Data_Ord.Ord(function () {
  7452. return eqEither(dictOrd.Eq0())(dictOrd1.Eq0());
  7453. }, function (x) {
  7454. return function (y) {
  7455. if (x instanceof Left && y instanceof Left) {
  7456. return Data_Ord.compare(dictOrd)(x.value0)(y.value0);
  7457. }
  7458. ;
  7459. if (x instanceof Left) {
  7460. return Data_Ordering.LT.value;
  7461. }
  7462. ;
  7463. if (y instanceof Left) {
  7464. return Data_Ordering.GT.value;
  7465. }
  7466. ;
  7467. if (x instanceof Right && y instanceof Right) {
  7468. return Data_Ord.compare(dictOrd1)(x.value0)(y.value0);
  7469. }
  7470. ;
  7471. throw new Error("Failed pattern match at Data.Either (line 179, column 1 - line 179, column 64): " + [x.constructor.name, y.constructor.name]);
  7472. };
  7473. });
  7474. };
  7475. };
  7476. var eq1Either = function eq1Either(dictEq) {
  7477. return new Data_Eq.Eq1(function (dictEq1) {
  7478. return Data_Eq.eq(eqEither(dictEq)(dictEq1));
  7479. });
  7480. };
  7481. var ord1Either = function ord1Either(dictOrd) {
  7482. return new Data_Ord.Ord1(function () {
  7483. return eq1Either(dictOrd.Eq0());
  7484. }, function (dictOrd1) {
  7485. return Data_Ord.compare(ordEither(dictOrd)(dictOrd1));
  7486. });
  7487. };
  7488. var either = function either(v) {
  7489. return function (v1) {
  7490. return function (v2) {
  7491. if (v2 instanceof Left) {
  7492. return v(v2.value0);
  7493. }
  7494. ;
  7495. if (v2 instanceof Right) {
  7496. return v1(v2.value0);
  7497. }
  7498. ;
  7499. 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]);
  7500. };
  7501. };
  7502. };
  7503. var hush = either(Data_Function["const"](Data_Maybe.Nothing.value))(Data_Maybe.Just.create);
  7504. var isLeft = either(Data_Function["const"](true))(Data_Function["const"](false));
  7505. var isRight = either(Data_Function["const"](false))(Data_Function["const"](true));
  7506. var choose = function choose(dictAlt) {
  7507. return function (a) {
  7508. return function (b) {
  7509. return Control_Alt.alt(dictAlt)(Data_Functor.map(dictAlt.Functor0())(Left.create)(a))(Data_Functor.map(dictAlt.Functor0())(Right.create)(b));
  7510. };
  7511. };
  7512. };
  7513. var boundedEither = function boundedEither(dictBounded) {
  7514. return function (dictBounded1) {
  7515. return new Data_Bounded.Bounded(function () {
  7516. return ordEither(dictBounded.Ord0())(dictBounded1.Ord0());
  7517. }, new Left(Data_Bounded.bottom(dictBounded)), new Right(Data_Bounded.top(dictBounded1)));
  7518. };
  7519. };
  7520. var bifunctorEither = new Data_Bifunctor.Bifunctor(function (v) {
  7521. return function (v1) {
  7522. return function (v2) {
  7523. if (v2 instanceof Left) {
  7524. return new Left(v(v2.value0));
  7525. }
  7526. ;
  7527. if (v2 instanceof Right) {
  7528. return new Right(v1(v2.value0));
  7529. }
  7530. ;
  7531. 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]);
  7532. };
  7533. };
  7534. });
  7535. var bifoldableEither = new Data_Bifoldable.Bifoldable(function (dictMonoid) {
  7536. return function (v) {
  7537. return function (v1) {
  7538. return function (v2) {
  7539. if (v2 instanceof Left) {
  7540. return v(v2.value0);
  7541. }
  7542. ;
  7543. if (v2 instanceof Right) {
  7544. return v1(v2.value0);
  7545. }
  7546. ;
  7547. 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]);
  7548. };
  7549. };
  7550. };
  7551. }, function (v) {
  7552. return function (v1) {
  7553. return function (z) {
  7554. return function (v2) {
  7555. if (v2 instanceof Left) {
  7556. return v(z)(v2.value0);
  7557. }
  7558. ;
  7559. if (v2 instanceof Right) {
  7560. return v1(z)(v2.value0);
  7561. }
  7562. ;
  7563. 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]);
  7564. };
  7565. };
  7566. };
  7567. }, function (v) {
  7568. return function (v1) {
  7569. return function (z) {
  7570. return function (v2) {
  7571. if (v2 instanceof Left) {
  7572. return v(v2.value0)(z);
  7573. }
  7574. ;
  7575. if (v2 instanceof Right) {
  7576. return v1(v2.value0)(z);
  7577. }
  7578. ;
  7579. 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]);
  7580. };
  7581. };
  7582. };
  7583. });
  7584. var bitraversableEither = new Data_Bitraversable.Bitraversable(function () {
  7585. return bifoldableEither;
  7586. }, function () {
  7587. return bifunctorEither;
  7588. }, function (dictApplicative) {
  7589. return function (v) {
  7590. if (v instanceof Left) {
  7591. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Left.create)(v.value0);
  7592. }
  7593. ;
  7594. if (v instanceof Right) {
  7595. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v.value0);
  7596. }
  7597. ;
  7598. throw new Error("Failed pattern match at Data.Either (line 221, column 1 - line 225, column 37): " + [v.constructor.name]);
  7599. };
  7600. }, function (dictApplicative) {
  7601. return function (v) {
  7602. return function (v1) {
  7603. return function (v2) {
  7604. if (v2 instanceof Left) {
  7605. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Left.create)(v(v2.value0));
  7606. }
  7607. ;
  7608. if (v2 instanceof Right) {
  7609. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Right.create)(v1(v2.value0));
  7610. }
  7611. ;
  7612. 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]);
  7613. };
  7614. };
  7615. };
  7616. });
  7617. var applyEither = new Control_Apply.Apply(function () {
  7618. return functorEither;
  7619. }, function (v) {
  7620. return function (v1) {
  7621. if (v instanceof Left) {
  7622. return new Left(v.value0);
  7623. }
  7624. ;
  7625. if (v instanceof Right) {
  7626. return Data_Functor.map(functorEither)(v.value0)(v1);
  7627. }
  7628. ;
  7629. throw new Error("Failed pattern match at Data.Either (line 82, column 1 - line 84, column 30): " + [v.constructor.name, v1.constructor.name]);
  7630. };
  7631. });
  7632. var bindEither = new Control_Bind.Bind(function () {
  7633. return applyEither;
  7634. }, either(function (e) {
  7635. return function (v) {
  7636. return new Left(e);
  7637. };
  7638. })(function (a) {
  7639. return function (f) {
  7640. return f(a);
  7641. };
  7642. }));
  7643. var semigroupEither = function semigroupEither(dictSemigroup) {
  7644. return new Data_Semigroup.Semigroup(function (x) {
  7645. return function (y) {
  7646. return Control_Apply.apply(applyEither)(Data_Functor.map(functorEither)(Data_Semigroup.append(dictSemigroup))(x))(y);
  7647. };
  7648. });
  7649. };
  7650. var applicativeEither = new Control_Applicative.Applicative(function () {
  7651. return applyEither;
  7652. }, Right.create);
  7653. var monadEither = new Control_Monad.Monad(function () {
  7654. return applicativeEither;
  7655. }, function () {
  7656. return bindEither;
  7657. });
  7658. var altEither = new Control_Alt.Alt(function () {
  7659. return functorEither;
  7660. }, function (v) {
  7661. return function (v1) {
  7662. if (v instanceof Left) {
  7663. return v1;
  7664. }
  7665. ;
  7666. return v;
  7667. };
  7668. });
  7669. module.exports = {
  7670. Left: Left,
  7671. Right: Right,
  7672. either: either,
  7673. choose: choose,
  7674. isLeft: isLeft,
  7675. isRight: isRight,
  7676. fromLeft: fromLeft,
  7677. fromRight: fromRight,
  7678. note: note,
  7679. "note'": note$prime,
  7680. hush: hush,
  7681. functorEither: functorEither,
  7682. functorWithIndexEither: functorWithIndexEither,
  7683. invariantEither: invariantEither,
  7684. bifunctorEither: bifunctorEither,
  7685. applyEither: applyEither,
  7686. applicativeEither: applicativeEither,
  7687. altEither: altEither,
  7688. bindEither: bindEither,
  7689. monadEither: monadEither,
  7690. extendEither: extendEither,
  7691. showEither: showEither,
  7692. eqEither: eqEither,
  7693. eq1Either: eq1Either,
  7694. ordEither: ordEither,
  7695. ord1Either: ord1Either,
  7696. boundedEither: boundedEither,
  7697. foldableEither: foldableEither,
  7698. foldableWithIndexEither: foldableWithIndexEither,
  7699. bifoldableEither: bifoldableEither,
  7700. traversableEither: traversableEither,
  7701. traversableWithIndexEither: traversableWithIndexEither,
  7702. bitraversableEither: bitraversableEither,
  7703. semigroupEither: semigroupEither
  7704. };
  7705. },{"../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) {
  7706. "use strict";
  7707. exports.pureE = function (a) {
  7708. return function () {
  7709. return a;
  7710. };
  7711. };
  7712. exports.bindE = function (a) {
  7713. return function (f) {
  7714. return function () {
  7715. return f(a())();
  7716. };
  7717. };
  7718. };
  7719. exports.untilE = function (f) {
  7720. return function () {
  7721. while (!f()) {
  7722. ;
  7723. }
  7724. return {};
  7725. };
  7726. };
  7727. exports.whileE = function (f) {
  7728. return function (a) {
  7729. return function () {
  7730. while (f()) {
  7731. a();
  7732. }
  7733. return {};
  7734. };
  7735. };
  7736. };
  7737. exports.forE = function (lo) {
  7738. return function (hi) {
  7739. return function (f) {
  7740. return function () {
  7741. for (var i = lo; i < hi; i++) {
  7742. f(i)();
  7743. }
  7744. };
  7745. };
  7746. };
  7747. };
  7748. exports.foreachE = function (as) {
  7749. return function (f) {
  7750. return function () {
  7751. for (var i = 0, l = as.length; i < l; i++) {
  7752. f(as[i])();
  7753. }
  7754. };
  7755. };
  7756. };
  7757. },{}],"../output/Effect/index.js":[function(require,module,exports) {
  7758. // Generated by purs version 0.13.6
  7759. "use strict";
  7760. var $foreign = require("./foreign.js");
  7761. var Control_Applicative = require("../Control.Applicative/index.js");
  7762. var Control_Apply = require("../Control.Apply/index.js");
  7763. var Control_Bind = require("../Control.Bind/index.js");
  7764. var Control_Monad = require("../Control.Monad/index.js");
  7765. var Data_Functor = require("../Data.Functor/index.js");
  7766. var Data_Monoid = require("../Data.Monoid/index.js");
  7767. var Data_Semigroup = require("../Data.Semigroup/index.js");
  7768. var monadEffect = new Control_Monad.Monad(function () {
  7769. return applicativeEffect;
  7770. }, function () {
  7771. return bindEffect;
  7772. });
  7773. var bindEffect = new Control_Bind.Bind(function () {
  7774. return applyEffect;
  7775. }, $foreign.bindE);
  7776. var applyEffect = new Control_Apply.Apply(function () {
  7777. return functorEffect;
  7778. }, Control_Monad.ap(monadEffect));
  7779. var applicativeEffect = new Control_Applicative.Applicative(function () {
  7780. return applyEffect;
  7781. }, $foreign.pureE);
  7782. var functorEffect = new Data_Functor.Functor(Control_Applicative.liftA1(applicativeEffect));
  7783. var semigroupEffect = function semigroupEffect(dictSemigroup) {
  7784. return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyEffect)(Data_Semigroup.append(dictSemigroup)));
  7785. };
  7786. var monoidEffect = function monoidEffect(dictMonoid) {
  7787. return new Data_Monoid.Monoid(function () {
  7788. return semigroupEffect(dictMonoid.Semigroup0());
  7789. }, $foreign.pureE(Data_Monoid.mempty(dictMonoid)));
  7790. };
  7791. module.exports = {
  7792. functorEffect: functorEffect,
  7793. applyEffect: applyEffect,
  7794. applicativeEffect: applicativeEffect,
  7795. bindEffect: bindEffect,
  7796. monadEffect: monadEffect,
  7797. semigroupEffect: semigroupEffect,
  7798. monoidEffect: monoidEffect,
  7799. untilE: $foreign.untilE,
  7800. whileE: $foreign.whileE,
  7801. forE: $foreign.forE,
  7802. foreachE: $foreign.foreachE
  7803. };
  7804. },{"./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) {
  7805. "use strict";
  7806. exports.showErrorImpl = function (err) {
  7807. return err.stack || err.toString();
  7808. };
  7809. exports.error = function (msg) {
  7810. return new Error(msg);
  7811. };
  7812. exports.message = function (e) {
  7813. return e.message;
  7814. };
  7815. exports.name = function (e) {
  7816. return e.name || "Error";
  7817. };
  7818. exports.stackImpl = function (just) {
  7819. return function (nothing) {
  7820. return function (e) {
  7821. return e.stack ? just(e.stack) : nothing;
  7822. };
  7823. };
  7824. };
  7825. exports.throwException = function (e) {
  7826. return function () {
  7827. throw e;
  7828. };
  7829. };
  7830. exports.catchException = function (c) {
  7831. return function (t) {
  7832. return function () {
  7833. try {
  7834. return t();
  7835. } catch (e) {
  7836. if (e instanceof Error || Object.prototype.toString.call(e) === "[object Error]") {
  7837. return c(e)();
  7838. } else {
  7839. return c(new Error(e.toString()))();
  7840. }
  7841. }
  7842. };
  7843. };
  7844. };
  7845. },{}],"../output/Effect.Exception/index.js":[function(require,module,exports) {
  7846. // Generated by purs version 0.13.6
  7847. "use strict";
  7848. var $foreign = require("./foreign.js");
  7849. var Control_Applicative = require("../Control.Applicative/index.js");
  7850. var Data_Either = require("../Data.Either/index.js");
  7851. var Data_Functor = require("../Data.Functor/index.js");
  7852. var Data_Maybe = require("../Data.Maybe/index.js");
  7853. var Data_Show = require("../Data.Show/index.js");
  7854. var Effect = require("../Effect/index.js");
  7855. var $$try = function $$try(action) {
  7856. return $foreign.catchException(function () {
  7857. var $0 = Control_Applicative.pure(Effect.applicativeEffect);
  7858. return function ($1) {
  7859. return $0(Data_Either.Left.create($1));
  7860. };
  7861. }())(Data_Functor.map(Effect.functorEffect)(Data_Either.Right.create)(action));
  7862. };
  7863. var $$throw = function $$throw($2) {
  7864. return $foreign.throwException($foreign.error($2));
  7865. };
  7866. var stack = $foreign.stackImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  7867. var showError = new Data_Show.Show($foreign.showErrorImpl);
  7868. module.exports = {
  7869. stack: stack,
  7870. "throw": $$throw,
  7871. "try": $$try,
  7872. showError: showError,
  7873. error: $foreign.error,
  7874. message: $foreign.message,
  7875. name: $foreign.name,
  7876. throwException: $foreign.throwException,
  7877. catchException: $foreign.catchException
  7878. };
  7879. },{"./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) {
  7880. // Generated by purs version 0.13.6
  7881. "use strict";
  7882. var Control_Applicative = require("../Control.Applicative/index.js");
  7883. var Control_Bind = require("../Control.Bind/index.js");
  7884. var Data_Either = require("../Data.Either/index.js");
  7885. var Data_Function = require("../Data.Function/index.js");
  7886. var Data_Functor = require("../Data.Functor/index.js");
  7887. var Data_Maybe = require("../Data.Maybe/index.js");
  7888. var Data_Unit = require("../Data.Unit/index.js");
  7889. var Effect = require("../Effect/index.js");
  7890. var Effect_Exception = require("../Effect.Exception/index.js");
  7891. var MonadThrow = function MonadThrow(Monad0, throwError) {
  7892. this.Monad0 = Monad0;
  7893. this.throwError = throwError;
  7894. };
  7895. var MonadError = function MonadError(MonadThrow0, catchError) {
  7896. this.MonadThrow0 = MonadThrow0;
  7897. this.catchError = catchError;
  7898. };
  7899. var throwError = function throwError(dict) {
  7900. return dict.throwError;
  7901. };
  7902. var monadThrowMaybe = new MonadThrow(function () {
  7903. return Data_Maybe.monadMaybe;
  7904. }, Data_Function["const"](Data_Maybe.Nothing.value));
  7905. var monadThrowEither = new MonadThrow(function () {
  7906. return Data_Either.monadEither;
  7907. }, Data_Either.Left.create);
  7908. var monadThrowEffect = new MonadThrow(function () {
  7909. return Effect.monadEffect;
  7910. }, Effect_Exception.throwException);
  7911. var monadErrorMaybe = new MonadError(function () {
  7912. return monadThrowMaybe;
  7913. }, function (v) {
  7914. return function (v1) {
  7915. if (v instanceof Data_Maybe.Nothing) {
  7916. return v1(Data_Unit.unit);
  7917. }
  7918. ;
  7919. if (v instanceof Data_Maybe.Just) {
  7920. return new Data_Maybe.Just(v.value0);
  7921. }
  7922. ;
  7923. 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]);
  7924. };
  7925. });
  7926. var monadErrorEither = new MonadError(function () {
  7927. return monadThrowEither;
  7928. }, function (v) {
  7929. return function (v1) {
  7930. if (v instanceof Data_Either.Left) {
  7931. return v1(v.value0);
  7932. }
  7933. ;
  7934. if (v instanceof Data_Either.Right) {
  7935. return new Data_Either.Right(v.value0);
  7936. }
  7937. ;
  7938. 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]);
  7939. };
  7940. });
  7941. var monadErrorEffect = new MonadError(function () {
  7942. return monadThrowEffect;
  7943. }, Data_Function.flip(Effect_Exception.catchException));
  7944. var catchError = function catchError(dict) {
  7945. return dict.catchError;
  7946. };
  7947. var catchJust = function catchJust(dictMonadError) {
  7948. return function (p) {
  7949. return function (act) {
  7950. return function (handler) {
  7951. var handle = function handle(e) {
  7952. var v = p(e);
  7953. if (v instanceof Data_Maybe.Nothing) {
  7954. return throwError(dictMonadError.MonadThrow0())(e);
  7955. }
  7956. ;
  7957. if (v instanceof Data_Maybe.Just) {
  7958. return handler(v.value0);
  7959. }
  7960. ;
  7961. throw new Error("Failed pattern match at Control.Monad.Error.Class (line 57, column 5 - line 59, column 26): " + [v.constructor.name]);
  7962. };
  7963. return catchError(dictMonadError)(act)(handle);
  7964. };
  7965. };
  7966. };
  7967. };
  7968. var $$try = function $$try(dictMonadError) {
  7969. return function (a) {
  7970. return catchError(dictMonadError)(Data_Functor.map(dictMonadError.MonadThrow0().Monad0().Bind1().Apply0().Functor0())(Data_Either.Right.create)(a))(function () {
  7971. var $17 = Control_Applicative.pure(dictMonadError.MonadThrow0().Monad0().Applicative0());
  7972. return function ($18) {
  7973. return $17(Data_Either.Left.create($18));
  7974. };
  7975. }());
  7976. };
  7977. };
  7978. var withResource = function withResource(dictMonadError) {
  7979. return function (acquire) {
  7980. return function (release) {
  7981. return function (kleisli) {
  7982. return Control_Bind.bind(dictMonadError.MonadThrow0().Monad0().Bind1())(acquire)(function (resource) {
  7983. return Control_Bind.bind(dictMonadError.MonadThrow0().Monad0().Bind1())($$try(dictMonadError)(kleisli(resource)))(function (result) {
  7984. return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadError.MonadThrow0().Monad0().Bind1())(release(resource))(function () {
  7985. return Data_Either.either(throwError(dictMonadError.MonadThrow0()))(Control_Applicative.pure(dictMonadError.MonadThrow0().Monad0().Applicative0()))(result);
  7986. });
  7987. });
  7988. });
  7989. };
  7990. };
  7991. };
  7992. };
  7993. module.exports = {
  7994. catchError: catchError,
  7995. throwError: throwError,
  7996. MonadThrow: MonadThrow,
  7997. MonadError: MonadError,
  7998. catchJust: catchJust,
  7999. "try": $$try,
  8000. withResource: withResource,
  8001. monadThrowEither: monadThrowEither,
  8002. monadErrorEither: monadErrorEither,
  8003. monadThrowMaybe: monadThrowMaybe,
  8004. monadErrorMaybe: monadErrorMaybe,
  8005. monadThrowEffect: monadThrowEffect,
  8006. monadErrorEffect: monadErrorEffect
  8007. };
  8008. },{"../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) {
  8009. // Generated by purs version 0.13.6
  8010. "use strict";
  8011. var Control_Category = require("../Control.Category/index.js");
  8012. var Control_Monad = require("../Control.Monad/index.js");
  8013. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  8014. var Data_Functor = require("../Data.Functor/index.js");
  8015. var MonadAsk = function MonadAsk(Monad0, ask) {
  8016. this.Monad0 = Monad0;
  8017. this.ask = ask;
  8018. };
  8019. var MonadReader = function MonadReader(MonadAsk0, local) {
  8020. this.MonadAsk0 = MonadAsk0;
  8021. this.local = local;
  8022. };
  8023. var monadAskFun = new MonadAsk(function () {
  8024. return Control_Monad.monadFn;
  8025. }, Control_Category.identity(Control_Category.categoryFn));
  8026. var monadReaderFun = new MonadReader(function () {
  8027. return monadAskFun;
  8028. }, Control_Semigroupoid.composeFlipped(Control_Semigroupoid.semigroupoidFn));
  8029. var local = function local(dict) {
  8030. return dict.local;
  8031. };
  8032. var ask = function ask(dict) {
  8033. return dict.ask;
  8034. };
  8035. var asks = function asks(dictMonadAsk) {
  8036. return function (f) {
  8037. return Data_Functor.map(dictMonadAsk.Monad0().Bind1().Apply0().Functor0())(f)(ask(dictMonadAsk));
  8038. };
  8039. };
  8040. module.exports = {
  8041. ask: ask,
  8042. local: local,
  8043. MonadAsk: MonadAsk,
  8044. asks: asks,
  8045. MonadReader: MonadReader,
  8046. monadAskFun: monadAskFun,
  8047. monadReaderFun: monadReaderFun
  8048. };
  8049. },{"../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) {
  8050. // Generated by purs version 0.13.6
  8051. "use strict";
  8052. var Comonad = function Comonad(Extend0, extract) {
  8053. this.Extend0 = Extend0;
  8054. this.extract = extract;
  8055. };
  8056. var extract = function extract(dict) {
  8057. return dict.extract;
  8058. };
  8059. module.exports = {
  8060. Comonad: Comonad,
  8061. extract: extract
  8062. };
  8063. },{}],"../output/Data.Ord.Max/index.js":[function(require,module,exports) {
  8064. // Generated by purs version 0.13.6
  8065. "use strict";
  8066. var Data_Bounded = require("../Data.Bounded/index.js");
  8067. var Data_Monoid = require("../Data.Monoid/index.js");
  8068. var Data_Newtype = require("../Data.Newtype/index.js");
  8069. var Data_Ord = require("../Data.Ord/index.js");
  8070. var Data_Semigroup = require("../Data.Semigroup/index.js");
  8071. var Data_Show = require("../Data.Show/index.js");
  8072. var Max = function Max(x) {
  8073. return x;
  8074. };
  8075. var showMax = function showMax(dictShow) {
  8076. return new Data_Show.Show(function (v) {
  8077. return "(Max " + (Data_Show.show(dictShow)(v) + ")");
  8078. });
  8079. };
  8080. var semigroupMax = function semigroupMax(dictOrd) {
  8081. return new Data_Semigroup.Semigroup(function (v) {
  8082. return function (v1) {
  8083. return Data_Ord.max(dictOrd)(v)(v1);
  8084. };
  8085. });
  8086. };
  8087. var newtypeMax = new Data_Newtype.Newtype(function (n) {
  8088. return n;
  8089. }, Max);
  8090. var monoidMax = function monoidMax(dictBounded) {
  8091. return new Data_Monoid.Monoid(function () {
  8092. return semigroupMax(dictBounded.Ord0());
  8093. }, Data_Bounded.bottom(dictBounded));
  8094. };
  8095. var eqMax = function eqMax(dictEq) {
  8096. return dictEq;
  8097. };
  8098. var ordMax = function ordMax(dictOrd) {
  8099. return new Data_Ord.Ord(function () {
  8100. return eqMax(dictOrd.Eq0());
  8101. }, function (v) {
  8102. return function (v1) {
  8103. return Data_Ord.compare(dictOrd)(v)(v1);
  8104. };
  8105. });
  8106. };
  8107. module.exports = {
  8108. Max: Max,
  8109. newtypeMax: newtypeMax,
  8110. eqMax: eqMax,
  8111. ordMax: ordMax,
  8112. semigroupMax: semigroupMax,
  8113. monoidMax: monoidMax,
  8114. showMax: showMax
  8115. };
  8116. },{"../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) {
  8117. // Generated by purs version 0.13.6
  8118. "use strict";
  8119. var Data_Bounded = require("../Data.Bounded/index.js");
  8120. var Data_Monoid = require("../Data.Monoid/index.js");
  8121. var Data_Newtype = require("../Data.Newtype/index.js");
  8122. var Data_Ord = require("../Data.Ord/index.js");
  8123. var Data_Semigroup = require("../Data.Semigroup/index.js");
  8124. var Data_Show = require("../Data.Show/index.js");
  8125. var Min = function Min(x) {
  8126. return x;
  8127. };
  8128. var showMin = function showMin(dictShow) {
  8129. return new Data_Show.Show(function (v) {
  8130. return "(Min " + (Data_Show.show(dictShow)(v) + ")");
  8131. });
  8132. };
  8133. var semigroupMin = function semigroupMin(dictOrd) {
  8134. return new Data_Semigroup.Semigroup(function (v) {
  8135. return function (v1) {
  8136. return Data_Ord.min(dictOrd)(v)(v1);
  8137. };
  8138. });
  8139. };
  8140. var newtypeMin = new Data_Newtype.Newtype(function (n) {
  8141. return n;
  8142. }, Min);
  8143. var monoidMin = function monoidMin(dictBounded) {
  8144. return new Data_Monoid.Monoid(function () {
  8145. return semigroupMin(dictBounded.Ord0());
  8146. }, Data_Bounded.top(dictBounded));
  8147. };
  8148. var eqMin = function eqMin(dictEq) {
  8149. return dictEq;
  8150. };
  8151. var ordMin = function ordMin(dictOrd) {
  8152. return new Data_Ord.Ord(function () {
  8153. return eqMin(dictOrd.Eq0());
  8154. }, function (v) {
  8155. return function (v1) {
  8156. return Data_Ord.compare(dictOrd)(v)(v1);
  8157. };
  8158. });
  8159. };
  8160. module.exports = {
  8161. Min: Min,
  8162. newtypeMin: newtypeMin,
  8163. eqMin: eqMin,
  8164. ordMin: ordMin,
  8165. semigroupMin: semigroupMin,
  8166. monoidMin: monoidMin,
  8167. showMin: showMin
  8168. };
  8169. },{"../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) {
  8170. // Generated by purs version 0.13.6
  8171. "use strict";
  8172. var Control_Apply = require("../Control.Apply/index.js");
  8173. var Control_Category = require("../Control.Category/index.js");
  8174. var Data_Foldable = require("../Data.Foldable/index.js");
  8175. var Data_Function = require("../Data.Function/index.js");
  8176. var Data_Functor = require("../Data.Functor/index.js");
  8177. var Data_Newtype = require("../Data.Newtype/index.js");
  8178. var Data_Ord_Max = require("../Data.Ord.Max/index.js");
  8179. var Data_Ord_Min = require("../Data.Ord.Min/index.js");
  8180. var Data_Semigroup = require("../Data.Semigroup/index.js");
  8181. var Data_Unit = require("../Data.Unit/index.js");
  8182. var JoinWith = function JoinWith(x) {
  8183. return x;
  8184. };
  8185. var Act = function Act(x) {
  8186. return x;
  8187. };
  8188. var Foldable1 = function Foldable1(Foldable0, fold1, foldMap1) {
  8189. this.Foldable0 = Foldable0;
  8190. this.fold1 = fold1;
  8191. this.foldMap1 = foldMap1;
  8192. };
  8193. var semigroupJoinWith = function semigroupJoinWith(dictSemigroup) {
  8194. return new Data_Semigroup.Semigroup(function (v) {
  8195. return function (v1) {
  8196. return JoinWith(function (j) {
  8197. return Data_Semigroup.append(dictSemigroup)(v(j))(Data_Semigroup.append(dictSemigroup)(j)(v1(j)));
  8198. });
  8199. };
  8200. });
  8201. };
  8202. var semigroupAct = function semigroupAct(dictApply) {
  8203. return new Data_Semigroup.Semigroup(function (v) {
  8204. return function (v1) {
  8205. return Control_Apply.applySecond(dictApply)(v)(v1);
  8206. };
  8207. });
  8208. };
  8209. var joinee = function joinee(v) {
  8210. return v;
  8211. };
  8212. var getAct = function getAct(v) {
  8213. return v;
  8214. };
  8215. var foldMap1 = function foldMap1(dict) {
  8216. return dict.foldMap1;
  8217. };
  8218. var intercalateMap = function intercalateMap(dictFoldable1) {
  8219. return function (dictSemigroup) {
  8220. return function (j) {
  8221. return function (f) {
  8222. return function (foldable) {
  8223. return joinee(foldMap1(dictFoldable1)(semigroupJoinWith(dictSemigroup))(function ($43) {
  8224. return JoinWith(Data_Function["const"](f($43)));
  8225. })(foldable))(j);
  8226. };
  8227. };
  8228. };
  8229. };
  8230. };
  8231. var intercalate = function intercalate(dictFoldable1) {
  8232. return function (dictSemigroup) {
  8233. return Data_Function.flip(intercalateMap(dictFoldable1)(dictSemigroup))(Control_Category.identity(Control_Category.categoryFn));
  8234. };
  8235. };
  8236. var maximum = function maximum(dictOrd) {
  8237. return function (dictFoldable1) {
  8238. 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)));
  8239. };
  8240. };
  8241. var minimum = function minimum(dictOrd) {
  8242. return function (dictFoldable1) {
  8243. 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)));
  8244. };
  8245. };
  8246. var traverse1_ = function traverse1_(dictFoldable1) {
  8247. return function (dictApply) {
  8248. return function (f) {
  8249. return function (t) {
  8250. return Data_Functor.voidRight(dictApply.Functor0())(Data_Unit.unit)(getAct(foldMap1(dictFoldable1)(semigroupAct(dictApply))(function ($44) {
  8251. return Act(f($44));
  8252. })(t)));
  8253. };
  8254. };
  8255. };
  8256. };
  8257. var for1_ = function for1_(dictFoldable1) {
  8258. return function (dictApply) {
  8259. return Data_Function.flip(traverse1_(dictFoldable1)(dictApply));
  8260. };
  8261. };
  8262. var sequence1_ = function sequence1_(dictFoldable1) {
  8263. return function (dictApply) {
  8264. return traverse1_(dictFoldable1)(dictApply)(Control_Category.identity(Control_Category.categoryFn));
  8265. };
  8266. };
  8267. var fold1Default = function fold1Default(dictFoldable1) {
  8268. return function (dictSemigroup) {
  8269. return foldMap1(dictFoldable1)(dictSemigroup)(Control_Category.identity(Control_Category.categoryFn));
  8270. };
  8271. };
  8272. var foldableDual = new Foldable1(function () {
  8273. return Data_Foldable.foldableDual;
  8274. }, function (dictSemigroup) {
  8275. return fold1Default(foldableDual)(dictSemigroup);
  8276. }, function (dictSemigroup) {
  8277. return function (f) {
  8278. return function (v) {
  8279. return f(v);
  8280. };
  8281. };
  8282. });
  8283. var foldableMultiplicative = new Foldable1(function () {
  8284. return Data_Foldable.foldableMultiplicative;
  8285. }, function (dictSemigroup) {
  8286. return fold1Default(foldableMultiplicative)(dictSemigroup);
  8287. }, function (dictSemigroup) {
  8288. return function (f) {
  8289. return function (v) {
  8290. return f(v);
  8291. };
  8292. };
  8293. });
  8294. var fold1 = function fold1(dict) {
  8295. return dict.fold1;
  8296. };
  8297. var foldMap1Default = function foldMap1Default(dictFoldable1) {
  8298. return function (dictFunctor) {
  8299. return function (dictSemigroup) {
  8300. return function (f) {
  8301. var $45 = fold1(dictFoldable1)(dictSemigroup);
  8302. var $46 = Data_Functor.map(dictFunctor)(f);
  8303. return function ($47) {
  8304. return $45($46($47));
  8305. };
  8306. };
  8307. };
  8308. };
  8309. };
  8310. module.exports = {
  8311. Foldable1: Foldable1,
  8312. foldMap1: foldMap1,
  8313. fold1: fold1,
  8314. traverse1_: traverse1_,
  8315. for1_: for1_,
  8316. sequence1_: sequence1_,
  8317. foldMap1Default: foldMap1Default,
  8318. fold1Default: fold1Default,
  8319. intercalate: intercalate,
  8320. intercalateMap: intercalateMap,
  8321. maximum: maximum,
  8322. minimum: minimum,
  8323. foldableDual: foldableDual,
  8324. foldableMultiplicative: foldableMultiplicative
  8325. };
  8326. },{"../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) {
  8327. // Generated by purs version 0.13.6
  8328. "use strict";
  8329. var Control_Category = require("../Control.Category/index.js");
  8330. var Data_Functor = require("../Data.Functor/index.js");
  8331. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  8332. var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
  8333. var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
  8334. var Data_Traversable = require("../Data.Traversable/index.js");
  8335. var Traversable1 = function Traversable1(Foldable10, _Traversable, sequence1, traverse1) {
  8336. this.Foldable10 = Foldable10;
  8337. this.Traversable1 = _Traversable;
  8338. this.sequence1 = sequence1;
  8339. this.traverse1 = traverse1;
  8340. };
  8341. var traverse1 = function traverse1(dict) {
  8342. return dict.traverse1;
  8343. };
  8344. var sequence1Default = function sequence1Default(dictTraversable1) {
  8345. return function (dictApply) {
  8346. return traverse1(dictTraversable1)(dictApply)(Control_Category.identity(Control_Category.categoryFn));
  8347. };
  8348. };
  8349. var traversableDual = new Traversable1(function () {
  8350. return Data_Semigroup_Foldable.foldableDual;
  8351. }, function () {
  8352. return Data_Traversable.traversableDual;
  8353. }, function (dictApply) {
  8354. return sequence1Default(traversableDual)(dictApply);
  8355. }, function (dictApply) {
  8356. return function (f) {
  8357. return function (v) {
  8358. return Data_Functor.map(dictApply.Functor0())(Data_Monoid_Dual.Dual)(f(v));
  8359. };
  8360. };
  8361. });
  8362. var traversableMultiplicative = new Traversable1(function () {
  8363. return Data_Semigroup_Foldable.foldableMultiplicative;
  8364. }, function () {
  8365. return Data_Traversable.traversableMultiplicative;
  8366. }, function (dictApply) {
  8367. return sequence1Default(traversableMultiplicative)(dictApply);
  8368. }, function (dictApply) {
  8369. return function (f) {
  8370. return function (v) {
  8371. return Data_Functor.map(dictApply.Functor0())(Data_Monoid_Multiplicative.Multiplicative)(f(v));
  8372. };
  8373. };
  8374. });
  8375. var sequence1 = function sequence1(dict) {
  8376. return dict.sequence1;
  8377. };
  8378. var traverse1Default = function traverse1Default(dictTraversable1) {
  8379. return function (dictApply) {
  8380. return function (f) {
  8381. return function (ta) {
  8382. return sequence1(dictTraversable1)(dictApply)(Data_Functor.map(dictTraversable1.Traversable1().Functor0())(f)(ta));
  8383. };
  8384. };
  8385. };
  8386. };
  8387. module.exports = {
  8388. sequence1: sequence1,
  8389. traverse1: traverse1,
  8390. Traversable1: Traversable1,
  8391. traverse1Default: traverse1Default,
  8392. sequence1Default: sequence1Default,
  8393. traversableDual: traversableDual,
  8394. traversableMultiplicative: traversableMultiplicative
  8395. };
  8396. },{"../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) {
  8397. // Generated by purs version 0.13.6
  8398. "use strict";
  8399. var Control_Alt = require("../Control.Alt/index.js");
  8400. var Control_Applicative = require("../Control.Applicative/index.js");
  8401. var Control_Apply = require("../Control.Apply/index.js");
  8402. var Control_Bind = require("../Control.Bind/index.js");
  8403. var Control_Comonad = require("../Control.Comonad/index.js");
  8404. var Control_Extend = require("../Control.Extend/index.js");
  8405. var Control_Monad = require("../Control.Monad/index.js");
  8406. var Data_Eq = require("../Data.Eq/index.js");
  8407. var Data_Foldable = require("../Data.Foldable/index.js");
  8408. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  8409. var Data_Functor = require("../Data.Functor/index.js");
  8410. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  8411. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  8412. var Data_Newtype = require("../Data.Newtype/index.js");
  8413. var Data_Ord = require("../Data.Ord/index.js");
  8414. var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
  8415. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  8416. var Data_Show = require("../Data.Show/index.js");
  8417. var Data_Traversable = require("../Data.Traversable/index.js");
  8418. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  8419. var Data_Unit = require("../Data.Unit/index.js");
  8420. var Identity = function Identity(x) {
  8421. return x;
  8422. };
  8423. var showIdentity = function showIdentity(dictShow) {
  8424. return new Data_Show.Show(function (v) {
  8425. return "(Identity " + (Data_Show.show(dictShow)(v) + ")");
  8426. });
  8427. };
  8428. var semiringIdentity = function semiringIdentity(dictSemiring) {
  8429. return dictSemiring;
  8430. };
  8431. var semigroupIdenity = function semigroupIdenity(dictSemigroup) {
  8432. return dictSemigroup;
  8433. };
  8434. var ringIdentity = function ringIdentity(dictRing) {
  8435. return dictRing;
  8436. };
  8437. var ordIdentity = function ordIdentity(dictOrd) {
  8438. return dictOrd;
  8439. };
  8440. var newtypeIdentity = new Data_Newtype.Newtype(function (n) {
  8441. return n;
  8442. }, Identity);
  8443. var monoidIdentity = function monoidIdentity(dictMonoid) {
  8444. return dictMonoid;
  8445. };
  8446. var lazyIdentity = function lazyIdentity(dictLazy) {
  8447. return dictLazy;
  8448. };
  8449. var heytingAlgebraIdentity = function heytingAlgebraIdentity(dictHeytingAlgebra) {
  8450. return dictHeytingAlgebra;
  8451. };
  8452. var functorIdentity = new Data_Functor.Functor(function (f) {
  8453. return function (m) {
  8454. return f(m);
  8455. };
  8456. });
  8457. var functorWithIndexIdentity = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  8458. return functorIdentity;
  8459. }, function (f) {
  8460. return function (v) {
  8461. return f(Data_Unit.unit)(v);
  8462. };
  8463. });
  8464. var invariantIdentity = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorIdentity));
  8465. var foldableIdentity = new Data_Foldable.Foldable(function (dictMonoid) {
  8466. return function (f) {
  8467. return function (v) {
  8468. return f(v);
  8469. };
  8470. };
  8471. }, function (f) {
  8472. return function (z) {
  8473. return function (v) {
  8474. return f(z)(v);
  8475. };
  8476. };
  8477. }, function (f) {
  8478. return function (z) {
  8479. return function (v) {
  8480. return f(v)(z);
  8481. };
  8482. };
  8483. });
  8484. var foldableWithIndexIdentity = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  8485. return foldableIdentity;
  8486. }, function (dictMonoid) {
  8487. return function (f) {
  8488. return function (v) {
  8489. return f(Data_Unit.unit)(v);
  8490. };
  8491. };
  8492. }, function (f) {
  8493. return function (z) {
  8494. return function (v) {
  8495. return f(Data_Unit.unit)(z)(v);
  8496. };
  8497. };
  8498. }, function (f) {
  8499. return function (z) {
  8500. return function (v) {
  8501. return f(Data_Unit.unit)(v)(z);
  8502. };
  8503. };
  8504. });
  8505. var traversableIdentity = new Data_Traversable.Traversable(function () {
  8506. return foldableIdentity;
  8507. }, function () {
  8508. return functorIdentity;
  8509. }, function (dictApplicative) {
  8510. return function (v) {
  8511. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Identity)(v);
  8512. };
  8513. }, function (dictApplicative) {
  8514. return function (f) {
  8515. return function (v) {
  8516. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Identity)(f(v));
  8517. };
  8518. };
  8519. });
  8520. var traversableWithIndexIdentity = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  8521. return foldableWithIndexIdentity;
  8522. }, function () {
  8523. return functorWithIndexIdentity;
  8524. }, function () {
  8525. return traversableIdentity;
  8526. }, function (dictApplicative) {
  8527. return function (f) {
  8528. return function (v) {
  8529. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Identity)(f(Data_Unit.unit)(v));
  8530. };
  8531. };
  8532. });
  8533. var foldable1Identity = new Data_Semigroup_Foldable.Foldable1(function () {
  8534. return foldableIdentity;
  8535. }, function (dictSemigroup) {
  8536. return function (v) {
  8537. return v;
  8538. };
  8539. }, function (dictSemigroup) {
  8540. return function (f) {
  8541. return function (v) {
  8542. return f(v);
  8543. };
  8544. };
  8545. });
  8546. var traversable1Identity = new Data_Semigroup_Traversable.Traversable1(function () {
  8547. return foldable1Identity;
  8548. }, function () {
  8549. return traversableIdentity;
  8550. }, function (dictApply) {
  8551. return function (v) {
  8552. return Data_Functor.map(dictApply.Functor0())(Identity)(v);
  8553. };
  8554. }, function (dictApply) {
  8555. return function (f) {
  8556. return function (v) {
  8557. return Data_Functor.map(dictApply.Functor0())(Identity)(f(v));
  8558. };
  8559. };
  8560. });
  8561. var extendIdentity = new Control_Extend.Extend(function () {
  8562. return functorIdentity;
  8563. }, function (f) {
  8564. return function (m) {
  8565. return f(m);
  8566. };
  8567. });
  8568. var euclideanRingIdentity = function euclideanRingIdentity(dictEuclideanRing) {
  8569. return dictEuclideanRing;
  8570. };
  8571. var eqIdentity = function eqIdentity(dictEq) {
  8572. return dictEq;
  8573. };
  8574. var eq1Identity = new Data_Eq.Eq1(function (dictEq) {
  8575. return Data_Eq.eq(eqIdentity(dictEq));
  8576. });
  8577. var ord1Identity = new Data_Ord.Ord1(function () {
  8578. return eq1Identity;
  8579. }, function (dictOrd) {
  8580. return Data_Ord.compare(ordIdentity(dictOrd));
  8581. });
  8582. var comonadIdentity = new Control_Comonad.Comonad(function () {
  8583. return extendIdentity;
  8584. }, function (v) {
  8585. return v;
  8586. });
  8587. var commutativeRingIdentity = function commutativeRingIdentity(dictCommutativeRing) {
  8588. return dictCommutativeRing;
  8589. };
  8590. var boundedIdentity = function boundedIdentity(dictBounded) {
  8591. return dictBounded;
  8592. };
  8593. var booleanAlgebraIdentity = function booleanAlgebraIdentity(dictBooleanAlgebra) {
  8594. return dictBooleanAlgebra;
  8595. };
  8596. var applyIdentity = new Control_Apply.Apply(function () {
  8597. return functorIdentity;
  8598. }, function (v) {
  8599. return function (v1) {
  8600. return v(v1);
  8601. };
  8602. });
  8603. var bindIdentity = new Control_Bind.Bind(function () {
  8604. return applyIdentity;
  8605. }, function (v) {
  8606. return function (f) {
  8607. return f(v);
  8608. };
  8609. });
  8610. var applicativeIdentity = new Control_Applicative.Applicative(function () {
  8611. return applyIdentity;
  8612. }, Identity);
  8613. var monadIdentity = new Control_Monad.Monad(function () {
  8614. return applicativeIdentity;
  8615. }, function () {
  8616. return bindIdentity;
  8617. });
  8618. var altIdentity = new Control_Alt.Alt(function () {
  8619. return functorIdentity;
  8620. }, function (x) {
  8621. return function (v) {
  8622. return x;
  8623. };
  8624. });
  8625. module.exports = {
  8626. Identity: Identity,
  8627. newtypeIdentity: newtypeIdentity,
  8628. eqIdentity: eqIdentity,
  8629. ordIdentity: ordIdentity,
  8630. boundedIdentity: boundedIdentity,
  8631. heytingAlgebraIdentity: heytingAlgebraIdentity,
  8632. booleanAlgebraIdentity: booleanAlgebraIdentity,
  8633. semigroupIdenity: semigroupIdenity,
  8634. monoidIdentity: monoidIdentity,
  8635. semiringIdentity: semiringIdentity,
  8636. euclideanRingIdentity: euclideanRingIdentity,
  8637. ringIdentity: ringIdentity,
  8638. commutativeRingIdentity: commutativeRingIdentity,
  8639. lazyIdentity: lazyIdentity,
  8640. showIdentity: showIdentity,
  8641. eq1Identity: eq1Identity,
  8642. ord1Identity: ord1Identity,
  8643. functorIdentity: functorIdentity,
  8644. functorWithIndexIdentity: functorWithIndexIdentity,
  8645. invariantIdentity: invariantIdentity,
  8646. altIdentity: altIdentity,
  8647. applyIdentity: applyIdentity,
  8648. applicativeIdentity: applicativeIdentity,
  8649. bindIdentity: bindIdentity,
  8650. monadIdentity: monadIdentity,
  8651. extendIdentity: extendIdentity,
  8652. comonadIdentity: comonadIdentity,
  8653. foldableIdentity: foldableIdentity,
  8654. foldable1Identity: foldable1Identity,
  8655. foldableWithIndexIdentity: foldableWithIndexIdentity,
  8656. traversableIdentity: traversableIdentity,
  8657. traversable1Identity: traversable1Identity,
  8658. traversableWithIndexIdentity: traversableWithIndexIdentity
  8659. };
  8660. },{"../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) {
  8661. "use strict";
  8662. exports.new = function (val) {
  8663. return function () {
  8664. return {
  8665. value: val
  8666. };
  8667. };
  8668. };
  8669. exports.read = function (ref) {
  8670. return function () {
  8671. return ref.value;
  8672. };
  8673. };
  8674. exports["modify'"] = function (f) {
  8675. return function (ref) {
  8676. return function () {
  8677. var t = f(ref.value);
  8678. ref.value = t.state;
  8679. return t.value;
  8680. };
  8681. };
  8682. };
  8683. exports.write = function (val) {
  8684. return function (ref) {
  8685. return function () {
  8686. ref.value = val;
  8687. return {};
  8688. };
  8689. };
  8690. };
  8691. },{}],"../output/Effect.Ref/index.js":[function(require,module,exports) {
  8692. // Generated by purs version 0.13.6
  8693. "use strict";
  8694. var $foreign = require("./foreign.js");
  8695. var Data_Functor = require("../Data.Functor/index.js");
  8696. var Effect = require("../Effect/index.js");
  8697. var modify = function modify(f) {
  8698. return $foreign["modify'"](function (s) {
  8699. var s$prime = f(s);
  8700. return {
  8701. state: s$prime,
  8702. value: s$prime
  8703. };
  8704. });
  8705. };
  8706. var modify_ = function modify_(f) {
  8707. return function (s) {
  8708. return Data_Functor["void"](Effect.functorEffect)(modify(f)(s));
  8709. };
  8710. };
  8711. module.exports = {
  8712. modify: modify,
  8713. modify_: modify_,
  8714. "new": $foreign["new"],
  8715. read: $foreign.read,
  8716. "modify'": $foreign["modify'"],
  8717. write: $foreign.write
  8718. };
  8719. },{"./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) {
  8720. // Generated by purs version 0.13.6
  8721. "use strict";
  8722. var Control_Bind = require("../Control.Bind/index.js");
  8723. var Control_Monad = require("../Control.Monad/index.js");
  8724. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  8725. var Data_Either = require("../Data.Either/index.js");
  8726. var Data_Functor = require("../Data.Functor/index.js");
  8727. var Data_Identity = require("../Data.Identity/index.js");
  8728. var Data_Maybe = require("../Data.Maybe/index.js");
  8729. var Data_Monoid = require("../Data.Monoid/index.js");
  8730. var Data_Semigroup = require("../Data.Semigroup/index.js");
  8731. var Data_Unit = require("../Data.Unit/index.js");
  8732. var Effect = require("../Effect/index.js");
  8733. var Effect_Ref = require("../Effect.Ref/index.js");
  8734. var Loop = function () {
  8735. function Loop(value0) {
  8736. this.value0 = value0;
  8737. }
  8738. ;
  8739. Loop.create = function (value0) {
  8740. return new Loop(value0);
  8741. };
  8742. return Loop;
  8743. }();
  8744. var Done = function () {
  8745. function Done(value0) {
  8746. this.value0 = value0;
  8747. }
  8748. ;
  8749. Done.create = function (value0) {
  8750. return new Done(value0);
  8751. };
  8752. return Done;
  8753. }();
  8754. var MonadRec = function MonadRec(Monad0, tailRecM) {
  8755. this.Monad0 = Monad0;
  8756. this.tailRecM = tailRecM;
  8757. };
  8758. var tailRecM = function tailRecM(dict) {
  8759. return dict.tailRecM;
  8760. };
  8761. var tailRecM2 = function tailRecM2(dictMonadRec) {
  8762. return function (f) {
  8763. return function (a) {
  8764. return function (b) {
  8765. return tailRecM(dictMonadRec)(function (o) {
  8766. return f(o.a)(o.b);
  8767. })({
  8768. a: a,
  8769. b: b
  8770. });
  8771. };
  8772. };
  8773. };
  8774. };
  8775. var tailRecM3 = function tailRecM3(dictMonadRec) {
  8776. return function (f) {
  8777. return function (a) {
  8778. return function (b) {
  8779. return function (c) {
  8780. return tailRecM(dictMonadRec)(function (o) {
  8781. return f(o.a)(o.b)(o.c);
  8782. })({
  8783. a: a,
  8784. b: b,
  8785. c: c
  8786. });
  8787. };
  8788. };
  8789. };
  8790. };
  8791. };
  8792. var untilJust = function untilJust(dictMonadRec) {
  8793. return function (m) {
  8794. return tailRecM(dictMonadRec)(function (v) {
  8795. return Data_Functor.mapFlipped(dictMonadRec.Monad0().Bind1().Apply0().Functor0())(m)(function (v1) {
  8796. if (v1 instanceof Data_Maybe.Nothing) {
  8797. return new Loop(Data_Unit.unit);
  8798. }
  8799. ;
  8800. if (v1 instanceof Data_Maybe.Just) {
  8801. return new Done(v1.value0);
  8802. }
  8803. ;
  8804. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 155, column 43 - line 157, column 19): " + [v1.constructor.name]);
  8805. });
  8806. })(Data_Unit.unit);
  8807. };
  8808. };
  8809. var whileJust = function whileJust(dictMonoid) {
  8810. return function (dictMonadRec) {
  8811. return function (m) {
  8812. return tailRecM(dictMonadRec)(function (v) {
  8813. return Data_Functor.mapFlipped(dictMonadRec.Monad0().Bind1().Apply0().Functor0())(m)(function (v1) {
  8814. if (v1 instanceof Data_Maybe.Nothing) {
  8815. return new Done(v);
  8816. }
  8817. ;
  8818. if (v1 instanceof Data_Maybe.Just) {
  8819. return Loop.create(Data_Semigroup.append(dictMonoid.Semigroup0())(v)(v1.value0));
  8820. }
  8821. ;
  8822. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 148, column 45 - line 150, column 26): " + [v1.constructor.name]);
  8823. });
  8824. })(Data_Monoid.mempty(dictMonoid));
  8825. };
  8826. };
  8827. };
  8828. var tailRec = function tailRec(f) {
  8829. var go = function go($copy_v) {
  8830. var $tco_done = false;
  8831. var $tco_result;
  8832. function $tco_loop(v) {
  8833. if (v instanceof Loop) {
  8834. $copy_v = f(v.value0);
  8835. return;
  8836. }
  8837. ;
  8838. if (v instanceof Done) {
  8839. $tco_done = true;
  8840. return v.value0;
  8841. }
  8842. ;
  8843. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 93, column 3 - line 93, column 25): " + [v.constructor.name]);
  8844. }
  8845. ;
  8846. while (!$tco_done) {
  8847. $tco_result = $tco_loop($copy_v);
  8848. }
  8849. ;
  8850. return $tco_result;
  8851. };
  8852. return function ($58) {
  8853. return go(f($58));
  8854. };
  8855. };
  8856. var monadRecMaybe = new MonadRec(function () {
  8857. return Data_Maybe.monadMaybe;
  8858. }, function (f) {
  8859. return function (a0) {
  8860. var g = function g(v) {
  8861. if (v instanceof Data_Maybe.Nothing) {
  8862. return new Done(Data_Maybe.Nothing.value);
  8863. }
  8864. ;
  8865. if (v instanceof Data_Maybe.Just && v.value0 instanceof Loop) {
  8866. return new Loop(f(v.value0.value0));
  8867. }
  8868. ;
  8869. if (v instanceof Data_Maybe.Just && v.value0 instanceof Done) {
  8870. return new Done(new Data_Maybe.Just(v.value0.value0));
  8871. }
  8872. ;
  8873. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 129, column 7 - line 129, column 31): " + [v.constructor.name]);
  8874. };
  8875. return tailRec(g)(f(a0));
  8876. };
  8877. });
  8878. var monadRecIdentity = new MonadRec(function () {
  8879. return Data_Identity.monadIdentity;
  8880. }, function (f) {
  8881. var runIdentity = function runIdentity(v) {
  8882. return v;
  8883. };
  8884. var $59 = tailRec(function ($61) {
  8885. return runIdentity(f($61));
  8886. });
  8887. return function ($60) {
  8888. return Data_Identity.Identity($59($60));
  8889. };
  8890. });
  8891. var monadRecFunction = new MonadRec(function () {
  8892. return Control_Monad.monadFn;
  8893. }, function (f) {
  8894. return function (a0) {
  8895. return function (e) {
  8896. return tailRec(function (a) {
  8897. return f(a)(e);
  8898. })(a0);
  8899. };
  8900. };
  8901. });
  8902. var monadRecEither = new MonadRec(function () {
  8903. return Data_Either.monadEither;
  8904. }, function (f) {
  8905. return function (a0) {
  8906. var g = function g(v) {
  8907. if (v instanceof Data_Either.Left) {
  8908. return new Done(new Data_Either.Left(v.value0));
  8909. }
  8910. ;
  8911. if (v instanceof Data_Either.Right && v.value0 instanceof Loop) {
  8912. return new Loop(f(v.value0.value0));
  8913. }
  8914. ;
  8915. if (v instanceof Data_Either.Right && v.value0 instanceof Done) {
  8916. return new Done(new Data_Either.Right(v.value0.value0));
  8917. }
  8918. ;
  8919. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 121, column 7 - line 121, column 33): " + [v.constructor.name]);
  8920. };
  8921. return tailRec(g)(f(a0));
  8922. };
  8923. });
  8924. var monadRecEffect = new MonadRec(function () {
  8925. return Effect.monadEffect;
  8926. }, function (f) {
  8927. return function (a) {
  8928. var fromDone = function fromDone(v) {
  8929. if (v instanceof Done) {
  8930. return v.value0;
  8931. }
  8932. ;
  8933. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 113, column 30 - line 113, column 44): " + [v.constructor.name]);
  8934. };
  8935. return function __do() {
  8936. var r = Control_Bind.bindFlipped(Effect.bindEffect)(Effect_Ref["new"])(f(a))();
  8937. (function () {
  8938. while (!function __do() {
  8939. var v = Effect_Ref.read(r)();
  8940. if (v instanceof Loop) {
  8941. var e = f(v.value0)();
  8942. Effect_Ref.write(e)(r)();
  8943. return false;
  8944. }
  8945. ;
  8946. if (v instanceof Done) {
  8947. return true;
  8948. }
  8949. ;
  8950. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 104, column 22 - line 109, column 28): " + [v.constructor.name]);
  8951. }()) {}
  8952. ;
  8953. return {};
  8954. })();
  8955. return Data_Functor.map(Effect.functorEffect)(fromDone)(Effect_Ref.read(r))();
  8956. };
  8957. };
  8958. });
  8959. var functorStep = new Data_Functor.Functor(function (f) {
  8960. return function (m) {
  8961. if (m instanceof Loop) {
  8962. return new Loop(m.value0);
  8963. }
  8964. ;
  8965. if (m instanceof Done) {
  8966. return new Done(f(m.value0));
  8967. }
  8968. ;
  8969. throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 27, column 1 - line 27, column 48): " + [m.constructor.name]);
  8970. };
  8971. });
  8972. var forever = function forever(dictMonadRec) {
  8973. return function (ma) {
  8974. return tailRecM(dictMonadRec)(function (u) {
  8975. return Data_Functor.voidRight(dictMonadRec.Monad0().Bind1().Apply0().Functor0())(new Loop(u))(ma);
  8976. })(Data_Unit.unit);
  8977. };
  8978. };
  8979. var bifunctorStep = new Data_Bifunctor.Bifunctor(function (v) {
  8980. return function (v1) {
  8981. return function (v2) {
  8982. if (v2 instanceof Loop) {
  8983. return new Loop(v(v2.value0));
  8984. }
  8985. ;
  8986. if (v2 instanceof Done) {
  8987. return new Done(v1(v2.value0));
  8988. }
  8989. ;
  8990. 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]);
  8991. };
  8992. };
  8993. });
  8994. module.exports = {
  8995. Loop: Loop,
  8996. Done: Done,
  8997. MonadRec: MonadRec,
  8998. tailRec: tailRec,
  8999. tailRecM: tailRecM,
  9000. tailRecM2: tailRecM2,
  9001. tailRecM3: tailRecM3,
  9002. forever: forever,
  9003. whileJust: whileJust,
  9004. untilJust: untilJust,
  9005. functorStep: functorStep,
  9006. bifunctorStep: bifunctorStep,
  9007. monadRecIdentity: monadRecIdentity,
  9008. monadRecEffect: monadRecEffect,
  9009. monadRecFunction: monadRecFunction,
  9010. monadRecEither: monadRecEither,
  9011. monadRecMaybe: monadRecMaybe
  9012. };
  9013. },{"../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) {
  9014. // Generated by purs version 0.13.6
  9015. "use strict";
  9016. var Data_Unit = require("../Data.Unit/index.js");
  9017. var Lazy = function Lazy(defer) {
  9018. this.defer = defer;
  9019. };
  9020. var lazyUnit = new Lazy(function (v) {
  9021. return Data_Unit.unit;
  9022. });
  9023. var lazyFn = new Lazy(function (f) {
  9024. return function (x) {
  9025. return f(Data_Unit.unit)(x);
  9026. };
  9027. });
  9028. var defer = function defer(dict) {
  9029. return dict.defer;
  9030. };
  9031. var fix = function fix(dictLazy) {
  9032. return function (f) {
  9033. var go = defer(dictLazy)(function (v) {
  9034. return f(go);
  9035. });
  9036. return go;
  9037. };
  9038. };
  9039. module.exports = {
  9040. defer: defer,
  9041. Lazy: Lazy,
  9042. fix: fix,
  9043. lazyFn: lazyFn,
  9044. lazyUnit: lazyUnit
  9045. };
  9046. },{"../Data.Unit/index.js":"../output/Data.Unit/index.js"}],"../output/Data.BooleanAlgebra/index.js":[function(require,module,exports) {
  9047. // Generated by purs version 0.13.6
  9048. "use strict";
  9049. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  9050. var BooleanAlgebraRecord = function BooleanAlgebraRecord(HeytingAlgebraRecord0) {
  9051. this.HeytingAlgebraRecord0 = HeytingAlgebraRecord0;
  9052. };
  9053. var BooleanAlgebra = function BooleanAlgebra(HeytingAlgebra0) {
  9054. this.HeytingAlgebra0 = HeytingAlgebra0;
  9055. };
  9056. var booleanAlgebraUnit = new BooleanAlgebra(function () {
  9057. return Data_HeytingAlgebra.heytingAlgebraUnit;
  9058. });
  9059. var booleanAlgebraRecordNil = new BooleanAlgebraRecord(function () {
  9060. return Data_HeytingAlgebra.heytingAlgebraRecordNil;
  9061. });
  9062. var booleanAlgebraRecordCons = function booleanAlgebraRecordCons(dictIsSymbol) {
  9063. return function (dictCons) {
  9064. return function (dictBooleanAlgebraRecord) {
  9065. return function (dictBooleanAlgebra) {
  9066. return new BooleanAlgebraRecord(function () {
  9067. return Data_HeytingAlgebra.heytingAlgebraRecordCons(dictIsSymbol)()(dictBooleanAlgebraRecord.HeytingAlgebraRecord0())(dictBooleanAlgebra.HeytingAlgebra0());
  9068. });
  9069. };
  9070. };
  9071. };
  9072. };
  9073. var booleanAlgebraRecord = function booleanAlgebraRecord(dictRowToList) {
  9074. return function (dictBooleanAlgebraRecord) {
  9075. return new BooleanAlgebra(function () {
  9076. return Data_HeytingAlgebra.heytingAlgebraRecord()(dictBooleanAlgebraRecord.HeytingAlgebraRecord0());
  9077. });
  9078. };
  9079. };
  9080. var booleanAlgebraFn = function booleanAlgebraFn(dictBooleanAlgebra) {
  9081. return new BooleanAlgebra(function () {
  9082. return Data_HeytingAlgebra.heytingAlgebraFunction(dictBooleanAlgebra.HeytingAlgebra0());
  9083. });
  9084. };
  9085. var booleanAlgebraBoolean = new BooleanAlgebra(function () {
  9086. return Data_HeytingAlgebra.heytingAlgebraBoolean;
  9087. });
  9088. module.exports = {
  9089. BooleanAlgebra: BooleanAlgebra,
  9090. BooleanAlgebraRecord: BooleanAlgebraRecord,
  9091. booleanAlgebraBoolean: booleanAlgebraBoolean,
  9092. booleanAlgebraUnit: booleanAlgebraUnit,
  9093. booleanAlgebraFn: booleanAlgebraFn,
  9094. booleanAlgebraRecord: booleanAlgebraRecord,
  9095. booleanAlgebraRecordNil: booleanAlgebraRecordNil,
  9096. booleanAlgebraRecordCons: booleanAlgebraRecordCons
  9097. };
  9098. },{"../Data.HeytingAlgebra/index.js":"../output/Data.HeytingAlgebra/index.js"}],"../output/Data.Distributive/index.js":[function(require,module,exports) {
  9099. // Generated by purs version 0.13.6
  9100. "use strict";
  9101. var Control_Category = require("../Control.Category/index.js");
  9102. var Data_Functor = require("../Data.Functor/index.js");
  9103. var Data_Identity = require("../Data.Identity/index.js");
  9104. var Data_Newtype = require("../Data.Newtype/index.js");
  9105. var Distributive = function Distributive(Functor0, collect, distribute) {
  9106. this.Functor0 = Functor0;
  9107. this.collect = collect;
  9108. this.distribute = distribute;
  9109. };
  9110. var distributiveIdentity = new Distributive(function () {
  9111. return Data_Identity.functorIdentity;
  9112. }, function (dictFunctor) {
  9113. return function (f) {
  9114. var $11 = Data_Functor.map(dictFunctor)(function () {
  9115. var $13 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
  9116. return function ($14) {
  9117. return $13(f($14));
  9118. };
  9119. }());
  9120. return function ($12) {
  9121. return Data_Identity.Identity($11($12));
  9122. };
  9123. };
  9124. }, function (dictFunctor) {
  9125. var $15 = Data_Functor.map(dictFunctor)(Data_Newtype.unwrap(Data_Identity.newtypeIdentity));
  9126. return function ($16) {
  9127. return Data_Identity.Identity($15($16));
  9128. };
  9129. });
  9130. var distribute = function distribute(dict) {
  9131. return dict.distribute;
  9132. };
  9133. var distributiveFunction = new Distributive(function () {
  9134. return Data_Functor.functorFn;
  9135. }, function (dictFunctor) {
  9136. return function (f) {
  9137. var $17 = distribute(distributiveFunction)(dictFunctor);
  9138. var $18 = Data_Functor.map(dictFunctor)(f);
  9139. return function ($19) {
  9140. return $17($18($19));
  9141. };
  9142. };
  9143. }, function (dictFunctor) {
  9144. return function (a) {
  9145. return function (e) {
  9146. return Data_Functor.map(dictFunctor)(function (v) {
  9147. return v(e);
  9148. })(a);
  9149. };
  9150. };
  9151. });
  9152. var cotraverse = function cotraverse(dictDistributive) {
  9153. return function (dictFunctor) {
  9154. return function (f) {
  9155. var $20 = Data_Functor.map(dictDistributive.Functor0())(f);
  9156. var $21 = distribute(dictDistributive)(dictFunctor);
  9157. return function ($22) {
  9158. return $20($21($22));
  9159. };
  9160. };
  9161. };
  9162. };
  9163. var collectDefault = function collectDefault(dictDistributive) {
  9164. return function (dictFunctor) {
  9165. return function (f) {
  9166. var $23 = distribute(dictDistributive)(dictFunctor);
  9167. var $24 = Data_Functor.map(dictFunctor)(f);
  9168. return function ($25) {
  9169. return $23($24($25));
  9170. };
  9171. };
  9172. };
  9173. };
  9174. var collect = function collect(dict) {
  9175. return dict.collect;
  9176. };
  9177. var distributeDefault = function distributeDefault(dictDistributive) {
  9178. return function (dictFunctor) {
  9179. return collect(dictDistributive)(dictFunctor)(Control_Category.identity(Control_Category.categoryFn));
  9180. };
  9181. };
  9182. module.exports = {
  9183. collect: collect,
  9184. distribute: distribute,
  9185. Distributive: Distributive,
  9186. distributeDefault: distributeDefault,
  9187. collectDefault: collectDefault,
  9188. cotraverse: cotraverse,
  9189. distributiveIdentity: distributiveIdentity,
  9190. distributiveFunction: distributiveFunction
  9191. };
  9192. },{"../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) {
  9193. // Generated by purs version 0.13.6
  9194. "use strict";
  9195. var TypeEquals = function TypeEquals(from, to) {
  9196. this.from = from;
  9197. this.to = to;
  9198. };
  9199. var to = function to(dict) {
  9200. return dict.to;
  9201. };
  9202. var refl = new TypeEquals(function (a) {
  9203. return a;
  9204. }, function (a) {
  9205. return a;
  9206. });
  9207. var from = function from(dict) {
  9208. return dict.from;
  9209. };
  9210. module.exports = {
  9211. TypeEquals: TypeEquals,
  9212. to: to,
  9213. from: from,
  9214. refl: refl
  9215. };
  9216. },{}],"../output/Data.Tuple/index.js":[function(require,module,exports) {
  9217. // Generated by purs version 0.13.6
  9218. "use strict";
  9219. var Control_Applicative = require("../Control.Applicative/index.js");
  9220. var Control_Apply = require("../Control.Apply/index.js");
  9221. var Control_Biapplicative = require("../Control.Biapplicative/index.js");
  9222. var Control_Biapply = require("../Control.Biapply/index.js");
  9223. var Control_Bind = require("../Control.Bind/index.js");
  9224. var Control_Comonad = require("../Control.Comonad/index.js");
  9225. var Control_Extend = require("../Control.Extend/index.js");
  9226. var Control_Lazy = require("../Control.Lazy/index.js");
  9227. var Control_Monad = require("../Control.Monad/index.js");
  9228. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  9229. var Data_Bifoldable = require("../Data.Bifoldable/index.js");
  9230. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  9231. var Data_Bitraversable = require("../Data.Bitraversable/index.js");
  9232. var Data_BooleanAlgebra = require("../Data.BooleanAlgebra/index.js");
  9233. var Data_Bounded = require("../Data.Bounded/index.js");
  9234. var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
  9235. var Data_Distributive = require("../Data.Distributive/index.js");
  9236. var Data_Eq = require("../Data.Eq/index.js");
  9237. var Data_Foldable = require("../Data.Foldable/index.js");
  9238. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  9239. var Data_Functor = require("../Data.Functor/index.js");
  9240. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  9241. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  9242. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  9243. var Data_Maybe = require("../Data.Maybe/index.js");
  9244. var Data_Maybe_First = require("../Data.Maybe.First/index.js");
  9245. var Data_Monoid = require("../Data.Monoid/index.js");
  9246. var Data_Newtype = require("../Data.Newtype/index.js");
  9247. var Data_Ord = require("../Data.Ord/index.js");
  9248. var Data_Ordering = require("../Data.Ordering/index.js");
  9249. var Data_Ring = require("../Data.Ring/index.js");
  9250. var Data_Semigroup = require("../Data.Semigroup/index.js");
  9251. var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
  9252. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  9253. var Data_Semiring = require("../Data.Semiring/index.js");
  9254. var Data_Show = require("../Data.Show/index.js");
  9255. var Data_Traversable = require("../Data.Traversable/index.js");
  9256. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  9257. var Data_Unit = require("../Data.Unit/index.js");
  9258. var Type_Equality = require("../Type.Equality/index.js");
  9259. var Tuple = function () {
  9260. function Tuple(value0, value1) {
  9261. this.value0 = value0;
  9262. this.value1 = value1;
  9263. }
  9264. ;
  9265. Tuple.create = function (value0) {
  9266. return function (value1) {
  9267. return new Tuple(value0, value1);
  9268. };
  9269. };
  9270. return Tuple;
  9271. }();
  9272. var uncurry = function uncurry(f) {
  9273. return function (v) {
  9274. return f(v.value0)(v.value1);
  9275. };
  9276. };
  9277. var swap = function swap(v) {
  9278. return new Tuple(v.value1, v.value0);
  9279. };
  9280. var snd = function snd(v) {
  9281. return v.value1;
  9282. };
  9283. var showTuple = function showTuple(dictShow) {
  9284. return function (dictShow1) {
  9285. return new Data_Show.Show(function (v) {
  9286. return "(Tuple " + (Data_Show.show(dictShow)(v.value0) + (" " + (Data_Show.show(dictShow1)(v.value1) + ")")));
  9287. });
  9288. };
  9289. };
  9290. var semiringTuple = function semiringTuple(dictSemiring) {
  9291. return function (dictSemiring1) {
  9292. return new Data_Semiring.Semiring(function (v) {
  9293. return function (v1) {
  9294. return new Tuple(Data_Semiring.add(dictSemiring)(v.value0)(v1.value0), Data_Semiring.add(dictSemiring1)(v.value1)(v1.value1));
  9295. };
  9296. }, function (v) {
  9297. return function (v1) {
  9298. return new Tuple(Data_Semiring.mul(dictSemiring)(v.value0)(v1.value0), Data_Semiring.mul(dictSemiring1)(v.value1)(v1.value1));
  9299. };
  9300. }, new Tuple(Data_Semiring.one(dictSemiring), Data_Semiring.one(dictSemiring1)), new Tuple(Data_Semiring.zero(dictSemiring), Data_Semiring.zero(dictSemiring1)));
  9301. };
  9302. };
  9303. var semigroupoidTuple = new Control_Semigroupoid.Semigroupoid(function (v) {
  9304. return function (v1) {
  9305. return new Tuple(v1.value0, v.value1);
  9306. };
  9307. });
  9308. var semigroupTuple = function semigroupTuple(dictSemigroup) {
  9309. return function (dictSemigroup1) {
  9310. return new Data_Semigroup.Semigroup(function (v) {
  9311. return function (v1) {
  9312. return new Tuple(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0), Data_Semigroup.append(dictSemigroup1)(v.value1)(v1.value1));
  9313. };
  9314. });
  9315. };
  9316. };
  9317. var ringTuple = function ringTuple(dictRing) {
  9318. return function (dictRing1) {
  9319. return new Data_Ring.Ring(function () {
  9320. return semiringTuple(dictRing.Semiring0())(dictRing1.Semiring0());
  9321. }, function (v) {
  9322. return function (v1) {
  9323. return new Tuple(Data_Ring.sub(dictRing)(v.value0)(v1.value0), Data_Ring.sub(dictRing1)(v.value1)(v1.value1));
  9324. };
  9325. });
  9326. };
  9327. };
  9328. var monoidTuple = function monoidTuple(dictMonoid) {
  9329. return function (dictMonoid1) {
  9330. return new Data_Monoid.Monoid(function () {
  9331. return semigroupTuple(dictMonoid.Semigroup0())(dictMonoid1.Semigroup0());
  9332. }, new Tuple(Data_Monoid.mempty(dictMonoid), Data_Monoid.mempty(dictMonoid1)));
  9333. };
  9334. };
  9335. var lookup = function lookup(dictFoldable) {
  9336. return function (dictEq) {
  9337. return function (a) {
  9338. var $312 = Data_Newtype.unwrap(Data_Maybe_First.newtypeFirst);
  9339. var $313 = Data_Foldable.foldMap(dictFoldable)(Data_Maybe_First.monoidFirst)(function (v) {
  9340. var $163 = Data_Eq.eq(dictEq)(a)(v.value0);
  9341. if ($163) {
  9342. return new Data_Maybe.Just(v.value1);
  9343. }
  9344. ;
  9345. return Data_Maybe.Nothing.value;
  9346. });
  9347. return function ($314) {
  9348. return $312($313($314));
  9349. };
  9350. };
  9351. };
  9352. };
  9353. var heytingAlgebraTuple = function heytingAlgebraTuple(dictHeytingAlgebra) {
  9354. return function (dictHeytingAlgebra1) {
  9355. return new Data_HeytingAlgebra.HeytingAlgebra(function (v) {
  9356. return function (v1) {
  9357. return new Tuple(Data_HeytingAlgebra.conj(dictHeytingAlgebra)(v.value0)(v1.value0), Data_HeytingAlgebra.conj(dictHeytingAlgebra1)(v.value1)(v1.value1));
  9358. };
  9359. }, function (v) {
  9360. return function (v1) {
  9361. return new Tuple(Data_HeytingAlgebra.disj(dictHeytingAlgebra)(v.value0)(v1.value0), Data_HeytingAlgebra.disj(dictHeytingAlgebra1)(v.value1)(v1.value1));
  9362. };
  9363. }, new Tuple(Data_HeytingAlgebra.ff(dictHeytingAlgebra), Data_HeytingAlgebra.ff(dictHeytingAlgebra1)), function (v) {
  9364. return function (v1) {
  9365. return new Tuple(Data_HeytingAlgebra.implies(dictHeytingAlgebra)(v.value0)(v1.value0), Data_HeytingAlgebra.implies(dictHeytingAlgebra1)(v.value1)(v1.value1));
  9366. };
  9367. }, function (v) {
  9368. return new Tuple(Data_HeytingAlgebra.not(dictHeytingAlgebra)(v.value0), Data_HeytingAlgebra.not(dictHeytingAlgebra1)(v.value1));
  9369. }, new Tuple(Data_HeytingAlgebra.tt(dictHeytingAlgebra), Data_HeytingAlgebra.tt(dictHeytingAlgebra1)));
  9370. };
  9371. };
  9372. var functorTuple = new Data_Functor.Functor(function (f) {
  9373. return function (m) {
  9374. return new Tuple(m.value0, f(m.value1));
  9375. };
  9376. });
  9377. var functorWithIndexTuple = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  9378. return functorTuple;
  9379. }, function (f) {
  9380. return Data_Functor.map(functorTuple)(f(Data_Unit.unit));
  9381. });
  9382. var invariantTuple = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorTuple));
  9383. var fst = function fst(v) {
  9384. return v.value0;
  9385. };
  9386. var lazyTuple = function lazyTuple(dictLazy) {
  9387. return function (dictLazy1) {
  9388. return new Control_Lazy.Lazy(function (f) {
  9389. return new Tuple(Control_Lazy.defer(dictLazy)(function (v) {
  9390. return fst(f(Data_Unit.unit));
  9391. }), Control_Lazy.defer(dictLazy1)(function (v) {
  9392. return snd(f(Data_Unit.unit));
  9393. }));
  9394. });
  9395. };
  9396. };
  9397. var foldableTuple = new Data_Foldable.Foldable(function (dictMonoid) {
  9398. return function (f) {
  9399. return function (v) {
  9400. return f(v.value1);
  9401. };
  9402. };
  9403. }, function (f) {
  9404. return function (z) {
  9405. return function (v) {
  9406. return f(z)(v.value1);
  9407. };
  9408. };
  9409. }, function (f) {
  9410. return function (z) {
  9411. return function (v) {
  9412. return f(v.value1)(z);
  9413. };
  9414. };
  9415. });
  9416. var foldableWithIndexTuple = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  9417. return foldableTuple;
  9418. }, function (dictMonoid) {
  9419. return function (f) {
  9420. return function (v) {
  9421. return f(Data_Unit.unit)(v.value1);
  9422. };
  9423. };
  9424. }, function (f) {
  9425. return function (z) {
  9426. return function (v) {
  9427. return f(Data_Unit.unit)(z)(v.value1);
  9428. };
  9429. };
  9430. }, function (f) {
  9431. return function (z) {
  9432. return function (v) {
  9433. return f(Data_Unit.unit)(v.value1)(z);
  9434. };
  9435. };
  9436. });
  9437. var traversableTuple = new Data_Traversable.Traversable(function () {
  9438. return foldableTuple;
  9439. }, function () {
  9440. return functorTuple;
  9441. }, function (dictApplicative) {
  9442. return function (v) {
  9443. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create(v.value0))(v.value1);
  9444. };
  9445. }, function (dictApplicative) {
  9446. return function (f) {
  9447. return function (v) {
  9448. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create(v.value0))(f(v.value1));
  9449. };
  9450. };
  9451. });
  9452. var traversableWithIndexTuple = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  9453. return foldableWithIndexTuple;
  9454. }, function () {
  9455. return functorWithIndexTuple;
  9456. }, function () {
  9457. return traversableTuple;
  9458. }, function (dictApplicative) {
  9459. return function (f) {
  9460. return function (v) {
  9461. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create(v.value0))(f(Data_Unit.unit)(v.value1));
  9462. };
  9463. };
  9464. });
  9465. var foldable1Tuple = new Data_Semigroup_Foldable.Foldable1(function () {
  9466. return foldableTuple;
  9467. }, function (dictSemigroup) {
  9468. return function (v) {
  9469. return v.value1;
  9470. };
  9471. }, function (dictSemigroup) {
  9472. return function (f) {
  9473. return function (v) {
  9474. return f(v.value1);
  9475. };
  9476. };
  9477. });
  9478. var traversable1Tuple = new Data_Semigroup_Traversable.Traversable1(function () {
  9479. return foldable1Tuple;
  9480. }, function () {
  9481. return traversableTuple;
  9482. }, function (dictApply) {
  9483. return function (v) {
  9484. return Data_Functor.map(dictApply.Functor0())(Tuple.create(v.value0))(v.value1);
  9485. };
  9486. }, function (dictApply) {
  9487. return function (f) {
  9488. return function (v) {
  9489. return Data_Functor.map(dictApply.Functor0())(Tuple.create(v.value0))(f(v.value1));
  9490. };
  9491. };
  9492. });
  9493. var extendTuple = new Control_Extend.Extend(function () {
  9494. return functorTuple;
  9495. }, function (f) {
  9496. return function (v) {
  9497. return new Tuple(v.value0, f(v));
  9498. };
  9499. });
  9500. var eqTuple = function eqTuple(dictEq) {
  9501. return function (dictEq1) {
  9502. return new Data_Eq.Eq(function (x) {
  9503. return function (y) {
  9504. return Data_Eq.eq(dictEq)(x.value0)(y.value0) && Data_Eq.eq(dictEq1)(x.value1)(y.value1);
  9505. };
  9506. });
  9507. };
  9508. };
  9509. var ordTuple = function ordTuple(dictOrd) {
  9510. return function (dictOrd1) {
  9511. return new Data_Ord.Ord(function () {
  9512. return eqTuple(dictOrd.Eq0())(dictOrd1.Eq0());
  9513. }, function (x) {
  9514. return function (y) {
  9515. var v = Data_Ord.compare(dictOrd)(x.value0)(y.value0);
  9516. if (v instanceof Data_Ordering.LT) {
  9517. return Data_Ordering.LT.value;
  9518. }
  9519. ;
  9520. if (v instanceof Data_Ordering.GT) {
  9521. return Data_Ordering.GT.value;
  9522. }
  9523. ;
  9524. return Data_Ord.compare(dictOrd1)(x.value1)(y.value1);
  9525. };
  9526. });
  9527. };
  9528. };
  9529. var eq1Tuple = function eq1Tuple(dictEq) {
  9530. return new Data_Eq.Eq1(function (dictEq1) {
  9531. return Data_Eq.eq(eqTuple(dictEq)(dictEq1));
  9532. });
  9533. };
  9534. var ord1Tuple = function ord1Tuple(dictOrd) {
  9535. return new Data_Ord.Ord1(function () {
  9536. return eq1Tuple(dictOrd.Eq0());
  9537. }, function (dictOrd1) {
  9538. return Data_Ord.compare(ordTuple(dictOrd)(dictOrd1));
  9539. });
  9540. };
  9541. var distributiveTuple = function distributiveTuple(dictTypeEquals) {
  9542. return new Data_Distributive.Distributive(function () {
  9543. return functorTuple;
  9544. }, function (dictFunctor) {
  9545. return Data_Distributive.collectDefault(distributiveTuple(dictTypeEquals))(dictFunctor);
  9546. }, function (dictFunctor) {
  9547. var $315 = Tuple.create(Type_Equality.from(dictTypeEquals)(Data_Unit.unit));
  9548. var $316 = Data_Functor.map(dictFunctor)(snd);
  9549. return function ($317) {
  9550. return $315($316($317));
  9551. };
  9552. });
  9553. };
  9554. var curry = function curry(f) {
  9555. return function (a) {
  9556. return function (b) {
  9557. return f(new Tuple(a, b));
  9558. };
  9559. };
  9560. };
  9561. var comonadTuple = new Control_Comonad.Comonad(function () {
  9562. return extendTuple;
  9563. }, snd);
  9564. var commutativeRingTuple = function commutativeRingTuple(dictCommutativeRing) {
  9565. return function (dictCommutativeRing1) {
  9566. return new Data_CommutativeRing.CommutativeRing(function () {
  9567. return ringTuple(dictCommutativeRing.Ring0())(dictCommutativeRing1.Ring0());
  9568. });
  9569. };
  9570. };
  9571. var boundedTuple = function boundedTuple(dictBounded) {
  9572. return function (dictBounded1) {
  9573. return new Data_Bounded.Bounded(function () {
  9574. return ordTuple(dictBounded.Ord0())(dictBounded1.Ord0());
  9575. }, new Tuple(Data_Bounded.bottom(dictBounded), Data_Bounded.bottom(dictBounded1)), new Tuple(Data_Bounded.top(dictBounded), Data_Bounded.top(dictBounded1)));
  9576. };
  9577. };
  9578. var booleanAlgebraTuple = function booleanAlgebraTuple(dictBooleanAlgebra) {
  9579. return function (dictBooleanAlgebra1) {
  9580. return new Data_BooleanAlgebra.BooleanAlgebra(function () {
  9581. return heytingAlgebraTuple(dictBooleanAlgebra.HeytingAlgebra0())(dictBooleanAlgebra1.HeytingAlgebra0());
  9582. });
  9583. };
  9584. };
  9585. var bifunctorTuple = new Data_Bifunctor.Bifunctor(function (f) {
  9586. return function (g) {
  9587. return function (v) {
  9588. return new Tuple(f(v.value0), g(v.value1));
  9589. };
  9590. };
  9591. });
  9592. var bifoldableTuple = new Data_Bifoldable.Bifoldable(function (dictMonoid) {
  9593. return function (f) {
  9594. return function (g) {
  9595. return function (v) {
  9596. return Data_Semigroup.append(dictMonoid.Semigroup0())(f(v.value0))(g(v.value1));
  9597. };
  9598. };
  9599. };
  9600. }, function (f) {
  9601. return function (g) {
  9602. return function (z) {
  9603. return function (v) {
  9604. return g(f(z)(v.value0))(v.value1);
  9605. };
  9606. };
  9607. };
  9608. }, function (f) {
  9609. return function (g) {
  9610. return function (z) {
  9611. return function (v) {
  9612. return f(v.value0)(g(v.value1)(z));
  9613. };
  9614. };
  9615. };
  9616. });
  9617. var bitraversableTuple = new Data_Bitraversable.Bitraversable(function () {
  9618. return bifoldableTuple;
  9619. }, function () {
  9620. return bifunctorTuple;
  9621. }, function (dictApplicative) {
  9622. return function (v) {
  9623. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create)(v.value0))(v.value1);
  9624. };
  9625. }, function (dictApplicative) {
  9626. return function (f) {
  9627. return function (g) {
  9628. return function (v) {
  9629. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Tuple.create)(f(v.value0)))(g(v.value1));
  9630. };
  9631. };
  9632. };
  9633. });
  9634. var biapplyTuple = new Control_Biapply.Biapply(function () {
  9635. return bifunctorTuple;
  9636. }, function (v) {
  9637. return function (v1) {
  9638. return new Tuple(v.value0(v1.value0), v.value1(v1.value1));
  9639. };
  9640. });
  9641. var biapplicativeTuple = new Control_Biapplicative.Biapplicative(function () {
  9642. return biapplyTuple;
  9643. }, Tuple.create);
  9644. var applyTuple = function applyTuple(dictSemigroup) {
  9645. return new Control_Apply.Apply(function () {
  9646. return functorTuple;
  9647. }, function (v) {
  9648. return function (v1) {
  9649. return new Tuple(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0), v.value1(v1.value1));
  9650. };
  9651. });
  9652. };
  9653. var bindTuple = function bindTuple(dictSemigroup) {
  9654. return new Control_Bind.Bind(function () {
  9655. return applyTuple(dictSemigroup);
  9656. }, function (v) {
  9657. return function (f) {
  9658. var v1 = f(v.value1);
  9659. return new Tuple(Data_Semigroup.append(dictSemigroup)(v.value0)(v1.value0), v1.value1);
  9660. };
  9661. });
  9662. };
  9663. var applicativeTuple = function applicativeTuple(dictMonoid) {
  9664. return new Control_Applicative.Applicative(function () {
  9665. return applyTuple(dictMonoid.Semigroup0());
  9666. }, Tuple.create(Data_Monoid.mempty(dictMonoid)));
  9667. };
  9668. var monadTuple = function monadTuple(dictMonoid) {
  9669. return new Control_Monad.Monad(function () {
  9670. return applicativeTuple(dictMonoid);
  9671. }, function () {
  9672. return bindTuple(dictMonoid.Semigroup0());
  9673. });
  9674. };
  9675. module.exports = {
  9676. Tuple: Tuple,
  9677. fst: fst,
  9678. snd: snd,
  9679. curry: curry,
  9680. uncurry: uncurry,
  9681. swap: swap,
  9682. lookup: lookup,
  9683. showTuple: showTuple,
  9684. eqTuple: eqTuple,
  9685. eq1Tuple: eq1Tuple,
  9686. ordTuple: ordTuple,
  9687. ord1Tuple: ord1Tuple,
  9688. boundedTuple: boundedTuple,
  9689. semigroupoidTuple: semigroupoidTuple,
  9690. semigroupTuple: semigroupTuple,
  9691. monoidTuple: monoidTuple,
  9692. semiringTuple: semiringTuple,
  9693. ringTuple: ringTuple,
  9694. commutativeRingTuple: commutativeRingTuple,
  9695. heytingAlgebraTuple: heytingAlgebraTuple,
  9696. booleanAlgebraTuple: booleanAlgebraTuple,
  9697. functorTuple: functorTuple,
  9698. functorWithIndexTuple: functorWithIndexTuple,
  9699. invariantTuple: invariantTuple,
  9700. bifunctorTuple: bifunctorTuple,
  9701. applyTuple: applyTuple,
  9702. biapplyTuple: biapplyTuple,
  9703. applicativeTuple: applicativeTuple,
  9704. biapplicativeTuple: biapplicativeTuple,
  9705. bindTuple: bindTuple,
  9706. monadTuple: monadTuple,
  9707. extendTuple: extendTuple,
  9708. comonadTuple: comonadTuple,
  9709. lazyTuple: lazyTuple,
  9710. foldableTuple: foldableTuple,
  9711. foldable1Tuple: foldable1Tuple,
  9712. foldableWithIndexTuple: foldableWithIndexTuple,
  9713. bifoldableTuple: bifoldableTuple,
  9714. traversableTuple: traversableTuple,
  9715. traversable1Tuple: traversable1Tuple,
  9716. traversableWithIndexTuple: traversableWithIndexTuple,
  9717. bitraversableTuple: bitraversableTuple,
  9718. distributiveTuple: distributiveTuple
  9719. };
  9720. },{"../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) {
  9721. // Generated by purs version 0.13.6
  9722. "use strict";
  9723. var Data_Tuple = require("../Data.Tuple/index.js");
  9724. var Data_Unit = require("../Data.Unit/index.js");
  9725. var MonadState = function MonadState(Monad0, state) {
  9726. this.Monad0 = Monad0;
  9727. this.state = state;
  9728. };
  9729. var state = function state(dict) {
  9730. return dict.state;
  9731. };
  9732. var put = function put(dictMonadState) {
  9733. return function (s) {
  9734. return state(dictMonadState)(function (v) {
  9735. return new Data_Tuple.Tuple(Data_Unit.unit, s);
  9736. });
  9737. };
  9738. };
  9739. var modify_ = function modify_(dictMonadState) {
  9740. return function (f) {
  9741. return state(dictMonadState)(function (s) {
  9742. return new Data_Tuple.Tuple(Data_Unit.unit, f(s));
  9743. });
  9744. };
  9745. };
  9746. var modify = function modify(dictMonadState) {
  9747. return function (f) {
  9748. return state(dictMonadState)(function (s) {
  9749. var s$prime = f(s);
  9750. return new Data_Tuple.Tuple(s$prime, s$prime);
  9751. });
  9752. };
  9753. };
  9754. var gets = function gets(dictMonadState) {
  9755. return function (f) {
  9756. return state(dictMonadState)(function (s) {
  9757. return new Data_Tuple.Tuple(f(s), s);
  9758. });
  9759. };
  9760. };
  9761. var get = function get(dictMonadState) {
  9762. return state(dictMonadState)(function (s) {
  9763. return new Data_Tuple.Tuple(s, s);
  9764. });
  9765. };
  9766. module.exports = {
  9767. state: state,
  9768. MonadState: MonadState,
  9769. get: get,
  9770. gets: gets,
  9771. put: put,
  9772. modify: modify,
  9773. modify_: modify_
  9774. };
  9775. },{"../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) {
  9776. // Generated by purs version 0.13.6
  9777. "use strict";
  9778. var MonadTrans = function MonadTrans(lift) {
  9779. this.lift = lift;
  9780. };
  9781. var lift = function lift(dict) {
  9782. return dict.lift;
  9783. };
  9784. module.exports = {
  9785. lift: lift,
  9786. MonadTrans: MonadTrans
  9787. };
  9788. },{}],"../output/Control.Monad.Writer.Class/index.js":[function(require,module,exports) {
  9789. // Generated by purs version 0.13.6
  9790. "use strict";
  9791. var Control_Applicative = require("../Control.Applicative/index.js");
  9792. var Control_Bind = require("../Control.Bind/index.js");
  9793. var Data_Tuple = require("../Data.Tuple/index.js");
  9794. var MonadTell = function MonadTell(Monad0, tell) {
  9795. this.Monad0 = Monad0;
  9796. this.tell = tell;
  9797. };
  9798. var MonadWriter = function MonadWriter(MonadTell0, listen, pass) {
  9799. this.MonadTell0 = MonadTell0;
  9800. this.listen = listen;
  9801. this.pass = pass;
  9802. };
  9803. var tell = function tell(dict) {
  9804. return dict.tell;
  9805. };
  9806. var pass = function pass(dict) {
  9807. return dict.pass;
  9808. };
  9809. var listen = function listen(dict) {
  9810. return dict.listen;
  9811. };
  9812. var listens = function listens(dictMonadWriter) {
  9813. return function (f) {
  9814. return function (m) {
  9815. return Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(listen(dictMonadWriter)(m))(function (v) {
  9816. return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(new Data_Tuple.Tuple(v.value0, f(v.value1)));
  9817. });
  9818. };
  9819. };
  9820. };
  9821. var censor = function censor(dictMonadWriter) {
  9822. return function (f) {
  9823. return function (m) {
  9824. return pass(dictMonadWriter)(Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(m)(function (a) {
  9825. return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(new Data_Tuple.Tuple(a, f));
  9826. }));
  9827. };
  9828. };
  9829. };
  9830. module.exports = {
  9831. listen: listen,
  9832. pass: pass,
  9833. tell: tell,
  9834. MonadTell: MonadTell,
  9835. MonadWriter: MonadWriter,
  9836. listens: listens,
  9837. censor: censor
  9838. };
  9839. },{"../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) {
  9840. // Generated by purs version 0.13.6
  9841. "use strict";
  9842. var Control_MonadZero = require("../Control.MonadZero/index.js");
  9843. var MonadPlus = function MonadPlus(MonadZero0) {
  9844. this.MonadZero0 = MonadZero0;
  9845. };
  9846. var monadPlusArray = new MonadPlus(function () {
  9847. return Control_MonadZero.monadZeroArray;
  9848. });
  9849. module.exports = {
  9850. MonadPlus: MonadPlus,
  9851. monadPlusArray: monadPlusArray
  9852. };
  9853. },{"../Control.MonadZero/index.js":"../output/Control.MonadZero/index.js"}],"../output/Effect.Class/index.js":[function(require,module,exports) {
  9854. // Generated by purs version 0.13.6
  9855. "use strict";
  9856. var Control_Category = require("../Control.Category/index.js");
  9857. var Effect = require("../Effect/index.js");
  9858. var MonadEffect = function MonadEffect(Monad0, liftEffect) {
  9859. this.Monad0 = Monad0;
  9860. this.liftEffect = liftEffect;
  9861. };
  9862. var monadEffectEffect = new MonadEffect(function () {
  9863. return Effect.monadEffect;
  9864. }, Control_Category.identity(Control_Category.categoryFn));
  9865. var liftEffect = function liftEffect(dict) {
  9866. return dict.liftEffect;
  9867. };
  9868. module.exports = {
  9869. liftEffect: liftEffect,
  9870. MonadEffect: MonadEffect,
  9871. monadEffectEffect: monadEffectEffect
  9872. };
  9873. },{"../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) {
  9874. // Generated by purs version 0.13.6
  9875. "use strict";
  9876. var Control_Alt = require("../Control.Alt/index.js");
  9877. var Control_Alternative = require("../Control.Alternative/index.js");
  9878. var Control_Applicative = require("../Control.Applicative/index.js");
  9879. var Control_Apply = require("../Control.Apply/index.js");
  9880. var Control_Bind = require("../Control.Bind/index.js");
  9881. var Control_Category = require("../Control.Category/index.js");
  9882. var Control_Monad = require("../Control.Monad/index.js");
  9883. var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js");
  9884. var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
  9885. var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js");
  9886. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  9887. var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
  9888. var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js");
  9889. var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js");
  9890. var Control_MonadPlus = require("../Control.MonadPlus/index.js");
  9891. var Control_MonadZero = require("../Control.MonadZero/index.js");
  9892. var Control_Plus = require("../Control.Plus/index.js");
  9893. var Data_Either = require("../Data.Either/index.js");
  9894. var Data_Functor = require("../Data.Functor/index.js");
  9895. var Data_Monoid = require("../Data.Monoid/index.js");
  9896. var Data_Newtype = require("../Data.Newtype/index.js");
  9897. var Data_Semigroup = require("../Data.Semigroup/index.js");
  9898. var Data_Tuple = require("../Data.Tuple/index.js");
  9899. var Effect_Class = require("../Effect.Class/index.js");
  9900. var ExceptT = function ExceptT(x) {
  9901. return x;
  9902. };
  9903. var withExceptT = function withExceptT(dictFunctor) {
  9904. return function (f) {
  9905. return function (v) {
  9906. var mapLeft = function mapLeft(v1) {
  9907. return function (v2) {
  9908. if (v2 instanceof Data_Either.Right) {
  9909. return new Data_Either.Right(v2.value0);
  9910. }
  9911. ;
  9912. if (v2 instanceof Data_Either.Left) {
  9913. return new Data_Either.Left(v1(v2.value0));
  9914. }
  9915. ;
  9916. 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]);
  9917. };
  9918. };
  9919. return ExceptT(Data_Functor.map(dictFunctor)(mapLeft(f))(v));
  9920. };
  9921. };
  9922. };
  9923. var runExceptT = function runExceptT(v) {
  9924. return v;
  9925. };
  9926. var newtypeExceptT = new Data_Newtype.Newtype(function (n) {
  9927. return n;
  9928. }, ExceptT);
  9929. var monadTransExceptT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) {
  9930. return function (m) {
  9931. return Control_Bind.bind(dictMonad.Bind1())(m)(function (a) {
  9932. return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Right(a));
  9933. });
  9934. };
  9935. });
  9936. var mapExceptT = function mapExceptT(f) {
  9937. return function (v) {
  9938. return f(v);
  9939. };
  9940. };
  9941. var functorExceptT = function functorExceptT(dictFunctor) {
  9942. return new Data_Functor.Functor(function (f) {
  9943. return mapExceptT(Data_Functor.map(dictFunctor)(Data_Functor.map(Data_Either.functorEither)(f)));
  9944. });
  9945. };
  9946. var except = function except(dictApplicative) {
  9947. var $88 = Control_Applicative.pure(dictApplicative);
  9948. return function ($89) {
  9949. return ExceptT($88($89));
  9950. };
  9951. };
  9952. var monadExceptT = function monadExceptT(dictMonad) {
  9953. return new Control_Monad.Monad(function () {
  9954. return applicativeExceptT(dictMonad);
  9955. }, function () {
  9956. return bindExceptT(dictMonad);
  9957. });
  9958. };
  9959. var bindExceptT = function bindExceptT(dictMonad) {
  9960. return new Control_Bind.Bind(function () {
  9961. return applyExceptT(dictMonad);
  9962. }, function (v) {
  9963. return function (k) {
  9964. return Control_Bind.bind(dictMonad.Bind1())(v)(Data_Either.either(function () {
  9965. var $90 = Control_Applicative.pure(dictMonad.Applicative0());
  9966. return function ($91) {
  9967. return $90(Data_Either.Left.create($91));
  9968. };
  9969. }())(function (a) {
  9970. var v1 = k(a);
  9971. return v1;
  9972. }));
  9973. };
  9974. });
  9975. };
  9976. var applyExceptT = function applyExceptT(dictMonad) {
  9977. return new Control_Apply.Apply(function () {
  9978. return functorExceptT(dictMonad.Bind1().Apply0().Functor0());
  9979. }, Control_Monad.ap(monadExceptT(dictMonad)));
  9980. };
  9981. var applicativeExceptT = function applicativeExceptT(dictMonad) {
  9982. return new Control_Applicative.Applicative(function () {
  9983. return applyExceptT(dictMonad);
  9984. }, function () {
  9985. var $92 = Control_Applicative.pure(dictMonad.Applicative0());
  9986. return function ($93) {
  9987. return ExceptT($92(Data_Either.Right.create($93)));
  9988. };
  9989. }());
  9990. };
  9991. var monadAskExceptT = function monadAskExceptT(dictMonadAsk) {
  9992. return new Control_Monad_Reader_Class.MonadAsk(function () {
  9993. return monadExceptT(dictMonadAsk.Monad0());
  9994. }, Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk)));
  9995. };
  9996. var monadReaderExceptT = function monadReaderExceptT(dictMonadReader) {
  9997. return new Control_Monad_Reader_Class.MonadReader(function () {
  9998. return monadAskExceptT(dictMonadReader.MonadAsk0());
  9999. }, function (f) {
  10000. return mapExceptT(Control_Monad_Reader_Class.local(dictMonadReader)(f));
  10001. });
  10002. };
  10003. var monadContExceptT = function monadContExceptT(dictMonadCont) {
  10004. return new Control_Monad_Cont_Class.MonadCont(function () {
  10005. return monadExceptT(dictMonadCont.Monad0());
  10006. }, function (f) {
  10007. return ExceptT(Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) {
  10008. var v = f(function (a) {
  10009. return ExceptT(c(new Data_Either.Right(a)));
  10010. });
  10011. return v;
  10012. }));
  10013. });
  10014. };
  10015. var monadEffectExceptT = function monadEffectExceptT(dictMonadEffect) {
  10016. return new Effect_Class.MonadEffect(function () {
  10017. return monadExceptT(dictMonadEffect.Monad0());
  10018. }, function () {
  10019. var $94 = Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadEffect.Monad0());
  10020. var $95 = Effect_Class.liftEffect(dictMonadEffect);
  10021. return function ($96) {
  10022. return $94($95($96));
  10023. };
  10024. }());
  10025. };
  10026. var monadRecExceptT = function monadRecExceptT(dictMonadRec) {
  10027. return new Control_Monad_Rec_Class.MonadRec(function () {
  10028. return monadExceptT(dictMonadRec.Monad0());
  10029. }, function (f) {
  10030. var $97 = Control_Monad_Rec_Class.tailRecM(dictMonadRec)(function (a) {
  10031. var v = f(a);
  10032. return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(v)(function (m$prime) {
  10033. return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(function () {
  10034. if (m$prime instanceof Data_Either.Left) {
  10035. return new Control_Monad_Rec_Class.Done(new Data_Either.Left(m$prime.value0));
  10036. }
  10037. ;
  10038. if (m$prime instanceof Data_Either.Right && m$prime.value0 instanceof Control_Monad_Rec_Class.Loop) {
  10039. return new Control_Monad_Rec_Class.Loop(m$prime.value0.value0);
  10040. }
  10041. ;
  10042. if (m$prime instanceof Data_Either.Right && m$prime.value0 instanceof Control_Monad_Rec_Class.Done) {
  10043. return new Control_Monad_Rec_Class.Done(new Data_Either.Right(m$prime.value0.value0));
  10044. }
  10045. ;
  10046. throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 74, column 14 - line 77, column 43): " + [m$prime.constructor.name]);
  10047. }());
  10048. });
  10049. });
  10050. return function ($98) {
  10051. return ExceptT($97($98));
  10052. };
  10053. });
  10054. };
  10055. var monadStateExceptT = function monadStateExceptT(dictMonadState) {
  10056. return new Control_Monad_State_Class.MonadState(function () {
  10057. return monadExceptT(dictMonadState.Monad0());
  10058. }, function (f) {
  10059. return Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadState.Monad0())(Control_Monad_State_Class.state(dictMonadState)(f));
  10060. });
  10061. };
  10062. var monadTellExceptT = function monadTellExceptT(dictMonadTell) {
  10063. return new Control_Monad_Writer_Class.MonadTell(function () {
  10064. return monadExceptT(dictMonadTell.Monad0());
  10065. }, function () {
  10066. var $99 = Control_Monad_Trans_Class.lift(monadTransExceptT)(dictMonadTell.Monad0());
  10067. var $100 = Control_Monad_Writer_Class.tell(dictMonadTell);
  10068. return function ($101) {
  10069. return $99($100($101));
  10070. };
  10071. }());
  10072. };
  10073. var monadWriterExceptT = function monadWriterExceptT(dictMonadWriter) {
  10074. return new Control_Monad_Writer_Class.MonadWriter(function () {
  10075. return monadTellExceptT(dictMonadWriter.MonadTell0());
  10076. }, mapExceptT(function (m) {
  10077. return Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(Control_Monad_Writer_Class.listen(dictMonadWriter)(m))(function (v) {
  10078. return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(Data_Functor.map(Data_Either.functorEither)(function (r) {
  10079. return new Data_Tuple.Tuple(r, v.value1);
  10080. })(v.value0));
  10081. });
  10082. }), mapExceptT(function (m) {
  10083. return Control_Monad_Writer_Class.pass(dictMonadWriter)(Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(m)(function (a) {
  10084. return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(function () {
  10085. if (a instanceof Data_Either.Left) {
  10086. return new Data_Tuple.Tuple(new Data_Either.Left(a.value0), Control_Category.identity(Control_Category.categoryFn));
  10087. }
  10088. ;
  10089. if (a instanceof Data_Either.Right) {
  10090. return new Data_Tuple.Tuple(new Data_Either.Right(a.value0.value0), a.value0.value1);
  10091. }
  10092. ;
  10093. throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 136, column 10 - line 138, column 45): " + [a.constructor.name]);
  10094. }());
  10095. }));
  10096. }));
  10097. };
  10098. var monadThrowExceptT = function monadThrowExceptT(dictMonad) {
  10099. return new Control_Monad_Error_Class.MonadThrow(function () {
  10100. return monadExceptT(dictMonad);
  10101. }, function () {
  10102. var $102 = Control_Applicative.pure(dictMonad.Applicative0());
  10103. return function ($103) {
  10104. return ExceptT($102(Data_Either.Left.create($103)));
  10105. };
  10106. }());
  10107. };
  10108. var monadErrorExceptT = function monadErrorExceptT(dictMonad) {
  10109. return new Control_Monad_Error_Class.MonadError(function () {
  10110. return monadThrowExceptT(dictMonad);
  10111. }, function (v) {
  10112. return function (k) {
  10113. return Control_Bind.bind(dictMonad.Bind1())(v)(Data_Either.either(function (a) {
  10114. var v1 = k(a);
  10115. return v1;
  10116. })(function () {
  10117. var $104 = Control_Applicative.pure(dictMonad.Applicative0());
  10118. return function ($105) {
  10119. return $104(Data_Either.Right.create($105));
  10120. };
  10121. }()));
  10122. };
  10123. });
  10124. };
  10125. var altExceptT = function altExceptT(dictSemigroup) {
  10126. return function (dictMonad) {
  10127. return new Control_Alt.Alt(function () {
  10128. return functorExceptT(dictMonad.Bind1().Apply0().Functor0());
  10129. }, function (v) {
  10130. return function (v1) {
  10131. return Control_Bind.bind(dictMonad.Bind1())(v)(function (rm) {
  10132. if (rm instanceof Data_Either.Right) {
  10133. return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Right(rm.value0));
  10134. }
  10135. ;
  10136. if (rm instanceof Data_Either.Left) {
  10137. return Control_Bind.bind(dictMonad.Bind1())(v1)(function (rn) {
  10138. if (rn instanceof Data_Either.Right) {
  10139. return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Right(rn.value0));
  10140. }
  10141. ;
  10142. if (rn instanceof Data_Either.Left) {
  10143. return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Either.Left(Data_Semigroup.append(dictSemigroup)(rm.value0)(rn.value0)));
  10144. }
  10145. ;
  10146. throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 86, column 9 - line 88, column 49): " + [rn.constructor.name]);
  10147. });
  10148. }
  10149. ;
  10150. throw new Error("Failed pattern match at Control.Monad.Except.Trans (line 82, column 5 - line 88, column 49): " + [rm.constructor.name]);
  10151. });
  10152. };
  10153. });
  10154. };
  10155. };
  10156. var plusExceptT = function plusExceptT(dictMonoid) {
  10157. return function (dictMonad) {
  10158. return new Control_Plus.Plus(function () {
  10159. return altExceptT(dictMonoid.Semigroup0())(dictMonad);
  10160. }, Control_Monad_Error_Class.throwError(monadThrowExceptT(dictMonad))(Data_Monoid.mempty(dictMonoid)));
  10161. };
  10162. };
  10163. var alternativeExceptT = function alternativeExceptT(dictMonoid) {
  10164. return function (dictMonad) {
  10165. return new Control_Alternative.Alternative(function () {
  10166. return applicativeExceptT(dictMonad);
  10167. }, function () {
  10168. return plusExceptT(dictMonoid)(dictMonad);
  10169. });
  10170. };
  10171. };
  10172. var monadZeroExceptT = function monadZeroExceptT(dictMonoid) {
  10173. return function (dictMonad) {
  10174. return new Control_MonadZero.MonadZero(function () {
  10175. return alternativeExceptT(dictMonoid)(dictMonad);
  10176. }, function () {
  10177. return monadExceptT(dictMonad);
  10178. });
  10179. };
  10180. };
  10181. var monadPlusExceptT = function monadPlusExceptT(dictMonoid) {
  10182. return function (dictMonad) {
  10183. return new Control_MonadPlus.MonadPlus(function () {
  10184. return monadZeroExceptT(dictMonoid)(dictMonad);
  10185. });
  10186. };
  10187. };
  10188. module.exports = {
  10189. ExceptT: ExceptT,
  10190. runExceptT: runExceptT,
  10191. withExceptT: withExceptT,
  10192. mapExceptT: mapExceptT,
  10193. except: except,
  10194. newtypeExceptT: newtypeExceptT,
  10195. functorExceptT: functorExceptT,
  10196. applyExceptT: applyExceptT,
  10197. applicativeExceptT: applicativeExceptT,
  10198. bindExceptT: bindExceptT,
  10199. monadExceptT: monadExceptT,
  10200. monadRecExceptT: monadRecExceptT,
  10201. altExceptT: altExceptT,
  10202. plusExceptT: plusExceptT,
  10203. alternativeExceptT: alternativeExceptT,
  10204. monadPlusExceptT: monadPlusExceptT,
  10205. monadZeroExceptT: monadZeroExceptT,
  10206. monadTransExceptT: monadTransExceptT,
  10207. monadEffectExceptT: monadEffectExceptT,
  10208. monadContExceptT: monadContExceptT,
  10209. monadThrowExceptT: monadThrowExceptT,
  10210. monadErrorExceptT: monadErrorExceptT,
  10211. monadAskExceptT: monadAskExceptT,
  10212. monadReaderExceptT: monadReaderExceptT,
  10213. monadStateExceptT: monadStateExceptT,
  10214. monadTellExceptT: monadTellExceptT,
  10215. monadWriterExceptT: monadWriterExceptT
  10216. };
  10217. },{"../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) {
  10218. // Generated by purs version 0.13.6
  10219. "use strict";
  10220. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  10221. var Data_Identity = require("../Data.Identity/index.js");
  10222. var Data_Newtype = require("../Data.Newtype/index.js");
  10223. var withExcept = Control_Monad_Except_Trans.withExceptT(Data_Identity.functorIdentity);
  10224. var runExcept = function () {
  10225. var $0 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
  10226. return function ($1) {
  10227. return $0(Control_Monad_Except_Trans.runExceptT($1));
  10228. };
  10229. }();
  10230. var mapExcept = function mapExcept(f) {
  10231. return Control_Monad_Except_Trans.mapExceptT(function () {
  10232. var $2 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
  10233. return function ($3) {
  10234. return Data_Identity.Identity(f($2($3)));
  10235. };
  10236. }());
  10237. };
  10238. module.exports = {
  10239. runExcept: runExcept,
  10240. mapExcept: mapExcept,
  10241. withExcept: withExcept
  10242. };
  10243. },{"../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) {
  10244. "use strict";
  10245. exports.unfoldrArrayImpl = function (isNothing) {
  10246. return function (fromJust) {
  10247. return function (fst) {
  10248. return function (snd) {
  10249. return function (f) {
  10250. return function (b) {
  10251. var result = [];
  10252. var value = b;
  10253. while (true) {
  10254. // eslint-disable-line no-constant-condition
  10255. var maybe = f(value);
  10256. if (isNothing(maybe)) return result;
  10257. var tuple = fromJust(maybe);
  10258. result.push(fst(tuple));
  10259. value = snd(tuple);
  10260. }
  10261. };
  10262. };
  10263. };
  10264. };
  10265. };
  10266. };
  10267. },{}],"../output/Data.Unfoldable1/foreign.js":[function(require,module,exports) {
  10268. "use strict";
  10269. exports.unfoldr1ArrayImpl = function (isNothing) {
  10270. return function (fromJust) {
  10271. return function (fst) {
  10272. return function (snd) {
  10273. return function (f) {
  10274. return function (b) {
  10275. var result = [];
  10276. var value = b;
  10277. while (true) {
  10278. // eslint-disable-line no-constant-condition
  10279. var tuple = f(value);
  10280. result.push(fst(tuple));
  10281. var maybe = snd(tuple);
  10282. if (isNothing(maybe)) return result;
  10283. value = fromJust(maybe);
  10284. }
  10285. };
  10286. };
  10287. };
  10288. };
  10289. };
  10290. };
  10291. },{}],"../output/Data.Unfoldable1/index.js":[function(require,module,exports) {
  10292. // Generated by purs version 0.13.6
  10293. "use strict";
  10294. var $foreign = require("./foreign.js");
  10295. var Data_Boolean = require("../Data.Boolean/index.js");
  10296. var Data_Maybe = require("../Data.Maybe/index.js");
  10297. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  10298. var Data_Tuple = require("../Data.Tuple/index.js");
  10299. var Unfoldable1 = function Unfoldable1(unfoldr1) {
  10300. this.unfoldr1 = unfoldr1;
  10301. };
  10302. var unfoldr1 = function unfoldr1(dict) {
  10303. return dict.unfoldr1;
  10304. };
  10305. var unfoldable1Maybe = new Unfoldable1(function (f) {
  10306. return function (b) {
  10307. return new Data_Maybe.Just(Data_Tuple.fst(f(b)));
  10308. };
  10309. });
  10310. var unfoldable1Array = new Unfoldable1($foreign.unfoldr1ArrayImpl(Data_Maybe.isNothing)(Data_Maybe.fromJust())(Data_Tuple.fst)(Data_Tuple.snd));
  10311. var replicate1 = function replicate1(dictUnfoldable1) {
  10312. return function (n) {
  10313. return function (v) {
  10314. var step = function step(i) {
  10315. if (i <= 0) {
  10316. return new Data_Tuple.Tuple(v, Data_Maybe.Nothing.value);
  10317. }
  10318. ;
  10319. if (Data_Boolean.otherwise) {
  10320. return new Data_Tuple.Tuple(v, new Data_Maybe.Just(i - 1 | 0));
  10321. }
  10322. ;
  10323. throw new Error("Failed pattern match at Data.Unfoldable1 (line 67, column 5 - line 67, column 39): " + [i.constructor.name]);
  10324. };
  10325. return unfoldr1(dictUnfoldable1)(step)(n - 1 | 0);
  10326. };
  10327. };
  10328. };
  10329. var replicate1A = function replicate1A(dictApply) {
  10330. return function (dictUnfoldable1) {
  10331. return function (dictTraversable1) {
  10332. return function (n) {
  10333. return function (m) {
  10334. return Data_Semigroup_Traversable.sequence1(dictTraversable1)(dictApply)(replicate1(dictUnfoldable1)(n)(m));
  10335. };
  10336. };
  10337. };
  10338. };
  10339. };
  10340. var singleton = function singleton(dictUnfoldable1) {
  10341. return replicate1(dictUnfoldable1)(1);
  10342. };
  10343. var range = function range(dictUnfoldable1) {
  10344. return function (start) {
  10345. return function (end) {
  10346. var go = function go(delta) {
  10347. return function (i) {
  10348. var i$prime = i + delta | 0;
  10349. return new Data_Tuple.Tuple(i, function () {
  10350. var $8 = i === end;
  10351. if ($8) {
  10352. return Data_Maybe.Nothing.value;
  10353. }
  10354. ;
  10355. return new Data_Maybe.Just(i$prime);
  10356. }());
  10357. };
  10358. };
  10359. var delta = function () {
  10360. var $9 = end >= start;
  10361. if ($9) {
  10362. return 1;
  10363. }
  10364. ;
  10365. return -1 | 0;
  10366. }();
  10367. return unfoldr1(dictUnfoldable1)(go(delta))(start);
  10368. };
  10369. };
  10370. };
  10371. module.exports = {
  10372. Unfoldable1: Unfoldable1,
  10373. unfoldr1: unfoldr1,
  10374. replicate1: replicate1,
  10375. replicate1A: replicate1A,
  10376. singleton: singleton,
  10377. range: range,
  10378. unfoldable1Array: unfoldable1Array,
  10379. unfoldable1Maybe: unfoldable1Maybe
  10380. };
  10381. },{"./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) {
  10382. // Generated by purs version 0.13.6
  10383. "use strict";
  10384. var $foreign = require("./foreign.js");
  10385. var Data_Function = require("../Data.Function/index.js");
  10386. var Data_Functor = require("../Data.Functor/index.js");
  10387. var Data_Maybe = require("../Data.Maybe/index.js");
  10388. var Data_Traversable = require("../Data.Traversable/index.js");
  10389. var Data_Tuple = require("../Data.Tuple/index.js");
  10390. var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
  10391. var Data_Unit = require("../Data.Unit/index.js");
  10392. var Unfoldable = function Unfoldable(Unfoldable10, unfoldr) {
  10393. this.Unfoldable10 = Unfoldable10;
  10394. this.unfoldr = unfoldr;
  10395. };
  10396. var unfoldr = function unfoldr(dict) {
  10397. return dict.unfoldr;
  10398. };
  10399. var unfoldableMaybe = new Unfoldable(function () {
  10400. return Data_Unfoldable1.unfoldable1Maybe;
  10401. }, function (f) {
  10402. return function (b) {
  10403. return Data_Functor.map(Data_Maybe.functorMaybe)(Data_Tuple.fst)(f(b));
  10404. };
  10405. });
  10406. var unfoldableArray = new Unfoldable(function () {
  10407. return Data_Unfoldable1.unfoldable1Array;
  10408. }, $foreign.unfoldrArrayImpl(Data_Maybe.isNothing)(Data_Maybe.fromJust())(Data_Tuple.fst)(Data_Tuple.snd));
  10409. var replicate = function replicate(dictUnfoldable) {
  10410. return function (n) {
  10411. return function (v) {
  10412. var step = function step(i) {
  10413. var $7 = i <= 0;
  10414. if ($7) {
  10415. return Data_Maybe.Nothing.value;
  10416. }
  10417. ;
  10418. return new Data_Maybe.Just(new Data_Tuple.Tuple(v, i - 1 | 0));
  10419. };
  10420. return unfoldr(dictUnfoldable)(step)(n);
  10421. };
  10422. };
  10423. };
  10424. var replicateA = function replicateA(dictApplicative) {
  10425. return function (dictUnfoldable) {
  10426. return function (dictTraversable) {
  10427. return function (n) {
  10428. return function (m) {
  10429. return Data_Traversable.sequence(dictTraversable)(dictApplicative)(replicate(dictUnfoldable)(n)(m));
  10430. };
  10431. };
  10432. };
  10433. };
  10434. };
  10435. var none = function none(dictUnfoldable) {
  10436. return unfoldr(dictUnfoldable)(Data_Function["const"](Data_Maybe.Nothing.value))(Data_Unit.unit);
  10437. };
  10438. var fromMaybe = function fromMaybe(dictUnfoldable) {
  10439. return unfoldr(dictUnfoldable)(function (b) {
  10440. return Data_Functor.map(Data_Maybe.functorMaybe)(Data_Function.flip(Data_Tuple.Tuple.create)(Data_Maybe.Nothing.value))(b);
  10441. });
  10442. };
  10443. module.exports = {
  10444. Unfoldable: Unfoldable,
  10445. unfoldr: unfoldr,
  10446. replicate: replicate,
  10447. replicateA: replicateA,
  10448. none: none,
  10449. fromMaybe: fromMaybe,
  10450. unfoldableArray: unfoldableArray,
  10451. unfoldableMaybe: unfoldableMaybe
  10452. };
  10453. },{"./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) {
  10454. // Generated by purs version 0.13.6
  10455. "use strict";
  10456. var Control_Alt = require("../Control.Alt/index.js");
  10457. var Control_Applicative = require("../Control.Applicative/index.js");
  10458. var Control_Apply = require("../Control.Apply/index.js");
  10459. var Control_Category = require("../Control.Category/index.js");
  10460. var Control_Plus = require("../Control.Plus/index.js");
  10461. var Data_Eq = require("../Data.Eq/index.js");
  10462. var Data_Foldable = require("../Data.Foldable/index.js");
  10463. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  10464. var Data_Functor = require("../Data.Functor/index.js");
  10465. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  10466. var Data_Maybe = require("../Data.Maybe/index.js");
  10467. var Data_Ord = require("../Data.Ord/index.js");
  10468. var Data_Ordering = require("../Data.Ordering/index.js");
  10469. var Data_Semigroup = require("../Data.Semigroup/index.js");
  10470. var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
  10471. var Data_Show = require("../Data.Show/index.js");
  10472. var Data_Traversable = require("../Data.Traversable/index.js");
  10473. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  10474. var Data_Tuple = require("../Data.Tuple/index.js");
  10475. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  10476. var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
  10477. var NonEmpty = function () {
  10478. function NonEmpty(value0, value1) {
  10479. this.value0 = value0;
  10480. this.value1 = value1;
  10481. }
  10482. ;
  10483. NonEmpty.create = function (value0) {
  10484. return function (value1) {
  10485. return new NonEmpty(value0, value1);
  10486. };
  10487. };
  10488. return NonEmpty;
  10489. }();
  10490. var unfoldable1NonEmpty = function unfoldable1NonEmpty(dictUnfoldable) {
  10491. return new Data_Unfoldable1.Unfoldable1(function (f) {
  10492. return function (b) {
  10493. 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)));
  10494. };
  10495. });
  10496. };
  10497. var tail = function tail(v) {
  10498. return v.value1;
  10499. };
  10500. var singleton = function singleton(dictPlus) {
  10501. return function (a) {
  10502. return new NonEmpty(a, Control_Plus.empty(dictPlus));
  10503. };
  10504. };
  10505. var showNonEmpty = function showNonEmpty(dictShow) {
  10506. return function (dictShow1) {
  10507. return new Data_Show.Show(function (v) {
  10508. return "(NonEmpty " + (Data_Show.show(dictShow)(v.value0) + (" " + (Data_Show.show(dictShow1)(v.value1) + ")")));
  10509. });
  10510. };
  10511. };
  10512. var oneOf = function oneOf(dictAlternative) {
  10513. return function (v) {
  10514. return Control_Alt.alt(dictAlternative.Plus1().Alt0())(Control_Applicative.pure(dictAlternative.Applicative0())(v.value0))(v.value1);
  10515. };
  10516. };
  10517. var head = function head(v) {
  10518. return v.value0;
  10519. };
  10520. var functorNonEmpty = function functorNonEmpty(dictFunctor) {
  10521. return new Data_Functor.Functor(function (f) {
  10522. return function (m) {
  10523. return new NonEmpty(f(m.value0), Data_Functor.map(dictFunctor)(f)(m.value1));
  10524. };
  10525. });
  10526. };
  10527. var functorWithIndex = function functorWithIndex(dictFunctorWithIndex) {
  10528. return new Data_FunctorWithIndex.FunctorWithIndex(function () {
  10529. return functorNonEmpty(dictFunctorWithIndex.Functor0());
  10530. }, function (f) {
  10531. return function (v) {
  10532. return new NonEmpty(f(Data_Maybe.Nothing.value)(v.value0), Data_FunctorWithIndex.mapWithIndex(dictFunctorWithIndex)(function ($146) {
  10533. return f(Data_Maybe.Just.create($146));
  10534. })(v.value1));
  10535. };
  10536. });
  10537. };
  10538. var fromNonEmpty = function fromNonEmpty(f) {
  10539. return function (v) {
  10540. return f(v.value0)(v.value1);
  10541. };
  10542. };
  10543. var foldl1 = function foldl1(dictFoldable) {
  10544. return function (f) {
  10545. return function (v) {
  10546. return Data_Foldable.foldl(dictFoldable)(f)(v.value0)(v.value1);
  10547. };
  10548. };
  10549. };
  10550. var foldableNonEmpty = function foldableNonEmpty(dictFoldable) {
  10551. return new Data_Foldable.Foldable(function (dictMonoid) {
  10552. return function (f) {
  10553. return function (v) {
  10554. return Data_Semigroup.append(dictMonoid.Semigroup0())(f(v.value0))(Data_Foldable.foldMap(dictFoldable)(dictMonoid)(f)(v.value1));
  10555. };
  10556. };
  10557. }, function (f) {
  10558. return function (b) {
  10559. return function (v) {
  10560. return Data_Foldable.foldl(dictFoldable)(f)(f(b)(v.value0))(v.value1);
  10561. };
  10562. };
  10563. }, function (f) {
  10564. return function (b) {
  10565. return function (v) {
  10566. return f(v.value0)(Data_Foldable.foldr(dictFoldable)(f)(b)(v.value1));
  10567. };
  10568. };
  10569. });
  10570. };
  10571. var foldableWithIndexNonEmpty = function foldableWithIndexNonEmpty(dictFoldableWithIndex) {
  10572. return new Data_FoldableWithIndex.FoldableWithIndex(function () {
  10573. return foldableNonEmpty(dictFoldableWithIndex.Foldable0());
  10574. }, function (dictMonoid) {
  10575. return function (f) {
  10576. return function (v) {
  10577. return Data_Semigroup.append(dictMonoid.Semigroup0())(f(Data_Maybe.Nothing.value)(v.value0))(Data_FoldableWithIndex.foldMapWithIndex(dictFoldableWithIndex)(dictMonoid)(function ($147) {
  10578. return f(Data_Maybe.Just.create($147));
  10579. })(v.value1));
  10580. };
  10581. };
  10582. }, function (f) {
  10583. return function (b) {
  10584. return function (v) {
  10585. return Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex)(function ($148) {
  10586. return f(Data_Maybe.Just.create($148));
  10587. })(f(Data_Maybe.Nothing.value)(b)(v.value0))(v.value1);
  10588. };
  10589. };
  10590. }, function (f) {
  10591. return function (b) {
  10592. return function (v) {
  10593. return f(Data_Maybe.Nothing.value)(v.value0)(Data_FoldableWithIndex.foldrWithIndex(dictFoldableWithIndex)(function ($149) {
  10594. return f(Data_Maybe.Just.create($149));
  10595. })(b)(v.value1));
  10596. };
  10597. };
  10598. });
  10599. };
  10600. var traversableNonEmpty = function traversableNonEmpty(dictTraversable) {
  10601. return new Data_Traversable.Traversable(function () {
  10602. return foldableNonEmpty(dictTraversable.Foldable1());
  10603. }, function () {
  10604. return functorNonEmpty(dictTraversable.Functor0());
  10605. }, function (dictApplicative) {
  10606. return function (v) {
  10607. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmpty.create)(v.value0))(Data_Traversable.sequence(dictTraversable)(dictApplicative)(v.value1));
  10608. };
  10609. }, function (dictApplicative) {
  10610. return function (f) {
  10611. return function (v) {
  10612. 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));
  10613. };
  10614. };
  10615. });
  10616. };
  10617. var traversableWithIndexNonEmpty = function traversableWithIndexNonEmpty(dictTraversableWithIndex) {
  10618. return new Data_TraversableWithIndex.TraversableWithIndex(function () {
  10619. return foldableWithIndexNonEmpty(dictTraversableWithIndex.FoldableWithIndex1());
  10620. }, function () {
  10621. return functorWithIndex(dictTraversableWithIndex.FunctorWithIndex0());
  10622. }, function () {
  10623. return traversableNonEmpty(dictTraversableWithIndex.Traversable2());
  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(Data_Maybe.Nothing.value)(v.value0)))(Data_TraversableWithIndex.traverseWithIndex(dictTraversableWithIndex)(dictApplicative)(function ($150) {
  10628. return f(Data_Maybe.Just.create($150));
  10629. })(v.value1));
  10630. };
  10631. };
  10632. });
  10633. };
  10634. var foldable1NonEmpty = function foldable1NonEmpty(dictFoldable) {
  10635. return new Data_Semigroup_Foldable.Foldable1(function () {
  10636. return foldableNonEmpty(dictFoldable);
  10637. }, function (dictSemigroup) {
  10638. return Data_Semigroup_Foldable.foldMap1(foldable1NonEmpty(dictFoldable))(dictSemigroup)(Control_Category.identity(Control_Category.categoryFn));
  10639. }, function (dictSemigroup) {
  10640. return function (f) {
  10641. return function (v) {
  10642. return Data_Foldable.foldl(dictFoldable)(function (s) {
  10643. return function (a1) {
  10644. return Data_Semigroup.append(dictSemigroup)(s)(f(a1));
  10645. };
  10646. })(f(v.value0))(v.value1);
  10647. };
  10648. };
  10649. });
  10650. };
  10651. var eqNonEmpty = function eqNonEmpty(dictEq1) {
  10652. return function (dictEq) {
  10653. return new Data_Eq.Eq(function (x) {
  10654. return function (y) {
  10655. return Data_Eq.eq(dictEq)(x.value0)(y.value0) && Data_Eq.eq1(dictEq1)(dictEq)(x.value1)(y.value1);
  10656. };
  10657. });
  10658. };
  10659. };
  10660. var ordNonEmpty = function ordNonEmpty(dictOrd1) {
  10661. return function (dictOrd) {
  10662. return new Data_Ord.Ord(function () {
  10663. return eqNonEmpty(dictOrd1.Eq10())(dictOrd.Eq0());
  10664. }, function (x) {
  10665. return function (y) {
  10666. var v = Data_Ord.compare(dictOrd)(x.value0)(y.value0);
  10667. if (v instanceof Data_Ordering.LT) {
  10668. return Data_Ordering.LT.value;
  10669. }
  10670. ;
  10671. if (v instanceof Data_Ordering.GT) {
  10672. return Data_Ordering.GT.value;
  10673. }
  10674. ;
  10675. return Data_Ord.compare1(dictOrd1)(dictOrd)(x.value1)(y.value1);
  10676. };
  10677. });
  10678. };
  10679. };
  10680. var eq1NonEmpty = function eq1NonEmpty(dictEq1) {
  10681. return new Data_Eq.Eq1(function (dictEq) {
  10682. return Data_Eq.eq(eqNonEmpty(dictEq1)(dictEq));
  10683. });
  10684. };
  10685. var ord1NonEmpty = function ord1NonEmpty(dictOrd1) {
  10686. return new Data_Ord.Ord1(function () {
  10687. return eq1NonEmpty(dictOrd1.Eq10());
  10688. }, function (dictOrd) {
  10689. return Data_Ord.compare(ordNonEmpty(dictOrd1)(dictOrd));
  10690. });
  10691. };
  10692. module.exports = {
  10693. NonEmpty: NonEmpty,
  10694. singleton: singleton,
  10695. foldl1: foldl1,
  10696. fromNonEmpty: fromNonEmpty,
  10697. oneOf: oneOf,
  10698. head: head,
  10699. tail: tail,
  10700. showNonEmpty: showNonEmpty,
  10701. eqNonEmpty: eqNonEmpty,
  10702. eq1NonEmpty: eq1NonEmpty,
  10703. ordNonEmpty: ordNonEmpty,
  10704. ord1NonEmpty: ord1NonEmpty,
  10705. functorNonEmpty: functorNonEmpty,
  10706. functorWithIndex: functorWithIndex,
  10707. foldableNonEmpty: foldableNonEmpty,
  10708. foldableWithIndexNonEmpty: foldableWithIndexNonEmpty,
  10709. traversableNonEmpty: traversableNonEmpty,
  10710. traversableWithIndexNonEmpty: traversableWithIndexNonEmpty,
  10711. foldable1NonEmpty: foldable1NonEmpty,
  10712. unfoldable1NonEmpty: unfoldable1NonEmpty
  10713. };
  10714. },{"../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) {
  10715. // Generated by purs version 0.13.6
  10716. "use strict";
  10717. var Control_Alt = require("../Control.Alt/index.js");
  10718. var Control_Alternative = require("../Control.Alternative/index.js");
  10719. var Control_Applicative = require("../Control.Applicative/index.js");
  10720. var Control_Apply = require("../Control.Apply/index.js");
  10721. var Control_Bind = require("../Control.Bind/index.js");
  10722. var Control_Category = require("../Control.Category/index.js");
  10723. var Control_Comonad = require("../Control.Comonad/index.js");
  10724. var Control_Extend = require("../Control.Extend/index.js");
  10725. var Control_Monad = require("../Control.Monad/index.js");
  10726. var Control_MonadPlus = require("../Control.MonadPlus/index.js");
  10727. var Control_MonadZero = require("../Control.MonadZero/index.js");
  10728. var Control_Plus = require("../Control.Plus/index.js");
  10729. var Data_Eq = require("../Data.Eq/index.js");
  10730. var Data_Foldable = require("../Data.Foldable/index.js");
  10731. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  10732. var Data_Function = require("../Data.Function/index.js");
  10733. var Data_Functor = require("../Data.Functor/index.js");
  10734. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  10735. var Data_Maybe = require("../Data.Maybe/index.js");
  10736. var Data_Monoid = require("../Data.Monoid/index.js");
  10737. var Data_Newtype = require("../Data.Newtype/index.js");
  10738. var Data_NonEmpty = require("../Data.NonEmpty/index.js");
  10739. var Data_Ord = require("../Data.Ord/index.js");
  10740. var Data_Ordering = require("../Data.Ordering/index.js");
  10741. var Data_Semigroup = require("../Data.Semigroup/index.js");
  10742. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  10743. var Data_Semiring = require("../Data.Semiring/index.js");
  10744. var Data_Show = require("../Data.Show/index.js");
  10745. var Data_Traversable = require("../Data.Traversable/index.js");
  10746. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  10747. var Data_Tuple = require("../Data.Tuple/index.js");
  10748. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  10749. var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
  10750. var Nil = function () {
  10751. function Nil() {}
  10752. ;
  10753. Nil.value = new Nil();
  10754. return Nil;
  10755. }();
  10756. var Cons = function () {
  10757. function Cons(value0, value1) {
  10758. this.value0 = value0;
  10759. this.value1 = value1;
  10760. }
  10761. ;
  10762. Cons.create = function (value0) {
  10763. return function (value1) {
  10764. return new Cons(value0, value1);
  10765. };
  10766. };
  10767. return Cons;
  10768. }();
  10769. var NonEmptyList = function NonEmptyList(x) {
  10770. return x;
  10771. };
  10772. var toList = function toList(v) {
  10773. return new Cons(v.value0, v.value1);
  10774. };
  10775. var newtypeNonEmptyList = new Data_Newtype.Newtype(function (n) {
  10776. return n;
  10777. }, NonEmptyList);
  10778. var nelCons = function nelCons(a) {
  10779. return function (v) {
  10780. return new Data_NonEmpty.NonEmpty(a, new Cons(v.value0, v.value1));
  10781. };
  10782. };
  10783. var listMap = function listMap(f) {
  10784. var chunkedRevMap = function chunkedRevMap($copy_chunksAcc) {
  10785. return function ($copy_v) {
  10786. var $tco_var_chunksAcc = $copy_chunksAcc;
  10787. var $tco_done = false;
  10788. var $tco_result;
  10789. function $tco_loop(chunksAcc, v) {
  10790. if (v instanceof Cons && v.value1 instanceof Cons && v.value1.value1 instanceof Cons) {
  10791. $tco_var_chunksAcc = new Cons(v, chunksAcc);
  10792. $copy_v = v.value1.value1.value1;
  10793. return;
  10794. }
  10795. ;
  10796. var unrolledMap = function unrolledMap(v1) {
  10797. if (v1 instanceof Cons && v1.value1 instanceof Cons && v1.value1.value1 instanceof Nil) {
  10798. return new Cons(f(v1.value0), new Cons(f(v1.value1.value0), Nil.value));
  10799. }
  10800. ;
  10801. if (v1 instanceof Cons && v1.value1 instanceof Nil) {
  10802. return new Cons(f(v1.value0), Nil.value);
  10803. }
  10804. ;
  10805. return Nil.value;
  10806. };
  10807. var reverseUnrolledMap = function reverseUnrolledMap($copy_v1) {
  10808. return function ($copy_acc) {
  10809. var $tco_var_v1 = $copy_v1;
  10810. var $tco_done = false;
  10811. var $tco_result;
  10812. function $tco_loop(v1, acc) {
  10813. if (v1 instanceof Cons && v1.value0 instanceof Cons && v1.value0.value1 instanceof Cons && v1.value0.value1.value1 instanceof Cons) {
  10814. $tco_var_v1 = v1.value1;
  10815. $copy_acc = new Cons(f(v1.value0.value0), new Cons(f(v1.value0.value1.value0), new Cons(f(v1.value0.value1.value1.value0), acc)));
  10816. return;
  10817. }
  10818. ;
  10819. $tco_done = true;
  10820. return acc;
  10821. }
  10822. ;
  10823. while (!$tco_done) {
  10824. $tco_result = $tco_loop($tco_var_v1, $copy_acc);
  10825. }
  10826. ;
  10827. return $tco_result;
  10828. };
  10829. };
  10830. $tco_done = true;
  10831. return reverseUnrolledMap(chunksAcc)(unrolledMap(v));
  10832. }
  10833. ;
  10834. while (!$tco_done) {
  10835. $tco_result = $tco_loop($tco_var_chunksAcc, $copy_v);
  10836. }
  10837. ;
  10838. return $tco_result;
  10839. };
  10840. };
  10841. return chunkedRevMap(Nil.value);
  10842. };
  10843. var functorList = new Data_Functor.Functor(listMap);
  10844. var functorNonEmptyList = Data_NonEmpty.functorNonEmpty(functorList);
  10845. var foldableList = new Data_Foldable.Foldable(function (dictMonoid) {
  10846. return function (f) {
  10847. return Data_Foldable.foldl(foldableList)(function (acc) {
  10848. var $202 = Data_Semigroup.append(dictMonoid.Semigroup0())(acc);
  10849. return function ($203) {
  10850. return $202(f($203));
  10851. };
  10852. })(Data_Monoid.mempty(dictMonoid));
  10853. };
  10854. }, function (f) {
  10855. var go = function go($copy_b) {
  10856. return function ($copy_v) {
  10857. var $tco_var_b = $copy_b;
  10858. var $tco_done = false;
  10859. var $tco_result;
  10860. function $tco_loop(b, v) {
  10861. if (v instanceof Nil) {
  10862. $tco_done = true;
  10863. return b;
  10864. }
  10865. ;
  10866. if (v instanceof Cons) {
  10867. $tco_var_b = f(b)(v.value0);
  10868. $copy_v = v.value1;
  10869. return;
  10870. }
  10871. ;
  10872. throw new Error("Failed pattern match at Data.List.Types (line 109, column 12 - line 111, column 30): " + [v.constructor.name]);
  10873. }
  10874. ;
  10875. while (!$tco_done) {
  10876. $tco_result = $tco_loop($tco_var_b, $copy_v);
  10877. }
  10878. ;
  10879. return $tco_result;
  10880. };
  10881. };
  10882. return go;
  10883. }, function (f) {
  10884. return function (b) {
  10885. var rev = Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value);
  10886. var $204 = Data_Foldable.foldl(foldableList)(Data_Function.flip(f))(b);
  10887. return function ($205) {
  10888. return $204(rev($205));
  10889. };
  10890. };
  10891. });
  10892. var foldableNonEmptyList = Data_NonEmpty.foldableNonEmpty(foldableList);
  10893. var foldableWithIndexList = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  10894. return foldableList;
  10895. }, function (dictMonoid) {
  10896. return function (f) {
  10897. return Data_FoldableWithIndex.foldlWithIndex(foldableWithIndexList)(function (i) {
  10898. return function (acc) {
  10899. var $206 = Data_Semigroup.append(dictMonoid.Semigroup0())(acc);
  10900. var $207 = f(i);
  10901. return function ($208) {
  10902. return $206($207($208));
  10903. };
  10904. };
  10905. })(Data_Monoid.mempty(dictMonoid));
  10906. };
  10907. }, function (f) {
  10908. return function (acc) {
  10909. var $209 = Data_Foldable.foldl(foldableList)(function (v) {
  10910. return function (a) {
  10911. return new Data_Tuple.Tuple(v.value0 + 1 | 0, f(v.value0)(v.value1)(a));
  10912. };
  10913. })(new Data_Tuple.Tuple(0, acc));
  10914. return function ($210) {
  10915. return Data_Tuple.snd($209($210));
  10916. };
  10917. };
  10918. }, function (f) {
  10919. return function (b) {
  10920. return function (xs) {
  10921. var v = function () {
  10922. var rev = Data_Foldable.foldl(foldableList)(function (v1) {
  10923. return function (a) {
  10924. return new Data_Tuple.Tuple(v1.value0 + 1 | 0, new Cons(a, v1.value1));
  10925. };
  10926. });
  10927. return rev(new Data_Tuple.Tuple(0, Nil.value))(xs);
  10928. }();
  10929. return Data_Tuple.snd(Data_Foldable.foldl(foldableList)(function (v1) {
  10930. return function (a) {
  10931. return new Data_Tuple.Tuple(v1.value0 - 1 | 0, f(v1.value0 - 1 | 0)(a)(v1.value1));
  10932. };
  10933. })(new Data_Tuple.Tuple(v.value0, b))(v.value1));
  10934. };
  10935. };
  10936. });
  10937. var foldableWithIndexNonEmptyList = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  10938. return foldableNonEmptyList;
  10939. }, function (dictMonoid) {
  10940. return function (f) {
  10941. return function (v) {
  10942. return Data_FoldableWithIndex.foldMapWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(dictMonoid)(function () {
  10943. var $211 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  10944. return function ($212) {
  10945. return f($211($212));
  10946. };
  10947. }())(v);
  10948. };
  10949. };
  10950. }, function (f) {
  10951. return function (b) {
  10952. return function (v) {
  10953. return Data_FoldableWithIndex.foldlWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () {
  10954. var $213 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  10955. return function ($214) {
  10956. return f($213($214));
  10957. };
  10958. }())(b)(v);
  10959. };
  10960. };
  10961. }, function (f) {
  10962. return function (b) {
  10963. return function (v) {
  10964. return Data_FoldableWithIndex.foldrWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () {
  10965. var $215 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  10966. return function ($216) {
  10967. return f($215($216));
  10968. };
  10969. }())(b)(v);
  10970. };
  10971. };
  10972. });
  10973. var functorWithIndexList = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  10974. return functorList;
  10975. }, function (f) {
  10976. return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexList)(function (i) {
  10977. return function (x) {
  10978. return function (acc) {
  10979. return new Cons(f(i)(x), acc);
  10980. };
  10981. };
  10982. })(Nil.value);
  10983. });
  10984. var functorWithIndexNonEmptyList = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  10985. return functorNonEmptyList;
  10986. }, function (fn) {
  10987. return function (v) {
  10988. return NonEmptyList(Data_FunctorWithIndex.mapWithIndex(Data_NonEmpty.functorWithIndex(functorWithIndexList))(function () {
  10989. var $217 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  10990. return function ($218) {
  10991. return fn($217($218));
  10992. };
  10993. }())(v));
  10994. };
  10995. });
  10996. var semigroupList = new Data_Semigroup.Semigroup(function (xs) {
  10997. return function (ys) {
  10998. return Data_Foldable.foldr(foldableList)(Cons.create)(ys)(xs);
  10999. };
  11000. });
  11001. var monoidList = new Data_Monoid.Monoid(function () {
  11002. return semigroupList;
  11003. }, Nil.value);
  11004. var semigroupNonEmptyList = new Data_Semigroup.Semigroup(function (v) {
  11005. return function (as$prime) {
  11006. return new Data_NonEmpty.NonEmpty(v.value0, Data_Semigroup.append(semigroupList)(v.value1)(toList(as$prime)));
  11007. };
  11008. });
  11009. var showList = function showList(dictShow) {
  11010. return new Data_Show.Show(function (v) {
  11011. if (v instanceof Nil) {
  11012. return "Nil";
  11013. }
  11014. ;
  11015. return "(" + (Data_Foldable.intercalate(foldableList)(Data_Monoid.monoidString)(" : ")(Data_Functor.map(functorList)(Data_Show.show(dictShow))(v)) + " : Nil)");
  11016. });
  11017. };
  11018. var showNonEmptyList = function showNonEmptyList(dictShow) {
  11019. return new Data_Show.Show(function (v) {
  11020. return "(NonEmptyList " + (Data_Show.show(Data_NonEmpty.showNonEmpty(dictShow)(showList(dictShow)))(v) + ")");
  11021. });
  11022. };
  11023. var traversableList = new Data_Traversable.Traversable(function () {
  11024. return foldableList;
  11025. }, function () {
  11026. return functorList;
  11027. }, function (dictApplicative) {
  11028. return Data_Traversable.traverse(traversableList)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
  11029. }, function (dictApplicative) {
  11030. return function (f) {
  11031. var $219 = Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value));
  11032. var $220 = Data_Foldable.foldl(foldableList)(function (acc) {
  11033. var $222 = Control_Apply.lift2(dictApplicative.Apply0())(Data_Function.flip(Cons.create))(acc);
  11034. return function ($223) {
  11035. return $222(f($223));
  11036. };
  11037. })(Control_Applicative.pure(dictApplicative)(Nil.value));
  11038. return function ($221) {
  11039. return $219($220($221));
  11040. };
  11041. };
  11042. });
  11043. var traversableNonEmptyList = Data_NonEmpty.traversableNonEmpty(traversableList);
  11044. var traversableWithIndexList = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  11045. return foldableWithIndexList;
  11046. }, function () {
  11047. return functorWithIndexList;
  11048. }, function () {
  11049. return traversableList;
  11050. }, function (dictApplicative) {
  11051. return function (f) {
  11052. var rev = Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value);
  11053. var $224 = Data_Functor.map(dictApplicative.Apply0().Functor0())(rev);
  11054. var $225 = Data_FoldableWithIndex.foldlWithIndex(foldableWithIndexList)(function (i) {
  11055. return function (acc) {
  11056. var $227 = Control_Apply.lift2(dictApplicative.Apply0())(Data_Function.flip(Cons.create))(acc);
  11057. var $228 = f(i);
  11058. return function ($229) {
  11059. return $227($228($229));
  11060. };
  11061. };
  11062. })(Control_Applicative.pure(dictApplicative)(Nil.value));
  11063. return function ($226) {
  11064. return $224($225($226));
  11065. };
  11066. };
  11067. });
  11068. var traversableWithIndexNonEmptyList = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  11069. return foldableWithIndexNonEmptyList;
  11070. }, function () {
  11071. return functorWithIndexNonEmptyList;
  11072. }, function () {
  11073. return traversableNonEmptyList;
  11074. }, function (dictApplicative) {
  11075. return function (f) {
  11076. return function (v) {
  11077. return Data_Functor.map(dictApplicative.Apply0().Functor0())(NonEmptyList)(Data_TraversableWithIndex.traverseWithIndex(Data_NonEmpty.traversableWithIndexNonEmpty(traversableWithIndexList))(dictApplicative)(function () {
  11078. var $230 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  11079. return function ($231) {
  11080. return f($230($231));
  11081. };
  11082. }())(v));
  11083. };
  11084. };
  11085. });
  11086. var unfoldable1List = new Data_Unfoldable1.Unfoldable1(function (f) {
  11087. return function (b) {
  11088. var go = function go($copy_source) {
  11089. return function ($copy_memo) {
  11090. var $tco_var_source = $copy_source;
  11091. var $tco_done = false;
  11092. var $tco_result;
  11093. function $tco_loop(source, memo) {
  11094. var v = f(source);
  11095. if (v.value1 instanceof Data_Maybe.Just) {
  11096. $tco_var_source = v.value1.value0;
  11097. $copy_memo = new Cons(v.value0, memo);
  11098. return;
  11099. }
  11100. ;
  11101. if (v.value1 instanceof Data_Maybe.Nothing) {
  11102. $tco_done = true;
  11103. return Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value)(new Cons(v.value0, memo));
  11104. }
  11105. ;
  11106. throw new Error("Failed pattern match at Data.List.Types (line 133, column 22 - line 135, column 61): " + [v.constructor.name]);
  11107. }
  11108. ;
  11109. while (!$tco_done) {
  11110. $tco_result = $tco_loop($tco_var_source, $copy_memo);
  11111. }
  11112. ;
  11113. return $tco_result;
  11114. };
  11115. };
  11116. return go(b)(Nil.value);
  11117. };
  11118. });
  11119. var unfoldableList = new Data_Unfoldable.Unfoldable(function () {
  11120. return unfoldable1List;
  11121. }, function (f) {
  11122. return function (b) {
  11123. var go = function go($copy_source) {
  11124. return function ($copy_memo) {
  11125. var $tco_var_source = $copy_source;
  11126. var $tco_done = false;
  11127. var $tco_result;
  11128. function $tco_loop(source, memo) {
  11129. var v = f(source);
  11130. if (v instanceof Data_Maybe.Nothing) {
  11131. $tco_done = true;
  11132. return Data_Foldable.foldl(foldableList)(Data_Function.flip(Cons.create))(Nil.value)(memo);
  11133. }
  11134. ;
  11135. if (v instanceof Data_Maybe.Just) {
  11136. $tco_var_source = v.value0.value1;
  11137. $copy_memo = new Cons(v.value0.value0, memo);
  11138. return;
  11139. }
  11140. ;
  11141. throw new Error("Failed pattern match at Data.List.Types (line 140, column 22 - line 142, column 52): " + [v.constructor.name]);
  11142. }
  11143. ;
  11144. while (!$tco_done) {
  11145. $tco_result = $tco_loop($tco_var_source, $copy_memo);
  11146. }
  11147. ;
  11148. return $tco_result;
  11149. };
  11150. };
  11151. return go(b)(Nil.value);
  11152. };
  11153. });
  11154. var unfoldable1NonEmptyList = Data_NonEmpty.unfoldable1NonEmpty(unfoldableList);
  11155. var foldable1NonEmptyList = Data_NonEmpty.foldable1NonEmpty(foldableList);
  11156. var extendNonEmptyList = new Control_Extend.Extend(function () {
  11157. return functorNonEmptyList;
  11158. }, function (f) {
  11159. return function (v) {
  11160. var go = function go(a) {
  11161. return function (v1) {
  11162. return {
  11163. val: new Cons(f(new Data_NonEmpty.NonEmpty(a, v1.acc)), v1.val),
  11164. acc: new Cons(a, v1.acc)
  11165. };
  11166. };
  11167. };
  11168. return new Data_NonEmpty.NonEmpty(f(v), Data_Foldable.foldr(foldableList)(go)({
  11169. val: Nil.value,
  11170. acc: Nil.value
  11171. })(v.value1).val);
  11172. };
  11173. });
  11174. var extendList = new Control_Extend.Extend(function () {
  11175. return functorList;
  11176. }, function (f) {
  11177. return function (v) {
  11178. if (v instanceof Nil) {
  11179. return Nil.value;
  11180. }
  11181. ;
  11182. if (v instanceof Cons) {
  11183. var go = function go(a$prime) {
  11184. return function (v1) {
  11185. var acc$prime = new Cons(a$prime, v1.acc);
  11186. return {
  11187. val: new Cons(f(acc$prime), v1.val),
  11188. acc: acc$prime
  11189. };
  11190. };
  11191. };
  11192. return new Cons(f(v), Data_Foldable.foldr(foldableList)(go)({
  11193. val: Nil.value,
  11194. acc: Nil.value
  11195. })(v.value1).val);
  11196. }
  11197. ;
  11198. throw new Error("Failed pattern match at Data.List.Types (line 180, column 1 - line 187, column 42): " + [f.constructor.name, v.constructor.name]);
  11199. };
  11200. });
  11201. var eq1List = new Data_Eq.Eq1(function (dictEq) {
  11202. return function (xs) {
  11203. return function (ys) {
  11204. var go = function go($copy_v) {
  11205. return function ($copy_v1) {
  11206. return function ($copy_v2) {
  11207. var $tco_var_v = $copy_v;
  11208. var $tco_var_v1 = $copy_v1;
  11209. var $tco_done = false;
  11210. var $tco_result;
  11211. function $tco_loop(v, v1, v2) {
  11212. if (!v2) {
  11213. $tco_done = true;
  11214. return false;
  11215. }
  11216. ;
  11217. if (v instanceof Nil && v1 instanceof Nil) {
  11218. $tco_done = true;
  11219. return v2;
  11220. }
  11221. ;
  11222. if (v instanceof Cons && v1 instanceof Cons) {
  11223. $tco_var_v = v.value1;
  11224. $tco_var_v1 = v1.value1;
  11225. $copy_v2 = v2 && Data_Eq.eq(dictEq)(v1.value0)(v.value0);
  11226. return;
  11227. }
  11228. ;
  11229. $tco_done = true;
  11230. return false;
  11231. }
  11232. ;
  11233. while (!$tco_done) {
  11234. $tco_result = $tco_loop($tco_var_v, $tco_var_v1, $copy_v2);
  11235. }
  11236. ;
  11237. return $tco_result;
  11238. };
  11239. };
  11240. };
  11241. return go(xs)(ys)(true);
  11242. };
  11243. };
  11244. });
  11245. var eqList = function eqList(dictEq) {
  11246. return new Data_Eq.Eq(Data_Eq.eq1(eq1List)(dictEq));
  11247. };
  11248. var eqNonEmptyList = function eqNonEmptyList(dictEq) {
  11249. return Data_NonEmpty.eqNonEmpty(eq1List)(dictEq);
  11250. };
  11251. var ord1List = new Data_Ord.Ord1(function () {
  11252. return eq1List;
  11253. }, function (dictOrd) {
  11254. return function (xs) {
  11255. return function (ys) {
  11256. var go = function go($copy_v) {
  11257. return function ($copy_v1) {
  11258. var $tco_var_v = $copy_v;
  11259. var $tco_done = false;
  11260. var $tco_result;
  11261. function $tco_loop(v, v1) {
  11262. if (v instanceof Nil && v1 instanceof Nil) {
  11263. $tco_done = true;
  11264. return Data_Ordering.EQ.value;
  11265. }
  11266. ;
  11267. if (v instanceof Nil) {
  11268. $tco_done = true;
  11269. return Data_Ordering.LT.value;
  11270. }
  11271. ;
  11272. if (v1 instanceof Nil) {
  11273. $tco_done = true;
  11274. return Data_Ordering.GT.value;
  11275. }
  11276. ;
  11277. if (v instanceof Cons && v1 instanceof Cons) {
  11278. var v2 = Data_Ord.compare(dictOrd)(v.value0)(v1.value0);
  11279. if (v2 instanceof Data_Ordering.EQ) {
  11280. $tco_var_v = v.value1;
  11281. $copy_v1 = v1.value1;
  11282. return;
  11283. }
  11284. ;
  11285. $tco_done = true;
  11286. return v2;
  11287. }
  11288. ;
  11289. throw new Error("Failed pattern match at Data.List.Types (line 61, column 5 - line 61, column 20): " + [v.constructor.name, v1.constructor.name]);
  11290. }
  11291. ;
  11292. while (!$tco_done) {
  11293. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  11294. }
  11295. ;
  11296. return $tco_result;
  11297. };
  11298. };
  11299. return go(xs)(ys);
  11300. };
  11301. };
  11302. });
  11303. var ordList = function ordList(dictOrd) {
  11304. return new Data_Ord.Ord(function () {
  11305. return eqList(dictOrd.Eq0());
  11306. }, Data_Ord.compare1(ord1List)(dictOrd));
  11307. };
  11308. var ordNonEmptyList = function ordNonEmptyList(dictOrd) {
  11309. return Data_NonEmpty.ordNonEmpty(ord1List)(dictOrd);
  11310. };
  11311. var comonadNonEmptyList = new Control_Comonad.Comonad(function () {
  11312. return extendNonEmptyList;
  11313. }, function (v) {
  11314. return v.value0;
  11315. });
  11316. var applyList = new Control_Apply.Apply(function () {
  11317. return functorList;
  11318. }, function (v) {
  11319. return function (v1) {
  11320. if (v instanceof Nil) {
  11321. return Nil.value;
  11322. }
  11323. ;
  11324. if (v instanceof Cons) {
  11325. return Data_Semigroup.append(semigroupList)(Data_Functor.map(functorList)(v.value0)(v1))(Control_Apply.apply(applyList)(v.value1)(v1));
  11326. }
  11327. ;
  11328. throw new Error("Failed pattern match at Data.List.Types (line 155, column 1 - line 157, column 48): " + [v.constructor.name, v1.constructor.name]);
  11329. };
  11330. });
  11331. var applyNonEmptyList = new Control_Apply.Apply(function () {
  11332. return functorNonEmptyList;
  11333. }, function (v) {
  11334. return function (v1) {
  11335. 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)));
  11336. };
  11337. });
  11338. var bindList = new Control_Bind.Bind(function () {
  11339. return applyList;
  11340. }, function (v) {
  11341. return function (v1) {
  11342. if (v instanceof Nil) {
  11343. return Nil.value;
  11344. }
  11345. ;
  11346. if (v instanceof Cons) {
  11347. return Data_Semigroup.append(semigroupList)(v1(v.value0))(Control_Bind.bind(bindList)(v.value1)(v1));
  11348. }
  11349. ;
  11350. throw new Error("Failed pattern match at Data.List.Types (line 162, column 1 - line 164, column 37): " + [v.constructor.name, v1.constructor.name]);
  11351. };
  11352. });
  11353. var bindNonEmptyList = new Control_Bind.Bind(function () {
  11354. return applyNonEmptyList;
  11355. }, function (v) {
  11356. return function (f) {
  11357. var v1 = f(v.value0);
  11358. return new Data_NonEmpty.NonEmpty(v1.value0, Data_Semigroup.append(semigroupList)(v1.value1)(Control_Bind.bind(bindList)(v.value1)(function ($232) {
  11359. return toList(f($232));
  11360. })));
  11361. };
  11362. });
  11363. var applicativeList = new Control_Applicative.Applicative(function () {
  11364. return applyList;
  11365. }, function (a) {
  11366. return new Cons(a, Nil.value);
  11367. });
  11368. var monadList = new Control_Monad.Monad(function () {
  11369. return applicativeList;
  11370. }, function () {
  11371. return bindList;
  11372. });
  11373. var altNonEmptyList = new Control_Alt.Alt(function () {
  11374. return functorNonEmptyList;
  11375. }, Data_Semigroup.append(semigroupNonEmptyList));
  11376. var altList = new Control_Alt.Alt(function () {
  11377. return functorList;
  11378. }, Data_Semigroup.append(semigroupList));
  11379. var plusList = new Control_Plus.Plus(function () {
  11380. return altList;
  11381. }, Nil.value);
  11382. var alternativeList = new Control_Alternative.Alternative(function () {
  11383. return applicativeList;
  11384. }, function () {
  11385. return plusList;
  11386. });
  11387. var monadZeroList = new Control_MonadZero.MonadZero(function () {
  11388. return alternativeList;
  11389. }, function () {
  11390. return monadList;
  11391. });
  11392. var monadPlusList = new Control_MonadPlus.MonadPlus(function () {
  11393. return monadZeroList;
  11394. });
  11395. var applicativeNonEmptyList = new Control_Applicative.Applicative(function () {
  11396. return applyNonEmptyList;
  11397. }, function () {
  11398. var $233 = Data_NonEmpty.singleton(plusList);
  11399. return function ($234) {
  11400. return NonEmptyList($233($234));
  11401. };
  11402. }());
  11403. var monadNonEmptyList = new Control_Monad.Monad(function () {
  11404. return applicativeNonEmptyList;
  11405. }, function () {
  11406. return bindNonEmptyList;
  11407. });
  11408. var traversable1NonEmptyList = new Data_Semigroup_Traversable.Traversable1(function () {
  11409. return foldable1NonEmptyList;
  11410. }, function () {
  11411. return traversableNonEmptyList;
  11412. }, function (dictApply) {
  11413. return Data_Semigroup_Traversable.traverse1(traversable1NonEmptyList)(dictApply)(Control_Category.identity(Control_Category.categoryFn));
  11414. }, function (dictApply) {
  11415. return function (f) {
  11416. return function (v) {
  11417. return Data_Functor.mapFlipped(dictApply.Functor0())(Data_Foldable.foldl(foldableList)(function (acc) {
  11418. var $235 = Control_Apply.lift2(dictApply)(Data_Function.flip(nelCons))(acc);
  11419. return function ($236) {
  11420. return $235(f($236));
  11421. };
  11422. })(Data_Functor.map(dictApply.Functor0())(Control_Applicative.pure(applicativeNonEmptyList))(f(v.value0)))(v.value1))(function (v1) {
  11423. return Data_Foldable.foldl(foldableList)(Data_Function.flip(nelCons))(Control_Applicative.pure(applicativeNonEmptyList)(v1.value0))(v1.value1);
  11424. });
  11425. };
  11426. };
  11427. });
  11428. module.exports = {
  11429. Nil: Nil,
  11430. Cons: Cons,
  11431. NonEmptyList: NonEmptyList,
  11432. toList: toList,
  11433. nelCons: nelCons,
  11434. showList: showList,
  11435. eqList: eqList,
  11436. eq1List: eq1List,
  11437. ordList: ordList,
  11438. ord1List: ord1List,
  11439. semigroupList: semigroupList,
  11440. monoidList: monoidList,
  11441. functorList: functorList,
  11442. functorWithIndexList: functorWithIndexList,
  11443. foldableList: foldableList,
  11444. foldableWithIndexList: foldableWithIndexList,
  11445. unfoldable1List: unfoldable1List,
  11446. unfoldableList: unfoldableList,
  11447. traversableList: traversableList,
  11448. traversableWithIndexList: traversableWithIndexList,
  11449. applyList: applyList,
  11450. applicativeList: applicativeList,
  11451. bindList: bindList,
  11452. monadList: monadList,
  11453. altList: altList,
  11454. plusList: plusList,
  11455. alternativeList: alternativeList,
  11456. monadZeroList: monadZeroList,
  11457. monadPlusList: monadPlusList,
  11458. extendList: extendList,
  11459. newtypeNonEmptyList: newtypeNonEmptyList,
  11460. eqNonEmptyList: eqNonEmptyList,
  11461. ordNonEmptyList: ordNonEmptyList,
  11462. showNonEmptyList: showNonEmptyList,
  11463. functorNonEmptyList: functorNonEmptyList,
  11464. applyNonEmptyList: applyNonEmptyList,
  11465. applicativeNonEmptyList: applicativeNonEmptyList,
  11466. bindNonEmptyList: bindNonEmptyList,
  11467. monadNonEmptyList: monadNonEmptyList,
  11468. altNonEmptyList: altNonEmptyList,
  11469. extendNonEmptyList: extendNonEmptyList,
  11470. comonadNonEmptyList: comonadNonEmptyList,
  11471. semigroupNonEmptyList: semigroupNonEmptyList,
  11472. foldableNonEmptyList: foldableNonEmptyList,
  11473. traversableNonEmptyList: traversableNonEmptyList,
  11474. foldable1NonEmptyList: foldable1NonEmptyList,
  11475. unfoldable1NonEmptyList: unfoldable1NonEmptyList,
  11476. functorWithIndexNonEmptyList: functorWithIndexNonEmptyList,
  11477. foldableWithIndexNonEmptyList: foldableWithIndexNonEmptyList,
  11478. traversableWithIndexNonEmptyList: traversableWithIndexNonEmptyList,
  11479. traversable1NonEmptyList: traversable1NonEmptyList
  11480. };
  11481. },{"../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/Foreign/foreign.js":[function(require,module,exports) {
  11482. "use strict";
  11483. 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); }
  11484. exports.unsafeToForeign = function (value) {
  11485. return value;
  11486. };
  11487. exports.unsafeFromForeign = function (value) {
  11488. return value;
  11489. };
  11490. exports.typeOf = function (value) {
  11491. return _typeof(value);
  11492. };
  11493. exports.tagOf = function (value) {
  11494. return Object.prototype.toString.call(value).slice(8, -1);
  11495. };
  11496. exports.isNull = function (value) {
  11497. return value === null;
  11498. };
  11499. exports.isUndefined = function (value) {
  11500. return value === undefined;
  11501. };
  11502. exports.isArray = Array.isArray || function (value) {
  11503. return Object.prototype.toString.call(value) === "[object Array]";
  11504. };
  11505. },{}],"../output/Data.Int/foreign.js":[function(require,module,exports) {
  11506. "use strict";
  11507. exports.fromNumberImpl = function (just) {
  11508. return function (nothing) {
  11509. return function (n) {
  11510. /* jshint bitwise: false */
  11511. return (n | 0) === n ? just(n) : nothing;
  11512. };
  11513. };
  11514. };
  11515. exports.toNumber = function (n) {
  11516. return n;
  11517. };
  11518. exports.fromStringAsImpl = function (just) {
  11519. return function (nothing) {
  11520. return function (radix) {
  11521. var digits;
  11522. if (radix < 11) {
  11523. digits = "[0-" + (radix - 1).toString() + "]";
  11524. } else if (radix === 11) {
  11525. digits = "[0-9a]";
  11526. } else {
  11527. digits = "[0-9a-" + String.fromCharCode(86 + radix) + "]";
  11528. }
  11529. var pattern = new RegExp("^[\\+\\-]?" + digits + "+$", "i");
  11530. return function (s) {
  11531. /* jshint bitwise: false */
  11532. if (pattern.test(s)) {
  11533. var i = parseInt(s, radix);
  11534. return (i | 0) === i ? just(i) : nothing;
  11535. } else {
  11536. return nothing;
  11537. }
  11538. };
  11539. };
  11540. };
  11541. };
  11542. exports.toStringAs = function (radix) {
  11543. return function (i) {
  11544. return i.toString(radix);
  11545. };
  11546. };
  11547. exports.quot = function (x) {
  11548. return function (y) {
  11549. /* jshint bitwise: false */
  11550. return x / y | 0;
  11551. };
  11552. };
  11553. exports.rem = function (x) {
  11554. return function (y) {
  11555. return x % y;
  11556. };
  11557. };
  11558. exports.pow = function (x) {
  11559. return function (y) {
  11560. /* jshint bitwise: false */
  11561. return Math.pow(x, y) | 0;
  11562. };
  11563. };
  11564. },{}],"../output/Data.DivisionRing/index.js":[function(require,module,exports) {
  11565. // Generated by purs version 0.13.6
  11566. "use strict";
  11567. var Data_Ring = require("../Data.Ring/index.js");
  11568. var Data_Semiring = require("../Data.Semiring/index.js");
  11569. var DivisionRing = function DivisionRing(Ring0, recip) {
  11570. this.Ring0 = Ring0;
  11571. this.recip = recip;
  11572. };
  11573. var recip = function recip(dict) {
  11574. return dict.recip;
  11575. };
  11576. var rightDiv = function rightDiv(dictDivisionRing) {
  11577. return function (a) {
  11578. return function (b) {
  11579. return Data_Semiring.mul(dictDivisionRing.Ring0().Semiring0())(a)(recip(dictDivisionRing)(b));
  11580. };
  11581. };
  11582. };
  11583. var leftDiv = function leftDiv(dictDivisionRing) {
  11584. return function (a) {
  11585. return function (b) {
  11586. return Data_Semiring.mul(dictDivisionRing.Ring0().Semiring0())(recip(dictDivisionRing)(b))(a);
  11587. };
  11588. };
  11589. };
  11590. var divisionringNumber = new DivisionRing(function () {
  11591. return Data_Ring.ringNumber;
  11592. }, function (x) {
  11593. return 1.0 / x;
  11594. });
  11595. module.exports = {
  11596. DivisionRing: DivisionRing,
  11597. recip: recip,
  11598. leftDiv: leftDiv,
  11599. rightDiv: rightDiv,
  11600. divisionringNumber: divisionringNumber
  11601. };
  11602. },{"../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) {
  11603. /* globals exports */
  11604. "use strict";
  11605. exports.nan = NaN;
  11606. exports.isNaN = isNaN;
  11607. exports.infinity = Infinity;
  11608. exports.isFinite = isFinite;
  11609. exports.readInt = function (radix) {
  11610. return function (n) {
  11611. return parseInt(n, radix);
  11612. };
  11613. };
  11614. exports.readFloat = parseFloat;
  11615. var formatNumber = function formatNumber(format) {
  11616. return function (fail, succ, digits, n) {
  11617. try {
  11618. return succ(n[format](digits));
  11619. } catch (e) {
  11620. return fail(e.message);
  11621. }
  11622. };
  11623. };
  11624. exports._toFixed = formatNumber("toFixed");
  11625. exports._toExponential = formatNumber("toExponential");
  11626. exports._toPrecision = formatNumber("toPrecision");
  11627. var encdecURI = function encdecURI(encdec) {
  11628. return function (fail, succ, s) {
  11629. try {
  11630. return succ(encdec(s));
  11631. } catch (e) {
  11632. return fail(e.message);
  11633. }
  11634. };
  11635. };
  11636. exports._decodeURI = encdecURI(decodeURI);
  11637. exports._encodeURI = encdecURI(encodeURI);
  11638. exports._decodeURIComponent = encdecURI(decodeURIComponent);
  11639. exports._encodeURIComponent = encdecURI(encodeURIComponent);
  11640. },{}],"../output/Global/index.js":[function(require,module,exports) {
  11641. // Generated by purs version 0.13.6
  11642. "use strict";
  11643. var $foreign = require("./foreign.js");
  11644. var Data_Function = require("../Data.Function/index.js");
  11645. var Data_Maybe = require("../Data.Maybe/index.js");
  11646. var toPrecision = function toPrecision(digits) {
  11647. return function (n) {
  11648. return $foreign["_toPrecision"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, digits, n);
  11649. };
  11650. };
  11651. var toFixed = function toFixed(digits) {
  11652. return function (n) {
  11653. return $foreign["_toFixed"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, digits, n);
  11654. };
  11655. };
  11656. var toExponential = function toExponential(digits) {
  11657. return function (n) {
  11658. return $foreign["_toExponential"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, digits, n);
  11659. };
  11660. };
  11661. var $$encodeURIComponent = function $$encodeURIComponent(s) {
  11662. return $foreign["_encodeURIComponent"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, s);
  11663. };
  11664. var $$encodeURI = function $$encodeURI(s) {
  11665. return $foreign["_encodeURI"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, s);
  11666. };
  11667. var $$decodeURIComponent = function $$decodeURIComponent(s) {
  11668. return $foreign["_decodeURIComponent"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, s);
  11669. };
  11670. var $$decodeURI = function $$decodeURI(s) {
  11671. return $foreign["_decodeURI"](Data_Function["const"](Data_Maybe.Nothing.value), Data_Maybe.Just.create, s);
  11672. };
  11673. module.exports = {
  11674. toFixed: toFixed,
  11675. toExponential: toExponential,
  11676. toPrecision: toPrecision,
  11677. "decodeURI": $$decodeURI,
  11678. "encodeURI": $$encodeURI,
  11679. "decodeURIComponent": $$decodeURIComponent,
  11680. "encodeURIComponent": $$encodeURIComponent,
  11681. nan: $foreign.nan,
  11682. "isNaN": $foreign["isNaN"],
  11683. infinity: $foreign.infinity,
  11684. "isFinite": $foreign["isFinite"],
  11685. readInt: $foreign.readInt,
  11686. readFloat: $foreign.readFloat
  11687. };
  11688. },{"./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) {
  11689. "use strict"; // module Math
  11690. exports.abs = Math.abs;
  11691. exports.acos = Math.acos;
  11692. exports.asin = Math.asin;
  11693. exports.atan = Math.atan;
  11694. exports.atan2 = function (y) {
  11695. return function (x) {
  11696. return Math.atan2(y, x);
  11697. };
  11698. };
  11699. exports.ceil = Math.ceil;
  11700. exports.cos = Math.cos;
  11701. exports.exp = Math.exp;
  11702. exports.floor = Math.floor;
  11703. exports.trunc = Math.trunc || function (n) {
  11704. return n < 0 ? Math.ceil(n) : Math.floor(n);
  11705. };
  11706. exports.log = Math.log;
  11707. exports.max = function (n1) {
  11708. return function (n2) {
  11709. return Math.max(n1, n2);
  11710. };
  11711. };
  11712. exports.min = function (n1) {
  11713. return function (n2) {
  11714. return Math.min(n1, n2);
  11715. };
  11716. };
  11717. exports.pow = function (n) {
  11718. return function (p) {
  11719. return Math.pow(n, p);
  11720. };
  11721. };
  11722. exports.remainder = function (n) {
  11723. return function (m) {
  11724. return n % m;
  11725. };
  11726. };
  11727. exports.round = Math.round;
  11728. exports.sin = Math.sin;
  11729. exports.sqrt = Math.sqrt;
  11730. exports.tan = Math.tan;
  11731. exports.e = Math.E;
  11732. exports.ln2 = Math.LN2;
  11733. exports.ln10 = Math.LN10;
  11734. exports.log2e = Math.LOG2E;
  11735. exports.log10e = Math.LOG10E;
  11736. exports.pi = Math.PI;
  11737. exports.tau = 2 * Math.PI;
  11738. exports.sqrt1_2 = Math.SQRT1_2;
  11739. exports.sqrt2 = Math.SQRT2;
  11740. },{}],"../output/Math/index.js":[function(require,module,exports) {
  11741. // Generated by purs version 0.13.6
  11742. "use strict";
  11743. var $foreign = require("./foreign.js");
  11744. module.exports = {
  11745. abs: $foreign.abs,
  11746. acos: $foreign.acos,
  11747. asin: $foreign.asin,
  11748. atan: $foreign.atan,
  11749. atan2: $foreign.atan2,
  11750. ceil: $foreign.ceil,
  11751. cos: $foreign.cos,
  11752. exp: $foreign.exp,
  11753. floor: $foreign.floor,
  11754. log: $foreign.log,
  11755. max: $foreign.max,
  11756. min: $foreign.min,
  11757. pow: $foreign.pow,
  11758. round: $foreign.round,
  11759. sin: $foreign.sin,
  11760. sqrt: $foreign.sqrt,
  11761. tan: $foreign.tan,
  11762. trunc: $foreign.trunc,
  11763. remainder: $foreign.remainder,
  11764. e: $foreign.e,
  11765. ln2: $foreign.ln2,
  11766. ln10: $foreign.ln10,
  11767. log2e: $foreign.log2e,
  11768. log10e: $foreign.log10e,
  11769. pi: $foreign.pi,
  11770. tau: $foreign.tau,
  11771. sqrt1_2: $foreign.sqrt1_2,
  11772. sqrt2: $foreign.sqrt2
  11773. };
  11774. },{"./foreign.js":"../output/Math/foreign.js"}],"../output/Data.Int/index.js":[function(require,module,exports) {
  11775. // Generated by purs version 0.13.6
  11776. "use strict";
  11777. var $foreign = require("./foreign.js");
  11778. var Control_Category = require("../Control.Category/index.js");
  11779. var Data_Boolean = require("../Data.Boolean/index.js");
  11780. var Data_Bounded = require("../Data.Bounded/index.js");
  11781. var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
  11782. var Data_DivisionRing = require("../Data.DivisionRing/index.js");
  11783. var Data_Eq = require("../Data.Eq/index.js");
  11784. var Data_EuclideanRing = require("../Data.EuclideanRing/index.js");
  11785. var Data_Maybe = require("../Data.Maybe/index.js");
  11786. var Data_Ord = require("../Data.Ord/index.js");
  11787. var Data_Ordering = require("../Data.Ordering/index.js");
  11788. var Data_Ring = require("../Data.Ring/index.js");
  11789. var Data_Semiring = require("../Data.Semiring/index.js");
  11790. var Data_Show = require("../Data.Show/index.js");
  11791. var Global = require("../Global/index.js");
  11792. var $$Math = require("../Math/index.js");
  11793. var Radix = function Radix(x) {
  11794. return x;
  11795. };
  11796. var Even = function () {
  11797. function Even() {}
  11798. ;
  11799. Even.value = new Even();
  11800. return Even;
  11801. }();
  11802. var Odd = function () {
  11803. function Odd() {}
  11804. ;
  11805. Odd.value = new Odd();
  11806. return Odd;
  11807. }();
  11808. var showParity = new Data_Show.Show(function (v) {
  11809. if (v instanceof Even) {
  11810. return "Even";
  11811. }
  11812. ;
  11813. if (v instanceof Odd) {
  11814. return "Odd";
  11815. }
  11816. ;
  11817. throw new Error("Failed pattern match at Data.Int (line 112, column 1 - line 114, column 19): " + [v.constructor.name]);
  11818. });
  11819. var radix = function radix(n) {
  11820. if (n >= 2 && n <= 36) {
  11821. return new Data_Maybe.Just(n);
  11822. }
  11823. ;
  11824. if (Data_Boolean.otherwise) {
  11825. return Data_Maybe.Nothing.value;
  11826. }
  11827. ;
  11828. throw new Error("Failed pattern match at Data.Int (line 193, column 1 - line 193, column 28): " + [n.constructor.name]);
  11829. };
  11830. var odd = function odd(x) {
  11831. return (x & 1) !== 0;
  11832. };
  11833. var octal = 8;
  11834. var hexadecimal = 16;
  11835. var fromStringAs = $foreign.fromStringAsImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  11836. var fromString = fromStringAs(10);
  11837. var fromNumber = $foreign.fromNumberImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  11838. var unsafeClamp = function unsafeClamp(x) {
  11839. if (x === Global.infinity) {
  11840. return 0;
  11841. }
  11842. ;
  11843. if (x === -Global.infinity) {
  11844. return 0;
  11845. }
  11846. ;
  11847. if (x >= $foreign.toNumber(Data_Bounded.top(Data_Bounded.boundedInt))) {
  11848. return Data_Bounded.top(Data_Bounded.boundedInt);
  11849. }
  11850. ;
  11851. if (x <= $foreign.toNumber(Data_Bounded.bottom(Data_Bounded.boundedInt))) {
  11852. return Data_Bounded.bottom(Data_Bounded.boundedInt);
  11853. }
  11854. ;
  11855. if (Data_Boolean.otherwise) {
  11856. return Data_Maybe.fromMaybe(0)(fromNumber(x));
  11857. }
  11858. ;
  11859. throw new Error("Failed pattern match at Data.Int (line 66, column 1 - line 66, column 29): " + [x.constructor.name]);
  11860. };
  11861. var round = function round($23) {
  11862. return unsafeClamp($$Math.round($23));
  11863. };
  11864. var floor = function floor($24) {
  11865. return unsafeClamp($$Math.floor($24));
  11866. };
  11867. var even = function even(x) {
  11868. return (x & 1) === 0;
  11869. };
  11870. var parity = function parity(n) {
  11871. var $14 = even(n);
  11872. if ($14) {
  11873. return Even.value;
  11874. }
  11875. ;
  11876. return Odd.value;
  11877. };
  11878. var eqParity = new Data_Eq.Eq(function (x) {
  11879. return function (y) {
  11880. if (x instanceof Even && y instanceof Even) {
  11881. return true;
  11882. }
  11883. ;
  11884. if (x instanceof Odd && y instanceof Odd) {
  11885. return true;
  11886. }
  11887. ;
  11888. return false;
  11889. };
  11890. });
  11891. var ordParity = new Data_Ord.Ord(function () {
  11892. return eqParity;
  11893. }, function (x) {
  11894. return function (y) {
  11895. if (x instanceof Even && y instanceof Even) {
  11896. return Data_Ordering.EQ.value;
  11897. }
  11898. ;
  11899. if (x instanceof Even) {
  11900. return Data_Ordering.LT.value;
  11901. }
  11902. ;
  11903. if (y instanceof Even) {
  11904. return Data_Ordering.GT.value;
  11905. }
  11906. ;
  11907. if (x instanceof Odd && y instanceof Odd) {
  11908. return Data_Ordering.EQ.value;
  11909. }
  11910. ;
  11911. throw new Error("Failed pattern match at Data.Int (line 110, column 1 - line 110, column 40): " + [x.constructor.name, y.constructor.name]);
  11912. };
  11913. });
  11914. var semiringParity = new Data_Semiring.Semiring(function (x) {
  11915. return function (y) {
  11916. var $19 = Data_Eq.eq(eqParity)(x)(y);
  11917. if ($19) {
  11918. return Even.value;
  11919. }
  11920. ;
  11921. return Odd.value;
  11922. };
  11923. }, function (v) {
  11924. return function (v1) {
  11925. if (v instanceof Odd && v1 instanceof Odd) {
  11926. return Odd.value;
  11927. }
  11928. ;
  11929. return Even.value;
  11930. };
  11931. }, Odd.value, Even.value);
  11932. var ringParity = new Data_Ring.Ring(function () {
  11933. return semiringParity;
  11934. }, Data_Semiring.add(semiringParity));
  11935. var divisionRingParity = new Data_DivisionRing.DivisionRing(function () {
  11936. return ringParity;
  11937. }, Control_Category.identity(Control_Category.categoryFn));
  11938. var decimal = 10;
  11939. var commutativeRingParity = new Data_CommutativeRing.CommutativeRing(function () {
  11940. return ringParity;
  11941. });
  11942. var euclideanRingParity = new Data_EuclideanRing.EuclideanRing(function () {
  11943. return commutativeRingParity;
  11944. }, function (v) {
  11945. if (v instanceof Even) {
  11946. return 0;
  11947. }
  11948. ;
  11949. if (v instanceof Odd) {
  11950. return 1;
  11951. }
  11952. ;
  11953. throw new Error("Failed pattern match at Data.Int (line 132, column 1 - line 136, column 17): " + [v.constructor.name]);
  11954. }, function (x) {
  11955. return function (v) {
  11956. return x;
  11957. };
  11958. }, function (v) {
  11959. return function (v1) {
  11960. return Even.value;
  11961. };
  11962. });
  11963. var ceil = function ceil($25) {
  11964. return unsafeClamp($$Math.ceil($25));
  11965. };
  11966. var boundedParity = new Data_Bounded.Bounded(function () {
  11967. return ordParity;
  11968. }, Even.value, Odd.value);
  11969. var binary = 2;
  11970. var base36 = 36;
  11971. module.exports = {
  11972. fromNumber: fromNumber,
  11973. ceil: ceil,
  11974. floor: floor,
  11975. round: round,
  11976. fromString: fromString,
  11977. radix: radix,
  11978. binary: binary,
  11979. octal: octal,
  11980. decimal: decimal,
  11981. hexadecimal: hexadecimal,
  11982. base36: base36,
  11983. fromStringAs: fromStringAs,
  11984. Even: Even,
  11985. Odd: Odd,
  11986. parity: parity,
  11987. even: even,
  11988. odd: odd,
  11989. eqParity: eqParity,
  11990. ordParity: ordParity,
  11991. showParity: showParity,
  11992. boundedParity: boundedParity,
  11993. semiringParity: semiringParity,
  11994. ringParity: ringParity,
  11995. commutativeRingParity: commutativeRingParity,
  11996. euclideanRingParity: euclideanRingParity,
  11997. divisionRingParity: divisionRingParity,
  11998. toNumber: $foreign.toNumber,
  11999. toStringAs: $foreign.toStringAs,
  12000. quot: $foreign.quot,
  12001. rem: $foreign.rem,
  12002. pow: $foreign.pow
  12003. };
  12004. },{"./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) {
  12005. // Generated by purs version 0.13.6
  12006. "use strict";
  12007. var Control_Alt = require("../Control.Alt/index.js");
  12008. var Control_Applicative = require("../Control.Applicative/index.js");
  12009. var Control_Apply = require("../Control.Apply/index.js");
  12010. var Control_Bind = require("../Control.Bind/index.js");
  12011. var Control_Category = require("../Control.Category/index.js");
  12012. var Control_Lazy = require("../Control.Lazy/index.js");
  12013. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  12014. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  12015. var Data_Boolean = require("../Data.Boolean/index.js");
  12016. var Data_Eq = require("../Data.Eq/index.js");
  12017. var Data_Foldable = require("../Data.Foldable/index.js");
  12018. var Data_Function = require("../Data.Function/index.js");
  12019. var Data_Functor = require("../Data.Functor/index.js");
  12020. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  12021. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  12022. var Data_List_Types = require("../Data.List.Types/index.js");
  12023. var Data_Maybe = require("../Data.Maybe/index.js");
  12024. var Data_Newtype = require("../Data.Newtype/index.js");
  12025. var Data_NonEmpty = require("../Data.NonEmpty/index.js");
  12026. var Data_Ord = require("../Data.Ord/index.js");
  12027. var Data_Ordering = require("../Data.Ordering/index.js");
  12028. var Data_Semigroup = require("../Data.Semigroup/index.js");
  12029. var Data_Show = require("../Data.Show/index.js");
  12030. var Data_Traversable = require("../Data.Traversable/index.js");
  12031. var Data_Tuple = require("../Data.Tuple/index.js");
  12032. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  12033. var Data_Unit = require("../Data.Unit/index.js");
  12034. var Pattern = function Pattern(x) {
  12035. return x;
  12036. };
  12037. var updateAt = function updateAt(v) {
  12038. return function (v1) {
  12039. return function (v2) {
  12040. if (v === 0 && v2 instanceof Data_List_Types.Cons) {
  12041. return new Data_Maybe.Just(new Data_List_Types.Cons(v1, v2.value1));
  12042. }
  12043. ;
  12044. if (v2 instanceof Data_List_Types.Cons) {
  12045. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v3) {
  12046. return new Data_List_Types.Cons(v2.value0, v3);
  12047. })(updateAt(v - 1 | 0)(v1)(v2.value1));
  12048. }
  12049. ;
  12050. return Data_Maybe.Nothing.value;
  12051. };
  12052. };
  12053. };
  12054. var unzip = Data_Foldable.foldr(Data_List_Types.foldableList)(function (v) {
  12055. return function (v1) {
  12056. return new Data_Tuple.Tuple(new Data_List_Types.Cons(v.value0, v1.value0), new Data_List_Types.Cons(v.value1, v1.value1));
  12057. };
  12058. })(new Data_Tuple.Tuple(Data_List_Types.Nil.value, Data_List_Types.Nil.value));
  12059. var uncons = function uncons(v) {
  12060. if (v instanceof Data_List_Types.Nil) {
  12061. return Data_Maybe.Nothing.value;
  12062. }
  12063. ;
  12064. if (v instanceof Data_List_Types.Cons) {
  12065. return new Data_Maybe.Just({
  12066. head: v.value0,
  12067. tail: v.value1
  12068. });
  12069. }
  12070. ;
  12071. throw new Error("Failed pattern match at Data.List (line 259, column 1 - line 259, column 66): " + [v.constructor.name]);
  12072. };
  12073. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  12074. return Data_Unfoldable.unfoldr(dictUnfoldable)(function (xs) {
  12075. return Data_Functor.map(Data_Maybe.functorMaybe)(function (rec) {
  12076. return new Data_Tuple.Tuple(rec.head, rec.tail);
  12077. })(uncons(xs));
  12078. });
  12079. };
  12080. var tail = function tail(v) {
  12081. if (v instanceof Data_List_Types.Nil) {
  12082. return Data_Maybe.Nothing.value;
  12083. }
  12084. ;
  12085. if (v instanceof Data_List_Types.Cons) {
  12086. return new Data_Maybe.Just(v.value1);
  12087. }
  12088. ;
  12089. throw new Error("Failed pattern match at Data.List (line 245, column 1 - line 245, column 43): " + [v.constructor.name]);
  12090. };
  12091. var stripPrefix = function stripPrefix(dictEq) {
  12092. return function (v) {
  12093. return function (s) {
  12094. var go = function go(prefix) {
  12095. return function (input) {
  12096. if (prefix instanceof Data_List_Types.Cons && input instanceof Data_List_Types.Cons && Data_Eq.eq(dictEq)(prefix.value0)(input.value0)) {
  12097. return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Loop({
  12098. a: prefix.value1,
  12099. b: input.value1
  12100. }));
  12101. }
  12102. ;
  12103. if (prefix instanceof Data_List_Types.Nil) {
  12104. return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Done(input));
  12105. }
  12106. ;
  12107. return Data_Maybe.Nothing.value;
  12108. };
  12109. };
  12110. return Control_Monad_Rec_Class.tailRecM2(Control_Monad_Rec_Class.monadRecMaybe)(go)(v)(s);
  12111. };
  12112. };
  12113. };
  12114. var span = function span(v) {
  12115. return function (v1) {
  12116. if (v1 instanceof Data_List_Types.Cons && v(v1.value0)) {
  12117. var v2 = span(v)(v1.value1);
  12118. return {
  12119. init: new Data_List_Types.Cons(v1.value0, v2.init),
  12120. rest: v2.rest
  12121. };
  12122. }
  12123. ;
  12124. return {
  12125. init: Data_List_Types.Nil.value,
  12126. rest: v1
  12127. };
  12128. };
  12129. };
  12130. var snoc = function snoc(xs) {
  12131. return function (x) {
  12132. 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);
  12133. };
  12134. };
  12135. var singleton = function singleton(a) {
  12136. return new Data_List_Types.Cons(a, Data_List_Types.Nil.value);
  12137. };
  12138. var sortBy = function sortBy(cmp) {
  12139. var merge = function merge(v) {
  12140. return function (v1) {
  12141. if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) {
  12142. if (Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v1.value0))(Data_Ordering.GT.value)) {
  12143. return new Data_List_Types.Cons(v1.value0, merge(v)(v1.value1));
  12144. }
  12145. ;
  12146. if (Data_Boolean.otherwise) {
  12147. return new Data_List_Types.Cons(v.value0, merge(v.value1)(v1));
  12148. }
  12149. ;
  12150. }
  12151. ;
  12152. if (v instanceof Data_List_Types.Nil) {
  12153. return v1;
  12154. }
  12155. ;
  12156. if (v1 instanceof Data_List_Types.Nil) {
  12157. return v;
  12158. }
  12159. ;
  12160. throw new Error("Failed pattern match at Data.List (line 473, column 3 - line 473, column 38): " + [v.constructor.name, v1.constructor.name]);
  12161. };
  12162. };
  12163. var mergePairs = function mergePairs(v) {
  12164. if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Cons) {
  12165. return new Data_List_Types.Cons(merge(v.value0)(v.value1.value0), mergePairs(v.value1.value1));
  12166. }
  12167. ;
  12168. return v;
  12169. };
  12170. var mergeAll = function mergeAll($copy_v) {
  12171. var $tco_done = false;
  12172. var $tco_result;
  12173. function $tco_loop(v) {
  12174. if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Nil) {
  12175. $tco_done = true;
  12176. return v.value0;
  12177. }
  12178. ;
  12179. $copy_v = mergePairs(v);
  12180. return;
  12181. }
  12182. ;
  12183. while (!$tco_done) {
  12184. $tco_result = $tco_loop($copy_v);
  12185. }
  12186. ;
  12187. return $tco_result;
  12188. };
  12189. var sequences = function sequences(v) {
  12190. if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Cons) {
  12191. if (Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(v.value0)(v.value1.value0))(Data_Ordering.GT.value)) {
  12192. return descending(v.value1.value0)(singleton(v.value0))(v.value1.value1);
  12193. }
  12194. ;
  12195. if (Data_Boolean.otherwise) {
  12196. return ascending(v.value1.value0)(function (v1) {
  12197. return new Data_List_Types.Cons(v.value0, v1);
  12198. })(v.value1.value1);
  12199. }
  12200. ;
  12201. }
  12202. ;
  12203. return singleton(v);
  12204. };
  12205. var descending = function descending($copy_a) {
  12206. return function ($copy_as) {
  12207. return function ($copy_v) {
  12208. var $tco_var_a = $copy_a;
  12209. var $tco_var_as = $copy_as;
  12210. var $tco_done = false;
  12211. var $tco_result;
  12212. function $tco_loop(a, as, v) {
  12213. if (v instanceof Data_List_Types.Cons && Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(a)(v.value0))(Data_Ordering.GT.value)) {
  12214. $tco_var_a = v.value0;
  12215. $tco_var_as = new Data_List_Types.Cons(a, as);
  12216. $copy_v = v.value1;
  12217. return;
  12218. }
  12219. ;
  12220. $tco_done = true;
  12221. return new Data_List_Types.Cons(new Data_List_Types.Cons(a, as), sequences(v));
  12222. }
  12223. ;
  12224. while (!$tco_done) {
  12225. $tco_result = $tco_loop($tco_var_a, $tco_var_as, $copy_v);
  12226. }
  12227. ;
  12228. return $tco_result;
  12229. };
  12230. };
  12231. };
  12232. var ascending = function ascending($copy_a) {
  12233. return function ($copy_as) {
  12234. return function ($copy_v) {
  12235. var $tco_var_a = $copy_a;
  12236. var $tco_var_as = $copy_as;
  12237. var $tco_done = false;
  12238. var $tco_result;
  12239. function $tco_loop(a, as, v) {
  12240. if (v instanceof Data_List_Types.Cons && Data_Eq.notEq(Data_Ordering.eqOrdering)(cmp(a)(v.value0))(Data_Ordering.GT.value)) {
  12241. $tco_var_a = v.value0;
  12242. $tco_var_as = function $tco_var_as(ys) {
  12243. return as(new Data_List_Types.Cons(a, ys));
  12244. };
  12245. $copy_v = v.value1;
  12246. return;
  12247. }
  12248. ;
  12249. $tco_done = true;
  12250. return new Data_List_Types.Cons(as(singleton(a)), sequences(v));
  12251. }
  12252. ;
  12253. while (!$tco_done) {
  12254. $tco_result = $tco_loop($tco_var_a, $tco_var_as, $copy_v);
  12255. }
  12256. ;
  12257. return $tco_result;
  12258. };
  12259. };
  12260. };
  12261. return function ($331) {
  12262. return mergeAll(sequences($331));
  12263. };
  12264. };
  12265. var sort = function sort(dictOrd) {
  12266. return function (xs) {
  12267. return sortBy(Data_Ord.compare(dictOrd))(xs);
  12268. };
  12269. };
  12270. var tails = function tails(v) {
  12271. if (v instanceof Data_List_Types.Nil) {
  12272. return singleton(Data_List_Types.Nil.value);
  12273. }
  12274. ;
  12275. if (v instanceof Data_List_Types.Cons) {
  12276. return new Data_List_Types.Cons(v, tails(v.value1));
  12277. }
  12278. ;
  12279. throw new Error("Failed pattern match at Data.List (line 626, column 1 - line 626, column 43): " + [v.constructor.name]);
  12280. };
  12281. var showPattern = function showPattern(dictShow) {
  12282. return new Data_Show.Show(function (v) {
  12283. return "(Pattern " + (Data_Show.show(Data_List_Types.showList(dictShow))(v) + ")");
  12284. });
  12285. };
  12286. var reverse = function () {
  12287. var go = function go($copy_acc) {
  12288. return function ($copy_v) {
  12289. var $tco_var_acc = $copy_acc;
  12290. var $tco_done = false;
  12291. var $tco_result;
  12292. function $tco_loop(acc, v) {
  12293. if (v instanceof Data_List_Types.Nil) {
  12294. $tco_done = true;
  12295. return acc;
  12296. }
  12297. ;
  12298. if (v instanceof Data_List_Types.Cons) {
  12299. $tco_var_acc = new Data_List_Types.Cons(v.value0, acc);
  12300. $copy_v = v.value1;
  12301. return;
  12302. }
  12303. ;
  12304. throw new Error("Failed pattern match at Data.List (line 368, column 3 - line 368, column 19): " + [acc.constructor.name, v.constructor.name]);
  12305. }
  12306. ;
  12307. while (!$tco_done) {
  12308. $tco_result = $tco_loop($tco_var_acc, $copy_v);
  12309. }
  12310. ;
  12311. return $tco_result;
  12312. };
  12313. };
  12314. return go(Data_List_Types.Nil.value);
  12315. }();
  12316. var take = function () {
  12317. var go = function go($copy_acc) {
  12318. return function ($copy_v) {
  12319. return function ($copy_v1) {
  12320. var $tco_var_acc = $copy_acc;
  12321. var $tco_var_v = $copy_v;
  12322. var $tco_done = false;
  12323. var $tco_result;
  12324. function $tco_loop(acc, v, v1) {
  12325. if (v < 1) {
  12326. $tco_done = true;
  12327. return reverse(acc);
  12328. }
  12329. ;
  12330. if (v1 instanceof Data_List_Types.Nil) {
  12331. $tco_done = true;
  12332. return reverse(acc);
  12333. }
  12334. ;
  12335. if (v1 instanceof Data_List_Types.Cons) {
  12336. $tco_var_acc = new Data_List_Types.Cons(v1.value0, acc);
  12337. $tco_var_v = v - 1 | 0;
  12338. $copy_v1 = v1.value1;
  12339. return;
  12340. }
  12341. ;
  12342. 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]);
  12343. }
  12344. ;
  12345. while (!$tco_done) {
  12346. $tco_result = $tco_loop($tco_var_acc, $tco_var_v, $copy_v1);
  12347. }
  12348. ;
  12349. return $tco_result;
  12350. };
  12351. };
  12352. };
  12353. return go(Data_List_Types.Nil.value);
  12354. }();
  12355. var takeWhile = function takeWhile(p) {
  12356. var go = function go($copy_acc) {
  12357. return function ($copy_v) {
  12358. var $tco_var_acc = $copy_acc;
  12359. var $tco_done = false;
  12360. var $tco_result;
  12361. function $tco_loop(acc, v) {
  12362. if (v instanceof Data_List_Types.Cons && p(v.value0)) {
  12363. $tco_var_acc = new Data_List_Types.Cons(v.value0, acc);
  12364. $copy_v = v.value1;
  12365. return;
  12366. }
  12367. ;
  12368. $tco_done = true;
  12369. return reverse(acc);
  12370. }
  12371. ;
  12372. while (!$tco_done) {
  12373. $tco_result = $tco_loop($tco_var_acc, $copy_v);
  12374. }
  12375. ;
  12376. return $tco_result;
  12377. };
  12378. };
  12379. return go(Data_List_Types.Nil.value);
  12380. };
  12381. var unsnoc = function unsnoc(lst) {
  12382. var go = function go($copy_v) {
  12383. return function ($copy_acc) {
  12384. var $tco_var_v = $copy_v;
  12385. var $tco_done = false;
  12386. var $tco_result;
  12387. function $tco_loop(v, acc) {
  12388. if (v instanceof Data_List_Types.Nil) {
  12389. $tco_done = true;
  12390. return Data_Maybe.Nothing.value;
  12391. }
  12392. ;
  12393. if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Nil) {
  12394. $tco_done = true;
  12395. return new Data_Maybe.Just({
  12396. revInit: acc,
  12397. last: v.value0
  12398. });
  12399. }
  12400. ;
  12401. if (v instanceof Data_List_Types.Cons) {
  12402. $tco_var_v = v.value1;
  12403. $copy_acc = new Data_List_Types.Cons(v.value0, acc);
  12404. return;
  12405. }
  12406. ;
  12407. throw new Error("Failed pattern match at Data.List (line 270, column 3 - line 270, column 23): " + [v.constructor.name, acc.constructor.name]);
  12408. }
  12409. ;
  12410. while (!$tco_done) {
  12411. $tco_result = $tco_loop($tco_var_v, $copy_acc);
  12412. }
  12413. ;
  12414. return $tco_result;
  12415. };
  12416. };
  12417. return Data_Functor.map(Data_Maybe.functorMaybe)(function (h) {
  12418. return {
  12419. init: reverse(h.revInit),
  12420. last: h.last
  12421. };
  12422. })(go(lst)(Data_List_Types.Nil.value));
  12423. };
  12424. var zipWith = function zipWith(f) {
  12425. return function (xs) {
  12426. return function (ys) {
  12427. var go = function go($copy_v) {
  12428. return function ($copy_v1) {
  12429. return function ($copy_acc) {
  12430. var $tco_var_v = $copy_v;
  12431. var $tco_var_v1 = $copy_v1;
  12432. var $tco_done = false;
  12433. var $tco_result;
  12434. function $tco_loop(v, v1, acc) {
  12435. if (v instanceof Data_List_Types.Nil) {
  12436. $tco_done = true;
  12437. return acc;
  12438. }
  12439. ;
  12440. if (v1 instanceof Data_List_Types.Nil) {
  12441. $tco_done = true;
  12442. return acc;
  12443. }
  12444. ;
  12445. if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) {
  12446. $tco_var_v = v.value1;
  12447. $tco_var_v1 = v1.value1;
  12448. $copy_acc = new Data_List_Types.Cons(f(v.value0)(v1.value0), acc);
  12449. return;
  12450. }
  12451. ;
  12452. 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]);
  12453. }
  12454. ;
  12455. while (!$tco_done) {
  12456. $tco_result = $tco_loop($tco_var_v, $tco_var_v1, $copy_acc);
  12457. }
  12458. ;
  12459. return $tco_result;
  12460. };
  12461. };
  12462. };
  12463. return reverse(go(xs)(ys)(Data_List_Types.Nil.value));
  12464. };
  12465. };
  12466. };
  12467. var zip = zipWith(Data_Tuple.Tuple.create);
  12468. var zipWithA = function zipWithA(dictApplicative) {
  12469. return function (f) {
  12470. return function (xs) {
  12471. return function (ys) {
  12472. return Data_Traversable.sequence(Data_List_Types.traversableList)(dictApplicative)(zipWith(f)(xs)(ys));
  12473. };
  12474. };
  12475. };
  12476. };
  12477. var range = function range(start) {
  12478. return function (end) {
  12479. if (start === end) {
  12480. return singleton(start);
  12481. }
  12482. ;
  12483. if (Data_Boolean.otherwise) {
  12484. var go = function go($copy_s) {
  12485. return function ($copy_e) {
  12486. return function ($copy_step) {
  12487. return function ($copy_rest) {
  12488. var $tco_var_s = $copy_s;
  12489. var $tco_var_e = $copy_e;
  12490. var $tco_var_step = $copy_step;
  12491. var $tco_done = false;
  12492. var $tco_result;
  12493. function $tco_loop(s, e, step, rest) {
  12494. if (s === e) {
  12495. $tco_done = true;
  12496. return new Data_List_Types.Cons(s, rest);
  12497. }
  12498. ;
  12499. if (Data_Boolean.otherwise) {
  12500. $tco_var_s = s + step | 0;
  12501. $tco_var_e = e;
  12502. $tco_var_step = step;
  12503. $copy_rest = new Data_List_Types.Cons(s, rest);
  12504. return;
  12505. }
  12506. ;
  12507. 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]);
  12508. }
  12509. ;
  12510. while (!$tco_done) {
  12511. $tco_result = $tco_loop($tco_var_s, $tco_var_e, $tco_var_step, $copy_rest);
  12512. }
  12513. ;
  12514. return $tco_result;
  12515. };
  12516. };
  12517. };
  12518. };
  12519. return go(end)(start)(function () {
  12520. var $220 = start > end;
  12521. if ($220) {
  12522. return 1;
  12523. }
  12524. ;
  12525. return -1 | 0;
  12526. }())(Data_List_Types.Nil.value);
  12527. }
  12528. ;
  12529. throw new Error("Failed pattern match at Data.List (line 144, column 1 - line 144, column 32): " + [start.constructor.name, end.constructor.name]);
  12530. };
  12531. };
  12532. var partition = function partition(p) {
  12533. return function (xs) {
  12534. var select = function select(x) {
  12535. return function (v) {
  12536. var $223 = p(x);
  12537. if ($223) {
  12538. return {
  12539. no: v.no,
  12540. yes: new Data_List_Types.Cons(x, v.yes)
  12541. };
  12542. }
  12543. ;
  12544. return {
  12545. no: new Data_List_Types.Cons(x, v.no),
  12546. yes: v.yes
  12547. };
  12548. };
  12549. };
  12550. return Data_Foldable.foldr(Data_List_Types.foldableList)(select)({
  12551. no: Data_List_Types.Nil.value,
  12552. yes: Data_List_Types.Nil.value
  12553. })(xs);
  12554. };
  12555. };
  12556. var $$null = function $$null(v) {
  12557. if (v instanceof Data_List_Types.Nil) {
  12558. return true;
  12559. }
  12560. ;
  12561. return false;
  12562. };
  12563. var newtypePattern = new Data_Newtype.Newtype(function (n) {
  12564. return n;
  12565. }, Pattern);
  12566. var mapWithIndex = Data_FunctorWithIndex.mapWithIndex(Data_List_Types.functorWithIndexList);
  12567. var mapMaybe = function mapMaybe(f) {
  12568. var go = function go($copy_acc) {
  12569. return function ($copy_v) {
  12570. var $tco_var_acc = $copy_acc;
  12571. var $tco_done = false;
  12572. var $tco_result;
  12573. function $tco_loop(acc, v) {
  12574. if (v instanceof Data_List_Types.Nil) {
  12575. $tco_done = true;
  12576. return reverse(acc);
  12577. }
  12578. ;
  12579. if (v instanceof Data_List_Types.Cons) {
  12580. var v1 = f(v.value0);
  12581. if (v1 instanceof Data_Maybe.Nothing) {
  12582. $tco_var_acc = acc;
  12583. $copy_v = v.value1;
  12584. return;
  12585. }
  12586. ;
  12587. if (v1 instanceof Data_Maybe.Just) {
  12588. $tco_var_acc = new Data_List_Types.Cons(v1.value0, acc);
  12589. $copy_v = v.value1;
  12590. return;
  12591. }
  12592. ;
  12593. throw new Error("Failed pattern match at Data.List (line 419, column 5 - line 421, column 32): " + [v1.constructor.name]);
  12594. }
  12595. ;
  12596. throw new Error("Failed pattern match at Data.List (line 417, column 3 - line 417, column 27): " + [acc.constructor.name, v.constructor.name]);
  12597. }
  12598. ;
  12599. while (!$tco_done) {
  12600. $tco_result = $tco_loop($tco_var_acc, $copy_v);
  12601. }
  12602. ;
  12603. return $tco_result;
  12604. };
  12605. };
  12606. return go(Data_List_Types.Nil.value);
  12607. };
  12608. var manyRec = function manyRec(dictMonadRec) {
  12609. return function (dictAlternative) {
  12610. return function (p) {
  12611. var go = function go(acc) {
  12612. 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) {
  12613. return Control_Applicative.pure(dictAlternative.Applicative0())(Data_Bifunctor.bimap(Control_Monad_Rec_Class.bifunctorStep)(function (v) {
  12614. return new Data_List_Types.Cons(v, acc);
  12615. })(function (v) {
  12616. return reverse(acc);
  12617. })(aa));
  12618. });
  12619. };
  12620. return Control_Monad_Rec_Class.tailRecM(dictMonadRec)(go)(Data_List_Types.Nil.value);
  12621. };
  12622. };
  12623. };
  12624. var someRec = function someRec(dictMonadRec) {
  12625. return function (dictAlternative) {
  12626. return function (v) {
  12627. return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())(Data_List_Types.Cons.create)(v))(manyRec(dictMonadRec)(dictAlternative)(v));
  12628. };
  12629. };
  12630. };
  12631. var some = function some(dictAlternative) {
  12632. return function (dictLazy) {
  12633. return function (v) {
  12634. 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) {
  12635. return many(dictAlternative)(dictLazy)(v);
  12636. }));
  12637. };
  12638. };
  12639. };
  12640. var many = function many(dictAlternative) {
  12641. return function (dictLazy) {
  12642. return function (v) {
  12643. return Control_Alt.alt(dictAlternative.Plus1().Alt0())(some(dictAlternative)(dictLazy)(v))(Control_Applicative.pure(dictAlternative.Applicative0())(Data_List_Types.Nil.value));
  12644. };
  12645. };
  12646. };
  12647. var length = Data_Foldable.foldl(Data_List_Types.foldableList)(function (acc) {
  12648. return function (v) {
  12649. return acc + 1 | 0;
  12650. };
  12651. })(0);
  12652. var last = function last($copy_v) {
  12653. var $tco_done = false;
  12654. var $tco_result;
  12655. function $tco_loop(v) {
  12656. if (v instanceof Data_List_Types.Cons && v.value1 instanceof Data_List_Types.Nil) {
  12657. $tco_done = true;
  12658. return new Data_Maybe.Just(v.value0);
  12659. }
  12660. ;
  12661. if (v instanceof Data_List_Types.Cons) {
  12662. $copy_v = v.value1;
  12663. return;
  12664. }
  12665. ;
  12666. $tco_done = true;
  12667. return Data_Maybe.Nothing.value;
  12668. }
  12669. ;
  12670. while (!$tco_done) {
  12671. $tco_result = $tco_loop($copy_v);
  12672. }
  12673. ;
  12674. return $tco_result;
  12675. };
  12676. var insertBy = function insertBy(v) {
  12677. return function (x) {
  12678. return function (v1) {
  12679. if (v1 instanceof Data_List_Types.Nil) {
  12680. return singleton(x);
  12681. }
  12682. ;
  12683. if (v1 instanceof Data_List_Types.Cons) {
  12684. var v2 = v(x)(v1.value0);
  12685. if (v2 instanceof Data_Ordering.GT) {
  12686. return new Data_List_Types.Cons(v1.value0, insertBy(v)(x)(v1.value1));
  12687. }
  12688. ;
  12689. return new Data_List_Types.Cons(x, v1);
  12690. }
  12691. ;
  12692. 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]);
  12693. };
  12694. };
  12695. };
  12696. var insertAt = function insertAt(v) {
  12697. return function (v1) {
  12698. return function (v2) {
  12699. if (v === 0) {
  12700. return new Data_Maybe.Just(new Data_List_Types.Cons(v1, v2));
  12701. }
  12702. ;
  12703. if (v2 instanceof Data_List_Types.Cons) {
  12704. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v3) {
  12705. return new Data_List_Types.Cons(v2.value0, v3);
  12706. })(insertAt(v - 1 | 0)(v1)(v2.value1));
  12707. }
  12708. ;
  12709. return Data_Maybe.Nothing.value;
  12710. };
  12711. };
  12712. };
  12713. var insert = function insert(dictOrd) {
  12714. return insertBy(Data_Ord.compare(dictOrd));
  12715. };
  12716. var init = function init(lst) {
  12717. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
  12718. return v.init;
  12719. })(unsnoc(lst));
  12720. };
  12721. var index = function index($copy_v) {
  12722. return function ($copy_v1) {
  12723. var $tco_var_v = $copy_v;
  12724. var $tco_done = false;
  12725. var $tco_result;
  12726. function $tco_loop(v, v1) {
  12727. if (v instanceof Data_List_Types.Nil) {
  12728. $tco_done = true;
  12729. return Data_Maybe.Nothing.value;
  12730. }
  12731. ;
  12732. if (v instanceof Data_List_Types.Cons && v1 === 0) {
  12733. $tco_done = true;
  12734. return new Data_Maybe.Just(v.value0);
  12735. }
  12736. ;
  12737. if (v instanceof Data_List_Types.Cons) {
  12738. $tco_var_v = v.value1;
  12739. $copy_v1 = v1 - 1 | 0;
  12740. return;
  12741. }
  12742. ;
  12743. throw new Error("Failed pattern match at Data.List (line 281, column 1 - line 281, column 44): " + [v.constructor.name, v1.constructor.name]);
  12744. }
  12745. ;
  12746. while (!$tco_done) {
  12747. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  12748. }
  12749. ;
  12750. return $tco_result;
  12751. };
  12752. };
  12753. var head = function head(v) {
  12754. if (v instanceof Data_List_Types.Nil) {
  12755. return Data_Maybe.Nothing.value;
  12756. }
  12757. ;
  12758. if (v instanceof Data_List_Types.Cons) {
  12759. return new Data_Maybe.Just(v.value0);
  12760. }
  12761. ;
  12762. throw new Error("Failed pattern match at Data.List (line 230, column 1 - line 230, column 22): " + [v.constructor.name]);
  12763. };
  12764. var transpose = function transpose(v) {
  12765. if (v instanceof Data_List_Types.Nil) {
  12766. return Data_List_Types.Nil.value;
  12767. }
  12768. ;
  12769. if (v instanceof Data_List_Types.Cons && v.value0 instanceof Data_List_Types.Nil) {
  12770. return transpose(v.value1);
  12771. }
  12772. ;
  12773. if (v instanceof Data_List_Types.Cons && v.value0 instanceof Data_List_Types.Cons) {
  12774. 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))));
  12775. }
  12776. ;
  12777. throw new Error("Failed pattern match at Data.List (line 752, column 1 - line 752, column 54): " + [v.constructor.name]);
  12778. };
  12779. var groupBy = function groupBy(v) {
  12780. return function (v1) {
  12781. if (v1 instanceof Data_List_Types.Nil) {
  12782. return Data_List_Types.Nil.value;
  12783. }
  12784. ;
  12785. if (v1 instanceof Data_List_Types.Cons) {
  12786. var v2 = span(v(v1.value0))(v1.value1);
  12787. return new Data_List_Types.Cons(new Data_NonEmpty.NonEmpty(v1.value0, v2.init), groupBy(v)(v2.rest));
  12788. }
  12789. ;
  12790. throw new Error("Failed pattern match at Data.List (line 605, column 1 - line 605, column 80): " + [v.constructor.name, v1.constructor.name]);
  12791. };
  12792. };
  12793. var group = function group(dictEq) {
  12794. return groupBy(Data_Eq.eq(dictEq));
  12795. };
  12796. var group$prime = function group$prime(dictOrd) {
  12797. var $332 = group(dictOrd.Eq0());
  12798. var $333 = sort(dictOrd);
  12799. return function ($334) {
  12800. return $332($333($334));
  12801. };
  12802. };
  12803. var fromFoldable = function fromFoldable(dictFoldable) {
  12804. return Data_Foldable.foldr(dictFoldable)(Data_List_Types.Cons.create)(Data_List_Types.Nil.value);
  12805. };
  12806. var foldM = function foldM(dictMonad) {
  12807. return function (v) {
  12808. return function (a) {
  12809. return function (v1) {
  12810. if (v1 instanceof Data_List_Types.Nil) {
  12811. return Control_Applicative.pure(dictMonad.Applicative0())(a);
  12812. }
  12813. ;
  12814. if (v1 instanceof Data_List_Types.Cons) {
  12815. return Control_Bind.bind(dictMonad.Bind1())(v(a)(v1.value0))(function (a$prime) {
  12816. return foldM(dictMonad)(v)(a$prime)(v1.value1);
  12817. });
  12818. }
  12819. ;
  12820. 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]);
  12821. };
  12822. };
  12823. };
  12824. };
  12825. var findIndex = function findIndex(fn) {
  12826. var go = function go($copy_v) {
  12827. return function ($copy_v1) {
  12828. var $tco_var_v = $copy_v;
  12829. var $tco_done = false;
  12830. var $tco_result;
  12831. function $tco_loop(v, v1) {
  12832. if (v1 instanceof Data_List_Types.Cons) {
  12833. if (fn(v1.value0)) {
  12834. $tco_done = true;
  12835. return new Data_Maybe.Just(v);
  12836. }
  12837. ;
  12838. if (Data_Boolean.otherwise) {
  12839. $tco_var_v = v + 1 | 0;
  12840. $copy_v1 = v1.value1;
  12841. return;
  12842. }
  12843. ;
  12844. }
  12845. ;
  12846. if (v1 instanceof Data_List_Types.Nil) {
  12847. $tco_done = true;
  12848. return Data_Maybe.Nothing.value;
  12849. }
  12850. ;
  12851. throw new Error("Failed pattern match at Data.List (line 301, column 3 - line 301, column 35): " + [v.constructor.name, v1.constructor.name]);
  12852. }
  12853. ;
  12854. while (!$tco_done) {
  12855. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  12856. }
  12857. ;
  12858. return $tco_result;
  12859. };
  12860. };
  12861. return go(0);
  12862. };
  12863. var findLastIndex = function findLastIndex(fn) {
  12864. return function (xs) {
  12865. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
  12866. return (length(xs) - 1 | 0) - v | 0;
  12867. })(findIndex(fn)(reverse(xs)));
  12868. };
  12869. };
  12870. var filterM = function filterM(dictMonad) {
  12871. return function (v) {
  12872. return function (v1) {
  12873. if (v1 instanceof Data_List_Types.Nil) {
  12874. return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Types.Nil.value);
  12875. }
  12876. ;
  12877. if (v1 instanceof Data_List_Types.Cons) {
  12878. return Control_Bind.bind(dictMonad.Bind1())(v(v1.value0))(function (b) {
  12879. return Control_Bind.bind(dictMonad.Bind1())(filterM(dictMonad)(v)(v1.value1))(function (xs$prime) {
  12880. return Control_Applicative.pure(dictMonad.Applicative0())(function () {
  12881. if (b) {
  12882. return new Data_List_Types.Cons(v1.value0, xs$prime);
  12883. }
  12884. ;
  12885. return xs$prime;
  12886. }());
  12887. });
  12888. });
  12889. }
  12890. ;
  12891. throw new Error("Failed pattern match at Data.List (line 403, column 1 - line 403, column 75): " + [v.constructor.name, v1.constructor.name]);
  12892. };
  12893. };
  12894. };
  12895. var filter = function filter(p) {
  12896. var go = function go($copy_acc) {
  12897. return function ($copy_v) {
  12898. var $tco_var_acc = $copy_acc;
  12899. var $tco_done = false;
  12900. var $tco_result;
  12901. function $tco_loop(acc, v) {
  12902. if (v instanceof Data_List_Types.Nil) {
  12903. $tco_done = true;
  12904. return reverse(acc);
  12905. }
  12906. ;
  12907. if (v instanceof Data_List_Types.Cons) {
  12908. if (p(v.value0)) {
  12909. $tco_var_acc = new Data_List_Types.Cons(v.value0, acc);
  12910. $copy_v = v.value1;
  12911. return;
  12912. }
  12913. ;
  12914. if (Data_Boolean.otherwise) {
  12915. $tco_var_acc = acc;
  12916. $copy_v = v.value1;
  12917. return;
  12918. }
  12919. ;
  12920. }
  12921. ;
  12922. throw new Error("Failed pattern match at Data.List (line 390, column 3 - line 390, column 27): " + [acc.constructor.name, v.constructor.name]);
  12923. }
  12924. ;
  12925. while (!$tco_done) {
  12926. $tco_result = $tco_loop($tco_var_acc, $copy_v);
  12927. }
  12928. ;
  12929. return $tco_result;
  12930. };
  12931. };
  12932. return go(Data_List_Types.Nil.value);
  12933. };
  12934. var intersectBy = function intersectBy(v) {
  12935. return function (v1) {
  12936. return function (v2) {
  12937. if (v1 instanceof Data_List_Types.Nil) {
  12938. return Data_List_Types.Nil.value;
  12939. }
  12940. ;
  12941. if (v2 instanceof Data_List_Types.Nil) {
  12942. return Data_List_Types.Nil.value;
  12943. }
  12944. ;
  12945. return filter(function (x) {
  12946. return Data_Foldable.any(Data_List_Types.foldableList)(Data_HeytingAlgebra.heytingAlgebraBoolean)(v(x))(v2);
  12947. })(v1);
  12948. };
  12949. };
  12950. };
  12951. var intersect = function intersect(dictEq) {
  12952. return intersectBy(Data_Eq.eq(dictEq));
  12953. };
  12954. var nubBy = function nubBy(v) {
  12955. return function (v1) {
  12956. if (v1 instanceof Data_List_Types.Nil) {
  12957. return Data_List_Types.Nil.value;
  12958. }
  12959. ;
  12960. if (v1 instanceof Data_List_Types.Cons) {
  12961. return new Data_List_Types.Cons(v1.value0, nubBy(v)(filter(function (y) {
  12962. return !v(v1.value0)(y);
  12963. })(v1.value1)));
  12964. }
  12965. ;
  12966. throw new Error("Failed pattern match at Data.List (line 644, column 1 - line 644, column 59): " + [v.constructor.name, v1.constructor.name]);
  12967. };
  12968. };
  12969. var nub = function nub(dictEq) {
  12970. return nubBy(Data_Eq.eq(dictEq));
  12971. };
  12972. var eqPattern = function eqPattern(dictEq) {
  12973. return new Data_Eq.Eq(function (x) {
  12974. return function (y) {
  12975. return Data_Eq.eq(Data_List_Types.eqList(dictEq))(x)(y);
  12976. };
  12977. });
  12978. };
  12979. var ordPattern = function ordPattern(dictOrd) {
  12980. return new Data_Ord.Ord(function () {
  12981. return eqPattern(dictOrd.Eq0());
  12982. }, function (x) {
  12983. return function (y) {
  12984. return Data_Ord.compare(Data_List_Types.ordList(dictOrd))(x)(y);
  12985. };
  12986. });
  12987. };
  12988. var elemLastIndex = function elemLastIndex(dictEq) {
  12989. return function (x) {
  12990. return findLastIndex(function (v) {
  12991. return Data_Eq.eq(dictEq)(v)(x);
  12992. });
  12993. };
  12994. };
  12995. var elemIndex = function elemIndex(dictEq) {
  12996. return function (x) {
  12997. return findIndex(function (v) {
  12998. return Data_Eq.eq(dictEq)(v)(x);
  12999. });
  13000. };
  13001. };
  13002. var dropWhile = function dropWhile(p) {
  13003. var go = function go($copy_v) {
  13004. var $tco_done = false;
  13005. var $tco_result;
  13006. function $tco_loop(v) {
  13007. if (v instanceof Data_List_Types.Cons && p(v.value0)) {
  13008. $copy_v = v.value1;
  13009. return;
  13010. }
  13011. ;
  13012. $tco_done = true;
  13013. return v;
  13014. }
  13015. ;
  13016. while (!$tco_done) {
  13017. $tco_result = $tco_loop($copy_v);
  13018. }
  13019. ;
  13020. return $tco_result;
  13021. };
  13022. return go;
  13023. };
  13024. var dropEnd = function dropEnd(n) {
  13025. return function (xs) {
  13026. return take(length(xs) - n | 0)(xs);
  13027. };
  13028. };
  13029. var drop = function drop($copy_v) {
  13030. return function ($copy_v1) {
  13031. var $tco_var_v = $copy_v;
  13032. var $tco_done = false;
  13033. var $tco_result;
  13034. function $tco_loop(v, v1) {
  13035. if (v < 1) {
  13036. $tco_done = true;
  13037. return v1;
  13038. }
  13039. ;
  13040. if (v1 instanceof Data_List_Types.Nil) {
  13041. $tco_done = true;
  13042. return Data_List_Types.Nil.value;
  13043. }
  13044. ;
  13045. if (v1 instanceof Data_List_Types.Cons) {
  13046. $tco_var_v = v - 1 | 0;
  13047. $copy_v1 = v1.value1;
  13048. return;
  13049. }
  13050. ;
  13051. throw new Error("Failed pattern match at Data.List (line 543, column 1 - line 543, column 42): " + [v.constructor.name, v1.constructor.name]);
  13052. }
  13053. ;
  13054. while (!$tco_done) {
  13055. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  13056. }
  13057. ;
  13058. return $tco_result;
  13059. };
  13060. };
  13061. var slice = function slice(start) {
  13062. return function (end) {
  13063. return function (xs) {
  13064. return take(end - start | 0)(drop(start)(xs));
  13065. };
  13066. };
  13067. };
  13068. var takeEnd = function takeEnd(n) {
  13069. return function (xs) {
  13070. return drop(length(xs) - n | 0)(xs);
  13071. };
  13072. };
  13073. var deleteBy = function deleteBy(v) {
  13074. return function (v1) {
  13075. return function (v2) {
  13076. if (v2 instanceof Data_List_Types.Nil) {
  13077. return Data_List_Types.Nil.value;
  13078. }
  13079. ;
  13080. if (v2 instanceof Data_List_Types.Cons && v(v1)(v2.value0)) {
  13081. return v2.value1;
  13082. }
  13083. ;
  13084. if (v2 instanceof Data_List_Types.Cons) {
  13085. return new Data_List_Types.Cons(v2.value0, deleteBy(v)(v1)(v2.value1));
  13086. }
  13087. ;
  13088. 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]);
  13089. };
  13090. };
  13091. };
  13092. var unionBy = function unionBy(eq) {
  13093. return function (xs) {
  13094. return function (ys) {
  13095. 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));
  13096. };
  13097. };
  13098. };
  13099. var union = function union(dictEq) {
  13100. return unionBy(Data_Eq.eq(dictEq));
  13101. };
  13102. var deleteAt = function deleteAt(v) {
  13103. return function (v1) {
  13104. if (v === 0 && v1 instanceof Data_List_Types.Cons) {
  13105. return new Data_Maybe.Just(v1.value1);
  13106. }
  13107. ;
  13108. if (v1 instanceof Data_List_Types.Cons) {
  13109. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v2) {
  13110. return new Data_List_Types.Cons(v1.value0, v2);
  13111. })(deleteAt(v - 1 | 0)(v1.value1));
  13112. }
  13113. ;
  13114. return Data_Maybe.Nothing.value;
  13115. };
  13116. };
  13117. var $$delete = function $$delete(dictEq) {
  13118. return deleteBy(Data_Eq.eq(dictEq));
  13119. };
  13120. var difference = function difference(dictEq) {
  13121. return Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip($$delete(dictEq)));
  13122. };
  13123. var concatMap = Data_Function.flip(Control_Bind.bind(Data_List_Types.bindList));
  13124. var concat = function concat(v) {
  13125. return Control_Bind.bind(Data_List_Types.bindList)(v)(Control_Category.identity(Control_Category.categoryFn));
  13126. };
  13127. var catMaybes = mapMaybe(Control_Category.identity(Control_Category.categoryFn));
  13128. var alterAt = function alterAt(v) {
  13129. return function (v1) {
  13130. return function (v2) {
  13131. if (v === 0 && v2 instanceof Data_List_Types.Cons) {
  13132. return Data_Maybe.Just.create(function () {
  13133. var v3 = v1(v2.value0);
  13134. if (v3 instanceof Data_Maybe.Nothing) {
  13135. return v2.value1;
  13136. }
  13137. ;
  13138. if (v3 instanceof Data_Maybe.Just) {
  13139. return new Data_List_Types.Cons(v3.value0, v2.value1);
  13140. }
  13141. ;
  13142. throw new Error("Failed pattern match at Data.List (line 352, column 3 - line 354, column 23): " + [v3.constructor.name]);
  13143. }());
  13144. }
  13145. ;
  13146. if (v2 instanceof Data_List_Types.Cons) {
  13147. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v3) {
  13148. return new Data_List_Types.Cons(v2.value0, v3);
  13149. })(alterAt(v - 1 | 0)(v1)(v2.value1));
  13150. }
  13151. ;
  13152. return Data_Maybe.Nothing.value;
  13153. };
  13154. };
  13155. };
  13156. var modifyAt = function modifyAt(n) {
  13157. return function (f) {
  13158. return alterAt(n)(function ($335) {
  13159. return Data_Maybe.Just.create(f($335));
  13160. });
  13161. };
  13162. };
  13163. module.exports = {
  13164. toUnfoldable: toUnfoldable,
  13165. fromFoldable: fromFoldable,
  13166. singleton: singleton,
  13167. range: range,
  13168. some: some,
  13169. someRec: someRec,
  13170. many: many,
  13171. manyRec: manyRec,
  13172. "null": $$null,
  13173. length: length,
  13174. snoc: snoc,
  13175. insert: insert,
  13176. insertBy: insertBy,
  13177. head: head,
  13178. last: last,
  13179. tail: tail,
  13180. init: init,
  13181. uncons: uncons,
  13182. unsnoc: unsnoc,
  13183. index: index,
  13184. elemIndex: elemIndex,
  13185. elemLastIndex: elemLastIndex,
  13186. findIndex: findIndex,
  13187. findLastIndex: findLastIndex,
  13188. insertAt: insertAt,
  13189. deleteAt: deleteAt,
  13190. updateAt: updateAt,
  13191. modifyAt: modifyAt,
  13192. alterAt: alterAt,
  13193. reverse: reverse,
  13194. concat: concat,
  13195. concatMap: concatMap,
  13196. filter: filter,
  13197. filterM: filterM,
  13198. mapMaybe: mapMaybe,
  13199. catMaybes: catMaybes,
  13200. mapWithIndex: mapWithIndex,
  13201. sort: sort,
  13202. sortBy: sortBy,
  13203. Pattern: Pattern,
  13204. stripPrefix: stripPrefix,
  13205. slice: slice,
  13206. take: take,
  13207. takeEnd: takeEnd,
  13208. takeWhile: takeWhile,
  13209. drop: drop,
  13210. dropEnd: dropEnd,
  13211. dropWhile: dropWhile,
  13212. span: span,
  13213. group: group,
  13214. "group'": group$prime,
  13215. groupBy: groupBy,
  13216. partition: partition,
  13217. nub: nub,
  13218. nubBy: nubBy,
  13219. union: union,
  13220. unionBy: unionBy,
  13221. "delete": $$delete,
  13222. deleteBy: deleteBy,
  13223. difference: difference,
  13224. intersect: intersect,
  13225. intersectBy: intersectBy,
  13226. zipWith: zipWith,
  13227. zipWithA: zipWithA,
  13228. zip: zip,
  13229. unzip: unzip,
  13230. transpose: transpose,
  13231. foldM: foldM,
  13232. eqPattern: eqPattern,
  13233. ordPattern: ordPattern,
  13234. newtypePattern: newtypePattern,
  13235. showPattern: showPattern
  13236. };
  13237. },{"../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) {
  13238. "use strict"; // module Partial.Unsafe
  13239. exports.unsafePartial = function (f) {
  13240. return f();
  13241. };
  13242. },{}],"../output/Partial/foreign.js":[function(require,module,exports) {
  13243. "use strict"; // module Partial
  13244. exports.crashWith = function () {
  13245. return function (msg) {
  13246. throw new Error(msg);
  13247. };
  13248. };
  13249. },{}],"../output/Partial/index.js":[function(require,module,exports) {
  13250. // Generated by purs version 0.13.6
  13251. "use strict";
  13252. var $foreign = require("./foreign.js");
  13253. var crash = function crash(dictPartial) {
  13254. return $foreign.crashWith()("Partial.crash: partial function");
  13255. };
  13256. module.exports = {
  13257. crash: crash,
  13258. crashWith: $foreign.crashWith
  13259. };
  13260. },{"./foreign.js":"../output/Partial/foreign.js"}],"../output/Partial.Unsafe/index.js":[function(require,module,exports) {
  13261. // Generated by purs version 0.13.6
  13262. "use strict";
  13263. var $foreign = require("./foreign.js");
  13264. var Partial = require("../Partial/index.js");
  13265. var unsafePartialBecause = function unsafePartialBecause(v) {
  13266. return function (x) {
  13267. return $foreign.unsafePartial(function (dictPartial) {
  13268. return x();
  13269. });
  13270. };
  13271. };
  13272. var unsafeCrashWith = function unsafeCrashWith(msg) {
  13273. return $foreign.unsafePartial(function (dictPartial) {
  13274. return Partial.crashWith()(msg);
  13275. });
  13276. };
  13277. module.exports = {
  13278. unsafePartialBecause: unsafePartialBecause,
  13279. unsafeCrashWith: unsafeCrashWith,
  13280. unsafePartial: $foreign.unsafePartial
  13281. };
  13282. },{"./foreign.js":"../output/Partial.Unsafe/foreign.js","../Partial/index.js":"../output/Partial/index.js"}],"../output/Data.List.NonEmpty/index.js":[function(require,module,exports) {
  13283. // Generated by purs version 0.13.6
  13284. "use strict";
  13285. var Control_Bind = require("../Control.Bind/index.js");
  13286. var Control_Category = require("../Control.Category/index.js");
  13287. var Data_Boolean = require("../Data.Boolean/index.js");
  13288. var Data_Eq = require("../Data.Eq/index.js");
  13289. var Data_Function = require("../Data.Function/index.js");
  13290. var Data_Functor = require("../Data.Functor/index.js");
  13291. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  13292. var Data_List = require("../Data.List/index.js");
  13293. var Data_List_Types = require("../Data.List.Types/index.js");
  13294. var Data_Maybe = require("../Data.Maybe/index.js");
  13295. var Data_NonEmpty = require("../Data.NonEmpty/index.js");
  13296. var Data_Ord = require("../Data.Ord/index.js");
  13297. var Data_Semigroup = require("../Data.Semigroup/index.js");
  13298. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  13299. var Data_Tuple = require("../Data.Tuple/index.js");
  13300. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  13301. var Partial_Unsafe = require("../Partial.Unsafe/index.js");
  13302. var zipWith = function zipWith(f) {
  13303. return function (v) {
  13304. return function (v1) {
  13305. return new Data_NonEmpty.NonEmpty(f(v.value0)(v1.value0), Data_List.zipWith(f)(v.value1)(v1.value1));
  13306. };
  13307. };
  13308. };
  13309. var zipWithA = function zipWithA(dictApplicative) {
  13310. return function (f) {
  13311. return function (xs) {
  13312. return function (ys) {
  13313. return Data_Semigroup_Traversable.sequence1(Data_List_Types.traversable1NonEmptyList)(dictApplicative.Apply0())(zipWith(f)(xs)(ys));
  13314. };
  13315. };
  13316. };
  13317. };
  13318. var zip = zipWith(Data_Tuple.Tuple.create);
  13319. var wrappedOperation2 = function wrappedOperation2(name) {
  13320. return function (f) {
  13321. return function (v) {
  13322. return function (v1) {
  13323. var v2 = f(new Data_List_Types.Cons(v.value0, v.value1))(new Data_List_Types.Cons(v1.value0, v1.value1));
  13324. if (v2 instanceof Data_List_Types.Cons) {
  13325. return new Data_NonEmpty.NonEmpty(v2.value0, v2.value1);
  13326. }
  13327. ;
  13328. if (v2 instanceof Data_List_Types.Nil) {
  13329. return Partial_Unsafe.unsafeCrashWith("Impossible: empty list in NonEmptyList " + name);
  13330. }
  13331. ;
  13332. throw new Error("Failed pattern match at Data.List.NonEmpty (line 104, column 3 - line 106, column 81): " + [v2.constructor.name]);
  13333. };
  13334. };
  13335. };
  13336. };
  13337. var wrappedOperation = function wrappedOperation(name) {
  13338. return function (f) {
  13339. return function (v) {
  13340. var v1 = f(new Data_List_Types.Cons(v.value0, v.value1));
  13341. if (v1 instanceof Data_List_Types.Cons) {
  13342. return new Data_NonEmpty.NonEmpty(v1.value0, v1.value1);
  13343. }
  13344. ;
  13345. if (v1 instanceof Data_List_Types.Nil) {
  13346. return Partial_Unsafe.unsafeCrashWith("Impossible: empty list in NonEmptyList " + name);
  13347. }
  13348. ;
  13349. throw new Error("Failed pattern match at Data.List.NonEmpty (line 91, column 3 - line 93, column 81): " + [v1.constructor.name]);
  13350. };
  13351. };
  13352. };
  13353. var updateAt = function updateAt(i) {
  13354. return function (a) {
  13355. return function (v) {
  13356. if (i === 0) {
  13357. return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(a, v.value1));
  13358. }
  13359. ;
  13360. if (Data_Boolean.otherwise) {
  13361. return Data_Functor.map(Data_Maybe.functorMaybe)(function ($161) {
  13362. return Data_List_Types.NonEmptyList(function (v1) {
  13363. return new Data_NonEmpty.NonEmpty(v.value0, v1);
  13364. }($161));
  13365. })(Data_List.updateAt(i - 1 | 0)(a)(v.value1));
  13366. }
  13367. ;
  13368. 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]);
  13369. };
  13370. };
  13371. };
  13372. var unzip = function unzip(ts) {
  13373. 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));
  13374. };
  13375. var unsnoc = function unsnoc(v) {
  13376. var v1 = Data_List.unsnoc(v.value1);
  13377. if (v1 instanceof Data_Maybe.Nothing) {
  13378. return {
  13379. init: Data_List_Types.Nil.value,
  13380. last: v.value0
  13381. };
  13382. }
  13383. ;
  13384. if (v1 instanceof Data_Maybe.Just) {
  13385. return {
  13386. init: new Data_List_Types.Cons(v.value0, v1.value0.init),
  13387. last: v1.value0.last
  13388. };
  13389. }
  13390. ;
  13391. throw new Error("Failed pattern match at Data.List.NonEmpty (line 159, column 35 - line 161, column 50): " + [v1.constructor.name]);
  13392. };
  13393. var unionBy = function () {
  13394. var $162 = wrappedOperation2("unionBy");
  13395. return function ($163) {
  13396. return $162(Data_List.unionBy($163));
  13397. };
  13398. }();
  13399. var union = function union(dictEq) {
  13400. return wrappedOperation2("union")(Data_List.union(dictEq));
  13401. };
  13402. var uncons = function uncons(v) {
  13403. return {
  13404. head: v.value0,
  13405. tail: v.value1
  13406. };
  13407. };
  13408. var toList = function toList(v) {
  13409. return new Data_List_Types.Cons(v.value0, v.value1);
  13410. };
  13411. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  13412. var $164 = Data_Unfoldable.unfoldr(dictUnfoldable)(function (xs) {
  13413. return Data_Functor.map(Data_Maybe.functorMaybe)(function (rec) {
  13414. return new Data_Tuple.Tuple(rec.head, rec.tail);
  13415. })(Data_List.uncons(xs));
  13416. });
  13417. return function ($165) {
  13418. return $164(toList($165));
  13419. };
  13420. };
  13421. var tail = function tail(v) {
  13422. return v.value1;
  13423. };
  13424. var sortBy = function () {
  13425. var $166 = wrappedOperation("sortBy");
  13426. return function ($167) {
  13427. return $166(Data_List.sortBy($167));
  13428. };
  13429. }();
  13430. var sort = function sort(dictOrd) {
  13431. return function (xs) {
  13432. return sortBy(Data_Ord.compare(dictOrd))(xs);
  13433. };
  13434. };
  13435. var snoc = function snoc(v) {
  13436. return function (y) {
  13437. return new Data_NonEmpty.NonEmpty(v.value0, Data_List.snoc(v.value1)(y));
  13438. };
  13439. };
  13440. var singleton = function () {
  13441. var $168 = Data_NonEmpty.singleton(Data_List_Types.plusList);
  13442. return function ($169) {
  13443. return Data_List_Types.NonEmptyList($168($169));
  13444. };
  13445. }();
  13446. var snoc$prime = function snoc$prime(v) {
  13447. return function (y) {
  13448. if (v instanceof Data_List_Types.Cons) {
  13449. return new Data_NonEmpty.NonEmpty(v.value0, Data_List.snoc(v.value1)(y));
  13450. }
  13451. ;
  13452. if (v instanceof Data_List_Types.Nil) {
  13453. return singleton(y);
  13454. }
  13455. ;
  13456. throw new Error("Failed pattern match at Data.List.NonEmpty (line 139, column 1 - line 139, column 51): " + [v.constructor.name, y.constructor.name]);
  13457. };
  13458. };
  13459. var reverse = wrappedOperation("reverse")(Data_List.reverse);
  13460. var nubBy = function () {
  13461. var $170 = wrappedOperation("nubBy");
  13462. return function ($171) {
  13463. return $170(Data_List.nubBy($171));
  13464. };
  13465. }();
  13466. var nub = function nub(dictEq) {
  13467. return wrappedOperation("nub")(Data_List.nub(dictEq));
  13468. };
  13469. var modifyAt = function modifyAt(i) {
  13470. return function (f) {
  13471. return function (v) {
  13472. if (i === 0) {
  13473. return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(f(v.value0), v.value1));
  13474. }
  13475. ;
  13476. if (Data_Boolean.otherwise) {
  13477. return Data_Functor.map(Data_Maybe.functorMaybe)(function ($172) {
  13478. return Data_List_Types.NonEmptyList(function (v1) {
  13479. return new Data_NonEmpty.NonEmpty(v.value0, v1);
  13480. }($172));
  13481. })(Data_List.modifyAt(i - 1 | 0)(f)(v.value1));
  13482. }
  13483. ;
  13484. 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]);
  13485. };
  13486. };
  13487. };
  13488. var mapWithIndex = Data_FunctorWithIndex.mapWithIndex(Data_List_Types.functorWithIndexNonEmptyList);
  13489. var lift = function lift(f) {
  13490. return function (v) {
  13491. return f(new Data_List_Types.Cons(v.value0, v.value1));
  13492. };
  13493. };
  13494. var mapMaybe = function mapMaybe($173) {
  13495. return lift(Data_List.mapMaybe($173));
  13496. };
  13497. var partition = function partition($174) {
  13498. return lift(Data_List.partition($174));
  13499. };
  13500. var span = function span($175) {
  13501. return lift(Data_List.span($175));
  13502. };
  13503. var take = function take($176) {
  13504. return lift(Data_List.take($176));
  13505. };
  13506. var takeWhile = function takeWhile($177) {
  13507. return lift(Data_List.takeWhile($177));
  13508. };
  13509. var length = function length(v) {
  13510. return 1 + Data_List.length(v.value1) | 0;
  13511. };
  13512. var last = function last(v) {
  13513. return Data_Maybe.fromMaybe(v.value0)(Data_List.last(v.value1));
  13514. };
  13515. var intersectBy = function () {
  13516. var $178 = wrappedOperation2("intersectBy");
  13517. return function ($179) {
  13518. return $178(Data_List.intersectBy($179));
  13519. };
  13520. }();
  13521. var intersect = function intersect(dictEq) {
  13522. return wrappedOperation2("intersect")(Data_List.intersect(dictEq));
  13523. };
  13524. var insertAt = function insertAt(i) {
  13525. return function (a) {
  13526. return function (v) {
  13527. if (i === 0) {
  13528. return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(a, new Data_List_Types.Cons(v.value0, v.value1)));
  13529. }
  13530. ;
  13531. if (Data_Boolean.otherwise) {
  13532. return Data_Functor.map(Data_Maybe.functorMaybe)(function ($180) {
  13533. return Data_List_Types.NonEmptyList(function (v1) {
  13534. return new Data_NonEmpty.NonEmpty(v.value0, v1);
  13535. }($180));
  13536. })(Data_List.insertAt(i - 1 | 0)(a)(v.value1));
  13537. }
  13538. ;
  13539. 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]);
  13540. };
  13541. };
  13542. };
  13543. var init = function init(v) {
  13544. return Data_Maybe.maybe(Data_List_Types.Nil.value)(function (v1) {
  13545. return new Data_List_Types.Cons(v.value0, v1);
  13546. })(Data_List.init(v.value1));
  13547. };
  13548. var index = function index(v) {
  13549. return function (i) {
  13550. if (i === 0) {
  13551. return new Data_Maybe.Just(v.value0);
  13552. }
  13553. ;
  13554. if (Data_Boolean.otherwise) {
  13555. return Data_List.index(v.value1)(i - 1 | 0);
  13556. }
  13557. ;
  13558. throw new Error("Failed pattern match at Data.List.NonEmpty (line 166, column 1 - line 166, column 52): " + [v.constructor.name, i.constructor.name]);
  13559. };
  13560. };
  13561. var head = function head(v) {
  13562. return v.value0;
  13563. };
  13564. var groupBy = function () {
  13565. var $181 = wrappedOperation("groupBy");
  13566. return function ($182) {
  13567. return $181(Data_List.groupBy($182));
  13568. };
  13569. }();
  13570. var group$prime = function group$prime(dictOrd) {
  13571. return wrappedOperation("group'")(Data_List["group'"](dictOrd));
  13572. };
  13573. var group = function group(dictEq) {
  13574. return wrappedOperation("group")(Data_List.group(dictEq));
  13575. };
  13576. var fromList = function fromList(v) {
  13577. if (v instanceof Data_List_Types.Nil) {
  13578. return Data_Maybe.Nothing.value;
  13579. }
  13580. ;
  13581. if (v instanceof Data_List_Types.Cons) {
  13582. return new Data_Maybe.Just(new Data_NonEmpty.NonEmpty(v.value0, v.value1));
  13583. }
  13584. ;
  13585. throw new Error("Failed pattern match at Data.List.NonEmpty (line 120, column 1 - line 120, column 57): " + [v.constructor.name]);
  13586. };
  13587. var fromFoldable = function fromFoldable(dictFoldable) {
  13588. var $183 = Data_List.fromFoldable(dictFoldable);
  13589. return function ($184) {
  13590. return fromList($183($184));
  13591. };
  13592. };
  13593. var foldM = function foldM(dictMonad) {
  13594. return function (f) {
  13595. return function (a) {
  13596. return function (v) {
  13597. return Control_Bind.bind(dictMonad.Bind1())(f(a)(v.value0))(function (a$prime) {
  13598. return Data_List.foldM(dictMonad)(f)(a$prime)(v.value1);
  13599. });
  13600. };
  13601. };
  13602. };
  13603. };
  13604. var findLastIndex = function findLastIndex(f) {
  13605. return function (v) {
  13606. var v1 = Data_List.findLastIndex(f)(v.value1);
  13607. if (v1 instanceof Data_Maybe.Just) {
  13608. return new Data_Maybe.Just(v1.value0 + 1 | 0);
  13609. }
  13610. ;
  13611. if (v1 instanceof Data_Maybe.Nothing) {
  13612. if (f(v.value0)) {
  13613. return new Data_Maybe.Just(0);
  13614. }
  13615. ;
  13616. if (Data_Boolean.otherwise) {
  13617. return Data_Maybe.Nothing.value;
  13618. }
  13619. ;
  13620. }
  13621. ;
  13622. throw new Error("Failed pattern match at Data.List.NonEmpty (line 186, column 3 - line 190, column 29): " + [v1.constructor.name]);
  13623. };
  13624. };
  13625. var findIndex = function findIndex(f) {
  13626. return function (v) {
  13627. if (f(v.value0)) {
  13628. return new Data_Maybe.Just(0);
  13629. }
  13630. ;
  13631. if (Data_Boolean.otherwise) {
  13632. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v1) {
  13633. return v1 + 1 | 0;
  13634. })(Data_List.findIndex(f)(v.value1));
  13635. }
  13636. ;
  13637. throw new Error("Failed pattern match at Data.List.NonEmpty (line 179, column 1 - line 179, column 69): " + [f.constructor.name, v.constructor.name]);
  13638. };
  13639. };
  13640. var filterM = function filterM(dictMonad) {
  13641. var $185 = Data_List.filterM(dictMonad);
  13642. return function ($186) {
  13643. return lift($185($186));
  13644. };
  13645. };
  13646. var filter = function filter($187) {
  13647. return lift(Data_List.filter($187));
  13648. };
  13649. var elemLastIndex = function elemLastIndex(dictEq) {
  13650. return function (x) {
  13651. return findLastIndex(function (v) {
  13652. return Data_Eq.eq(dictEq)(v)(x);
  13653. });
  13654. };
  13655. };
  13656. var elemIndex = function elemIndex(dictEq) {
  13657. return function (x) {
  13658. return findIndex(function (v) {
  13659. return Data_Eq.eq(dictEq)(v)(x);
  13660. });
  13661. };
  13662. };
  13663. var dropWhile = function dropWhile($188) {
  13664. return lift(Data_List.dropWhile($188));
  13665. };
  13666. var drop = function drop($189) {
  13667. return lift(Data_List.drop($189));
  13668. };
  13669. var cons$prime = function cons$prime(x) {
  13670. return function (xs) {
  13671. return new Data_NonEmpty.NonEmpty(x, xs);
  13672. };
  13673. };
  13674. var cons = function cons(y) {
  13675. return function (v) {
  13676. return new Data_NonEmpty.NonEmpty(y, new Data_List_Types.Cons(v.value0, v.value1));
  13677. };
  13678. };
  13679. var concatMap = Data_Function.flip(Control_Bind.bind(Data_List_Types.bindNonEmptyList));
  13680. var concat = function concat(v) {
  13681. return Control_Bind.bind(Data_List_Types.bindNonEmptyList)(v)(Control_Category.identity(Control_Category.categoryFn));
  13682. };
  13683. var catMaybes = lift(Data_List.catMaybes);
  13684. var appendFoldable = function appendFoldable(dictFoldable) {
  13685. return function (v) {
  13686. return function (ys) {
  13687. return new Data_NonEmpty.NonEmpty(v.value0, Data_Semigroup.append(Data_List_Types.semigroupList)(v.value1)(Data_List.fromFoldable(dictFoldable)(ys)));
  13688. };
  13689. };
  13690. };
  13691. module.exports = {
  13692. toUnfoldable: toUnfoldable,
  13693. fromFoldable: fromFoldable,
  13694. fromList: fromList,
  13695. toList: toList,
  13696. singleton: singleton,
  13697. length: length,
  13698. cons: cons,
  13699. "cons'": cons$prime,
  13700. snoc: snoc,
  13701. "snoc'": snoc$prime,
  13702. head: head,
  13703. last: last,
  13704. tail: tail,
  13705. init: init,
  13706. uncons: uncons,
  13707. unsnoc: unsnoc,
  13708. index: index,
  13709. elemIndex: elemIndex,
  13710. elemLastIndex: elemLastIndex,
  13711. findIndex: findIndex,
  13712. findLastIndex: findLastIndex,
  13713. insertAt: insertAt,
  13714. updateAt: updateAt,
  13715. modifyAt: modifyAt,
  13716. reverse: reverse,
  13717. concat: concat,
  13718. concatMap: concatMap,
  13719. filter: filter,
  13720. filterM: filterM,
  13721. mapMaybe: mapMaybe,
  13722. catMaybes: catMaybes,
  13723. appendFoldable: appendFoldable,
  13724. mapWithIndex: mapWithIndex,
  13725. sort: sort,
  13726. sortBy: sortBy,
  13727. take: take,
  13728. takeWhile: takeWhile,
  13729. drop: drop,
  13730. dropWhile: dropWhile,
  13731. span: span,
  13732. group: group,
  13733. "group'": group$prime,
  13734. groupBy: groupBy,
  13735. partition: partition,
  13736. nub: nub,
  13737. nubBy: nubBy,
  13738. union: union,
  13739. unionBy: unionBy,
  13740. intersect: intersect,
  13741. intersectBy: intersectBy,
  13742. zipWith: zipWith,
  13743. zipWithA: zipWithA,
  13744. zip: zip,
  13745. unzip: unzip,
  13746. foldM: foldM
  13747. };
  13748. },{"../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) {
  13749. "use strict";
  13750. exports.fromCharArray = function (a) {
  13751. return a.join("");
  13752. };
  13753. exports.toCharArray = function (s) {
  13754. return s.split("");
  13755. };
  13756. exports.singleton = function (c) {
  13757. return c;
  13758. };
  13759. exports._charAt = function (just) {
  13760. return function (nothing) {
  13761. return function (i) {
  13762. return function (s) {
  13763. return i >= 0 && i < s.length ? just(s.charAt(i)) : nothing;
  13764. };
  13765. };
  13766. };
  13767. };
  13768. exports._toChar = function (just) {
  13769. return function (nothing) {
  13770. return function (s) {
  13771. return s.length === 1 ? just(s) : nothing;
  13772. };
  13773. };
  13774. };
  13775. exports.length = function (s) {
  13776. return s.length;
  13777. };
  13778. exports.countPrefix = function (p) {
  13779. return function (s) {
  13780. var i = 0;
  13781. while (i < s.length && p(s.charAt(i))) {
  13782. i++;
  13783. }
  13784. return i;
  13785. };
  13786. };
  13787. exports._indexOf = function (just) {
  13788. return function (nothing) {
  13789. return function (x) {
  13790. return function (s) {
  13791. var i = s.indexOf(x);
  13792. return i === -1 ? nothing : just(i);
  13793. };
  13794. };
  13795. };
  13796. };
  13797. exports["_indexOf'"] = function (just) {
  13798. return function (nothing) {
  13799. return function (x) {
  13800. return function (startAt) {
  13801. return function (s) {
  13802. if (startAt < 0 || startAt > s.length) return nothing;
  13803. var i = s.indexOf(x, startAt);
  13804. return i === -1 ? nothing : just(i);
  13805. };
  13806. };
  13807. };
  13808. };
  13809. };
  13810. exports._lastIndexOf = function (just) {
  13811. return function (nothing) {
  13812. return function (x) {
  13813. return function (s) {
  13814. var i = s.lastIndexOf(x);
  13815. return i === -1 ? nothing : just(i);
  13816. };
  13817. };
  13818. };
  13819. };
  13820. exports["_lastIndexOf'"] = function (just) {
  13821. return function (nothing) {
  13822. return function (x) {
  13823. return function (startAt) {
  13824. return function (s) {
  13825. if (startAt < 0 || startAt > s.length) return nothing;
  13826. var i = s.lastIndexOf(x, startAt);
  13827. return i === -1 ? nothing : just(i);
  13828. };
  13829. };
  13830. };
  13831. };
  13832. };
  13833. exports.take = function (n) {
  13834. return function (s) {
  13835. return s.substr(0, n);
  13836. };
  13837. };
  13838. exports.drop = function (n) {
  13839. return function (s) {
  13840. return s.substring(n);
  13841. };
  13842. };
  13843. exports._slice = function (b) {
  13844. return function (e) {
  13845. return function (s) {
  13846. return s.slice(b, e);
  13847. };
  13848. };
  13849. };
  13850. exports.splitAt = function (i) {
  13851. return function (s) {
  13852. return {
  13853. before: s.substring(0, i),
  13854. after: s.substring(i)
  13855. };
  13856. };
  13857. };
  13858. },{}],"../output/Data.String.Unsafe/foreign.js":[function(require,module,exports) {
  13859. "use strict";
  13860. exports.charAt = function (i) {
  13861. return function (s) {
  13862. if (i >= 0 && i < s.length) return s.charAt(i);
  13863. throw new Error("Data.String.Unsafe.charAt: Invalid index.");
  13864. };
  13865. };
  13866. exports.char = function (s) {
  13867. if (s.length === 1) return s.charAt(0);
  13868. throw new Error("Data.String.Unsafe.char: Expected string of length 1.");
  13869. };
  13870. },{}],"../output/Data.String.Unsafe/index.js":[function(require,module,exports) {
  13871. // Generated by purs version 0.13.6
  13872. "use strict";
  13873. var $foreign = require("./foreign.js");
  13874. module.exports = {
  13875. "char": $foreign["char"],
  13876. charAt: $foreign.charAt
  13877. };
  13878. },{"./foreign.js":"../output/Data.String.Unsafe/foreign.js"}],"../output/Data.String.CodeUnits/index.js":[function(require,module,exports) {
  13879. // Generated by purs version 0.13.6
  13880. "use strict";
  13881. var $foreign = require("./foreign.js");
  13882. var Data_Boolean = require("../Data.Boolean/index.js");
  13883. var Data_Maybe = require("../Data.Maybe/index.js");
  13884. var Data_String_Unsafe = require("../Data.String.Unsafe/index.js");
  13885. var uncons = function uncons(v) {
  13886. if (v === "") {
  13887. return Data_Maybe.Nothing.value;
  13888. }
  13889. ;
  13890. return new Data_Maybe.Just({
  13891. head: Data_String_Unsafe.charAt(0)(v),
  13892. tail: $foreign.drop(1)(v)
  13893. });
  13894. };
  13895. var toChar = $foreign["_toChar"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  13896. var takeWhile = function takeWhile(p) {
  13897. return function (s) {
  13898. return $foreign.take($foreign.countPrefix(p)(s))(s);
  13899. };
  13900. };
  13901. var takeRight = function takeRight(i) {
  13902. return function (s) {
  13903. return $foreign.drop($foreign.length(s) - i | 0)(s);
  13904. };
  13905. };
  13906. var slice = function slice(b) {
  13907. return function (e) {
  13908. return function (s) {
  13909. var l = $foreign.length(s);
  13910. var norm = function norm(x) {
  13911. if (x < 0) {
  13912. return l + x | 0;
  13913. }
  13914. ;
  13915. if (Data_Boolean.otherwise) {
  13916. return x;
  13917. }
  13918. ;
  13919. throw new Error("Failed pattern match at Data.String.CodeUnits (line 314, column 5 - line 315, column 27): " + [x.constructor.name]);
  13920. };
  13921. var e$prime = norm(e);
  13922. var b$prime = norm(b);
  13923. var $7 = b$prime < 0 || b$prime >= l || e$prime < 0 || e$prime > l || b$prime > e$prime;
  13924. if ($7) {
  13925. return Data_Maybe.Nothing.value;
  13926. }
  13927. ;
  13928. return new Data_Maybe.Just($foreign["_slice"](b)(e)(s));
  13929. };
  13930. };
  13931. };
  13932. var lastIndexOf$prime = $foreign["_lastIndexOf'"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  13933. var lastIndexOf = $foreign["_lastIndexOf"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  13934. var stripSuffix = function stripSuffix(v) {
  13935. return function (str) {
  13936. var v1 = lastIndexOf(v)(str);
  13937. if (v1 instanceof Data_Maybe.Just && v1.value0 === ($foreign.length(str) - $foreign.length(v) | 0)) {
  13938. return Data_Maybe.Just.create($foreign.take(v1.value0)(str));
  13939. }
  13940. ;
  13941. return Data_Maybe.Nothing.value;
  13942. };
  13943. };
  13944. var indexOf$prime = $foreign["_indexOf'"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  13945. var indexOf = $foreign["_indexOf"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  13946. var stripPrefix = function stripPrefix(v) {
  13947. return function (str) {
  13948. var v1 = indexOf(v)(str);
  13949. if (v1 instanceof Data_Maybe.Just && v1.value0 === 0) {
  13950. return Data_Maybe.Just.create($foreign.drop($foreign.length(v))(str));
  13951. }
  13952. ;
  13953. return Data_Maybe.Nothing.value;
  13954. };
  13955. };
  13956. var dropWhile = function dropWhile(p) {
  13957. return function (s) {
  13958. return $foreign.drop($foreign.countPrefix(p)(s))(s);
  13959. };
  13960. };
  13961. var dropRight = function dropRight(i) {
  13962. return function (s) {
  13963. return $foreign.take($foreign.length(s) - i | 0)(s);
  13964. };
  13965. };
  13966. var contains = function contains(pat) {
  13967. var $16 = indexOf(pat);
  13968. return function ($17) {
  13969. return Data_Maybe.isJust($16($17));
  13970. };
  13971. };
  13972. var charAt = $foreign["_charAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  13973. module.exports = {
  13974. stripPrefix: stripPrefix,
  13975. stripSuffix: stripSuffix,
  13976. contains: contains,
  13977. charAt: charAt,
  13978. toChar: toChar,
  13979. uncons: uncons,
  13980. indexOf: indexOf,
  13981. "indexOf'": indexOf$prime,
  13982. lastIndexOf: lastIndexOf,
  13983. "lastIndexOf'": lastIndexOf$prime,
  13984. takeRight: takeRight,
  13985. takeWhile: takeWhile,
  13986. dropRight: dropRight,
  13987. dropWhile: dropWhile,
  13988. slice: slice,
  13989. singleton: $foreign.singleton,
  13990. fromCharArray: $foreign.fromCharArray,
  13991. toCharArray: $foreign.toCharArray,
  13992. length: $foreign.length,
  13993. countPrefix: $foreign.countPrefix,
  13994. take: $foreign.take,
  13995. drop: $foreign.drop,
  13996. splitAt: $foreign.splitAt
  13997. };
  13998. },{"./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) {
  13999. // Generated by purs version 0.13.6
  14000. "use strict";
  14001. var $foreign = require("./foreign.js");
  14002. var Control_Applicative = require("../Control.Applicative/index.js");
  14003. var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
  14004. var Control_Monad_Except = require("../Control.Monad.Except/index.js");
  14005. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  14006. var Data_Boolean = require("../Data.Boolean/index.js");
  14007. var Data_Either = require("../Data.Either/index.js");
  14008. var Data_Eq = require("../Data.Eq/index.js");
  14009. var Data_Function = require("../Data.Function/index.js");
  14010. var Data_Identity = require("../Data.Identity/index.js");
  14011. var Data_Int = require("../Data.Int/index.js");
  14012. var Data_List_NonEmpty = require("../Data.List.NonEmpty/index.js");
  14013. var Data_Maybe = require("../Data.Maybe/index.js");
  14014. var Data_Ord = require("../Data.Ord/index.js");
  14015. var Data_Ordering = require("../Data.Ordering/index.js");
  14016. var Data_Show = require("../Data.Show/index.js");
  14017. var Data_String_CodeUnits = require("../Data.String.CodeUnits/index.js");
  14018. var ForeignError = function () {
  14019. function ForeignError(value0) {
  14020. this.value0 = value0;
  14021. }
  14022. ;
  14023. ForeignError.create = function (value0) {
  14024. return new ForeignError(value0);
  14025. };
  14026. return ForeignError;
  14027. }();
  14028. var TypeMismatch = function () {
  14029. function TypeMismatch(value0, value1) {
  14030. this.value0 = value0;
  14031. this.value1 = value1;
  14032. }
  14033. ;
  14034. TypeMismatch.create = function (value0) {
  14035. return function (value1) {
  14036. return new TypeMismatch(value0, value1);
  14037. };
  14038. };
  14039. return TypeMismatch;
  14040. }();
  14041. var ErrorAtIndex = function () {
  14042. function ErrorAtIndex(value0, value1) {
  14043. this.value0 = value0;
  14044. this.value1 = value1;
  14045. }
  14046. ;
  14047. ErrorAtIndex.create = function (value0) {
  14048. return function (value1) {
  14049. return new ErrorAtIndex(value0, value1);
  14050. };
  14051. };
  14052. return ErrorAtIndex;
  14053. }();
  14054. var ErrorAtProperty = function () {
  14055. function ErrorAtProperty(value0, value1) {
  14056. this.value0 = value0;
  14057. this.value1 = value1;
  14058. }
  14059. ;
  14060. ErrorAtProperty.create = function (value0) {
  14061. return function (value1) {
  14062. return new ErrorAtProperty(value0, value1);
  14063. };
  14064. };
  14065. return ErrorAtProperty;
  14066. }();
  14067. var showForeignError = new Data_Show.Show(function (v) {
  14068. if (v instanceof ForeignError) {
  14069. return "(ForeignError " + (Data_Show.show(Data_Show.showString)(v.value0) + ")");
  14070. }
  14071. ;
  14072. if (v instanceof ErrorAtIndex) {
  14073. return "(ErrorAtIndex " + (Data_Show.show(Data_Show.showInt)(v.value0) + (" " + (Data_Show.show(showForeignError)(v.value1) + ")")));
  14074. }
  14075. ;
  14076. if (v instanceof ErrorAtProperty) {
  14077. return "(ErrorAtProperty " + (Data_Show.show(Data_Show.showString)(v.value0) + (" " + (Data_Show.show(showForeignError)(v.value1) + ")")));
  14078. }
  14079. ;
  14080. if (v instanceof TypeMismatch) {
  14081. return "(TypeMismatch " + (Data_Show.show(Data_Show.showString)(v.value0) + (" " + (Data_Show.show(Data_Show.showString)(v.value1) + ")")));
  14082. }
  14083. ;
  14084. throw new Error("Failed pattern match at Foreign (line 63, column 1 - line 67, column 89): " + [v.constructor.name]);
  14085. });
  14086. var renderForeignError = function renderForeignError(v) {
  14087. if (v instanceof ForeignError) {
  14088. return v.value0;
  14089. }
  14090. ;
  14091. if (v instanceof ErrorAtIndex) {
  14092. return "Error at array index " + (Data_Show.show(Data_Show.showInt)(v.value0) + (": " + renderForeignError(v.value1)));
  14093. }
  14094. ;
  14095. if (v instanceof ErrorAtProperty) {
  14096. return "Error at property " + (Data_Show.show(Data_Show.showString)(v.value0) + (": " + renderForeignError(v.value1)));
  14097. }
  14098. ;
  14099. if (v instanceof TypeMismatch) {
  14100. return "Type mismatch: expected " + (v.value0 + (", found " + v.value1));
  14101. }
  14102. ;
  14103. throw new Error("Failed pattern match at Foreign (line 72, column 1 - line 72, column 45): " + [v.constructor.name]);
  14104. };
  14105. var readUndefined = function readUndefined(value) {
  14106. if ($foreign.isUndefined(value)) {
  14107. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value);
  14108. }
  14109. ;
  14110. if (Data_Boolean.otherwise) {
  14111. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(new Data_Maybe.Just(value));
  14112. }
  14113. ;
  14114. throw new Error("Failed pattern match at Foreign (line 157, column 1 - line 157, column 46): " + [value.constructor.name]);
  14115. };
  14116. var readNullOrUndefined = function readNullOrUndefined(value) {
  14117. if ($foreign.isNull(value) || $foreign.isUndefined(value)) {
  14118. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value);
  14119. }
  14120. ;
  14121. if (Data_Boolean.otherwise) {
  14122. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(new Data_Maybe.Just(value));
  14123. }
  14124. ;
  14125. throw new Error("Failed pattern match at Foreign (line 162, column 1 - line 162, column 52): " + [value.constructor.name]);
  14126. };
  14127. var readNull = function readNull(value) {
  14128. if ($foreign.isNull(value)) {
  14129. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value);
  14130. }
  14131. ;
  14132. if (Data_Boolean.otherwise) {
  14133. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(new Data_Maybe.Just(value));
  14134. }
  14135. ;
  14136. throw new Error("Failed pattern match at Foreign (line 152, column 1 - line 152, column 41): " + [value.constructor.name]);
  14137. };
  14138. var fail = function () {
  14139. var $107 = Control_Monad_Error_Class.throwError(Control_Monad_Except_Trans.monadThrowExceptT(Data_Identity.monadIdentity));
  14140. return function ($108) {
  14141. return $107(Data_List_NonEmpty.singleton($108));
  14142. };
  14143. }();
  14144. var readArray = function readArray(value) {
  14145. if ($foreign.isArray(value)) {
  14146. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))($foreign.unsafeFromForeign(value));
  14147. }
  14148. ;
  14149. if (Data_Boolean.otherwise) {
  14150. return fail(new TypeMismatch("array", $foreign.tagOf(value)));
  14151. }
  14152. ;
  14153. throw new Error("Failed pattern match at Foreign (line 147, column 1 - line 147, column 42): " + [value.constructor.name]);
  14154. };
  14155. var unsafeReadTagged = function unsafeReadTagged(tag) {
  14156. return function (value) {
  14157. if ($foreign.tagOf(value) === tag) {
  14158. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))($foreign.unsafeFromForeign(value));
  14159. }
  14160. ;
  14161. if (Data_Boolean.otherwise) {
  14162. return fail(new TypeMismatch(tag, $foreign.tagOf(value)));
  14163. }
  14164. ;
  14165. throw new Error("Failed pattern match at Foreign (line 106, column 1 - line 106, column 55): " + [tag.constructor.name, value.constructor.name]);
  14166. };
  14167. };
  14168. var readBoolean = unsafeReadTagged("Boolean");
  14169. var readNumber = unsafeReadTagged("Number");
  14170. var readInt = function readInt(value) {
  14171. var error = Data_Either.Left.create(Data_List_NonEmpty.singleton(new TypeMismatch("Int", $foreign.tagOf(value))));
  14172. var fromNumber = function () {
  14173. var $109 = Data_Maybe.maybe(error)(Control_Applicative.pure(Data_Either.applicativeEither));
  14174. return function ($110) {
  14175. return $109(Data_Int.fromNumber($110));
  14176. };
  14177. }();
  14178. return Control_Monad_Except.mapExcept(Data_Either.either(Data_Function["const"](error))(fromNumber))(readNumber(value));
  14179. };
  14180. var readString = unsafeReadTagged("String");
  14181. var readChar = function readChar(value) {
  14182. var error = Data_Either.Left.create(Data_List_NonEmpty.singleton(new TypeMismatch("Char", $foreign.tagOf(value))));
  14183. var fromString = function () {
  14184. var $111 = Data_Maybe.maybe(error)(Control_Applicative.pure(Data_Either.applicativeEither));
  14185. return function ($112) {
  14186. return $111(Data_String_CodeUnits.toChar($112));
  14187. };
  14188. }();
  14189. return Control_Monad_Except.mapExcept(Data_Either.either(Data_Function["const"](error))(fromString))(readString(value));
  14190. };
  14191. var eqForeignError = new Data_Eq.Eq(function (x) {
  14192. return function (y) {
  14193. if (x instanceof ForeignError && y instanceof ForeignError) {
  14194. return x.value0 === y.value0;
  14195. }
  14196. ;
  14197. if (x instanceof TypeMismatch && y instanceof TypeMismatch) {
  14198. return x.value0 === y.value0 && x.value1 === y.value1;
  14199. }
  14200. ;
  14201. if (x instanceof ErrorAtIndex && y instanceof ErrorAtIndex) {
  14202. return x.value0 === y.value0 && Data_Eq.eq(eqForeignError)(x.value1)(y.value1);
  14203. }
  14204. ;
  14205. if (x instanceof ErrorAtProperty && y instanceof ErrorAtProperty) {
  14206. return x.value0 === y.value0 && Data_Eq.eq(eqForeignError)(x.value1)(y.value1);
  14207. }
  14208. ;
  14209. return false;
  14210. };
  14211. });
  14212. var ordForeignError = new Data_Ord.Ord(function () {
  14213. return eqForeignError;
  14214. }, function (x) {
  14215. return function (y) {
  14216. if (x instanceof ForeignError && y instanceof ForeignError) {
  14217. return Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0);
  14218. }
  14219. ;
  14220. if (x instanceof ForeignError) {
  14221. return Data_Ordering.LT.value;
  14222. }
  14223. ;
  14224. if (y instanceof ForeignError) {
  14225. return Data_Ordering.GT.value;
  14226. }
  14227. ;
  14228. if (x instanceof TypeMismatch && y instanceof TypeMismatch) {
  14229. var v = Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0);
  14230. if (v instanceof Data_Ordering.LT) {
  14231. return Data_Ordering.LT.value;
  14232. }
  14233. ;
  14234. if (v instanceof Data_Ordering.GT) {
  14235. return Data_Ordering.GT.value;
  14236. }
  14237. ;
  14238. return Data_Ord.compare(Data_Ord.ordString)(x.value1)(y.value1);
  14239. }
  14240. ;
  14241. if (x instanceof TypeMismatch) {
  14242. return Data_Ordering.LT.value;
  14243. }
  14244. ;
  14245. if (y instanceof TypeMismatch) {
  14246. return Data_Ordering.GT.value;
  14247. }
  14248. ;
  14249. if (x instanceof ErrorAtIndex && y instanceof ErrorAtIndex) {
  14250. var v = Data_Ord.compare(Data_Ord.ordInt)(x.value0)(y.value0);
  14251. if (v instanceof Data_Ordering.LT) {
  14252. return Data_Ordering.LT.value;
  14253. }
  14254. ;
  14255. if (v instanceof Data_Ordering.GT) {
  14256. return Data_Ordering.GT.value;
  14257. }
  14258. ;
  14259. return Data_Ord.compare(ordForeignError)(x.value1)(y.value1);
  14260. }
  14261. ;
  14262. if (x instanceof ErrorAtIndex) {
  14263. return Data_Ordering.LT.value;
  14264. }
  14265. ;
  14266. if (y instanceof ErrorAtIndex) {
  14267. return Data_Ordering.GT.value;
  14268. }
  14269. ;
  14270. if (x instanceof ErrorAtProperty && y instanceof ErrorAtProperty) {
  14271. var v = Data_Ord.compare(Data_Ord.ordString)(x.value0)(y.value0);
  14272. if (v instanceof Data_Ordering.LT) {
  14273. return Data_Ordering.LT.value;
  14274. }
  14275. ;
  14276. if (v instanceof Data_Ordering.GT) {
  14277. return Data_Ordering.GT.value;
  14278. }
  14279. ;
  14280. return Data_Ord.compare(ordForeignError)(x.value1)(y.value1);
  14281. }
  14282. ;
  14283. throw new Error("Failed pattern match at Foreign (line 61, column 1 - line 61, column 52): " + [x.constructor.name, y.constructor.name]);
  14284. };
  14285. });
  14286. module.exports = {
  14287. ForeignError: ForeignError,
  14288. TypeMismatch: TypeMismatch,
  14289. ErrorAtIndex: ErrorAtIndex,
  14290. ErrorAtProperty: ErrorAtProperty,
  14291. renderForeignError: renderForeignError,
  14292. unsafeReadTagged: unsafeReadTagged,
  14293. readString: readString,
  14294. readChar: readChar,
  14295. readBoolean: readBoolean,
  14296. readNumber: readNumber,
  14297. readInt: readInt,
  14298. readArray: readArray,
  14299. readNull: readNull,
  14300. readUndefined: readUndefined,
  14301. readNullOrUndefined: readNullOrUndefined,
  14302. fail: fail,
  14303. eqForeignError: eqForeignError,
  14304. ordForeignError: ordForeignError,
  14305. showForeignError: showForeignError,
  14306. unsafeToForeign: $foreign.unsafeToForeign,
  14307. unsafeFromForeign: $foreign.unsafeFromForeign,
  14308. typeOf: $foreign.typeOf,
  14309. tagOf: $foreign.tagOf,
  14310. isNull: $foreign.isNull,
  14311. isUndefined: $foreign.isUndefined,
  14312. isArray: $foreign.isArray
  14313. };
  14314. },{"./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) {
  14315. // Generated by purs version 0.13.6
  14316. "use strict";
  14317. var Data_Maybe = require("../Data.Maybe/index.js");
  14318. var Inl = function () {
  14319. function Inl(value0) {
  14320. this.value0 = value0;
  14321. }
  14322. ;
  14323. Inl.create = function (value0) {
  14324. return new Inl(value0);
  14325. };
  14326. return Inl;
  14327. }();
  14328. var Inr = function () {
  14329. function Inr(value0) {
  14330. this.value0 = value0;
  14331. }
  14332. ;
  14333. Inr.create = function (value0) {
  14334. return new Inr(value0);
  14335. };
  14336. return Inr;
  14337. }();
  14338. var Product = function () {
  14339. function Product(value0, value1) {
  14340. this.value0 = value0;
  14341. this.value1 = value1;
  14342. }
  14343. ;
  14344. Product.create = function (value0) {
  14345. return function (value1) {
  14346. return new Product(value0, value1);
  14347. };
  14348. };
  14349. return Product;
  14350. }();
  14351. var NoArguments = function () {
  14352. function NoArguments() {}
  14353. ;
  14354. NoArguments.value = new NoArguments();
  14355. return NoArguments;
  14356. }();
  14357. var Constructor = function Constructor(x) {
  14358. return x;
  14359. };
  14360. var Argument = function Argument(x) {
  14361. return x;
  14362. };
  14363. var Generic = function Generic(from, to) {
  14364. this.from = from;
  14365. this.to = to;
  14366. };
  14367. var to = function to(dict) {
  14368. return dict.to;
  14369. };
  14370. var genericMaybe = new Generic(function (v) {
  14371. if (v instanceof Data_Maybe.Nothing) {
  14372. return new Inl(NoArguments.value);
  14373. }
  14374. ;
  14375. if (v instanceof Data_Maybe.Just) {
  14376. return new Inr(v.value0);
  14377. }
  14378. ;
  14379. throw new Error("Failed pattern match at Data.Generic.Rep (line 40, column 1 - line 47, column 49): " + [v.constructor.name]);
  14380. }, function (v) {
  14381. if (v instanceof Inl) {
  14382. return Data_Maybe.Nothing.value;
  14383. }
  14384. ;
  14385. if (v instanceof Inr) {
  14386. return new Data_Maybe.Just(v.value0);
  14387. }
  14388. ;
  14389. throw new Error("Failed pattern match at Data.Generic.Rep (line 40, column 1 - line 47, column 49): " + [v.constructor.name]);
  14390. });
  14391. var from = function from(dict) {
  14392. return dict.from;
  14393. };
  14394. module.exports = {
  14395. Generic: Generic,
  14396. to: to,
  14397. from: from,
  14398. NoArguments: NoArguments,
  14399. Inl: Inl,
  14400. Inr: Inr,
  14401. Product: Product,
  14402. Constructor: Constructor,
  14403. Argument: Argument,
  14404. genericMaybe: genericMaybe
  14405. };
  14406. },{"../Data.Maybe/index.js":"../output/Data.Maybe/index.js"}],"../output/Data.Array/foreign.js":[function(require,module,exports) {
  14407. "use strict"; //------------------------------------------------------------------------------
  14408. // Array creation --------------------------------------------------------------
  14409. //------------------------------------------------------------------------------
  14410. exports.range = function (start) {
  14411. return function (end) {
  14412. var step = start > end ? -1 : 1;
  14413. var result = new Array(step * (end - start) + 1);
  14414. var i = start,
  14415. n = 0;
  14416. while (i !== end) {
  14417. result[n++] = i;
  14418. i += step;
  14419. }
  14420. result[n] = i;
  14421. return result;
  14422. };
  14423. };
  14424. var replicateFill = function replicateFill(count) {
  14425. return function (value) {
  14426. if (count < 1) {
  14427. return [];
  14428. }
  14429. var result = new Array(count);
  14430. return result.fill(value);
  14431. };
  14432. };
  14433. var replicatePolyfill = function replicatePolyfill(count) {
  14434. return function (value) {
  14435. var result = [];
  14436. var n = 0;
  14437. for (var i = 0; i < count; i++) {
  14438. result[n++] = value;
  14439. }
  14440. return result;
  14441. };
  14442. }; // In browsers that have Array.prototype.fill we use it, as it's faster.
  14443. exports.replicate = typeof Array.prototype.fill === "function" ? replicateFill : replicatePolyfill;
  14444. exports.fromFoldableImpl = function () {
  14445. function Cons(head, tail) {
  14446. this.head = head;
  14447. this.tail = tail;
  14448. }
  14449. var emptyList = {};
  14450. function curryCons(head) {
  14451. return function (tail) {
  14452. return new Cons(head, tail);
  14453. };
  14454. }
  14455. function listToArray(list) {
  14456. var result = [];
  14457. var count = 0;
  14458. var xs = list;
  14459. while (xs !== emptyList) {
  14460. result[count++] = xs.head;
  14461. xs = xs.tail;
  14462. }
  14463. return result;
  14464. }
  14465. return function (foldr) {
  14466. return function (xs) {
  14467. return listToArray(foldr(curryCons)(emptyList)(xs));
  14468. };
  14469. };
  14470. }(); //------------------------------------------------------------------------------
  14471. // Array size ------------------------------------------------------------------
  14472. //------------------------------------------------------------------------------
  14473. exports.length = function (xs) {
  14474. return xs.length;
  14475. }; //------------------------------------------------------------------------------
  14476. // Extending arrays ------------------------------------------------------------
  14477. //------------------------------------------------------------------------------
  14478. exports.cons = function (e) {
  14479. return function (l) {
  14480. return [e].concat(l);
  14481. };
  14482. };
  14483. exports.snoc = function (l) {
  14484. return function (e) {
  14485. var l1 = l.slice();
  14486. l1.push(e);
  14487. return l1;
  14488. };
  14489. }; //------------------------------------------------------------------------------
  14490. // Non-indexed reads -----------------------------------------------------------
  14491. //------------------------------------------------------------------------------
  14492. exports["uncons'"] = function (empty) {
  14493. return function (next) {
  14494. return function (xs) {
  14495. return xs.length === 0 ? empty({}) : next(xs[0])(xs.slice(1));
  14496. };
  14497. };
  14498. }; //------------------------------------------------------------------------------
  14499. // Indexed operations ----------------------------------------------------------
  14500. //------------------------------------------------------------------------------
  14501. exports.indexImpl = function (just) {
  14502. return function (nothing) {
  14503. return function (xs) {
  14504. return function (i) {
  14505. return i < 0 || i >= xs.length ? nothing : just(xs[i]);
  14506. };
  14507. };
  14508. };
  14509. };
  14510. exports.findIndexImpl = function (just) {
  14511. return function (nothing) {
  14512. return function (f) {
  14513. return function (xs) {
  14514. for (var i = 0, l = xs.length; i < l; i++) {
  14515. if (f(xs[i])) return just(i);
  14516. }
  14517. return nothing;
  14518. };
  14519. };
  14520. };
  14521. };
  14522. exports.findLastIndexImpl = function (just) {
  14523. return function (nothing) {
  14524. return function (f) {
  14525. return function (xs) {
  14526. for (var i = xs.length - 1; i >= 0; i--) {
  14527. if (f(xs[i])) return just(i);
  14528. }
  14529. return nothing;
  14530. };
  14531. };
  14532. };
  14533. };
  14534. exports._insertAt = function (just) {
  14535. return function (nothing) {
  14536. return function (i) {
  14537. return function (a) {
  14538. return function (l) {
  14539. if (i < 0 || i > l.length) return nothing;
  14540. var l1 = l.slice();
  14541. l1.splice(i, 0, a);
  14542. return just(l1);
  14543. };
  14544. };
  14545. };
  14546. };
  14547. };
  14548. exports._deleteAt = function (just) {
  14549. return function (nothing) {
  14550. return function (i) {
  14551. return function (l) {
  14552. if (i < 0 || i >= l.length) return nothing;
  14553. var l1 = l.slice();
  14554. l1.splice(i, 1);
  14555. return just(l1);
  14556. };
  14557. };
  14558. };
  14559. };
  14560. exports._updateAt = function (just) {
  14561. return function (nothing) {
  14562. return function (i) {
  14563. return function (a) {
  14564. return function (l) {
  14565. if (i < 0 || i >= l.length) return nothing;
  14566. var l1 = l.slice();
  14567. l1[i] = a;
  14568. return just(l1);
  14569. };
  14570. };
  14571. };
  14572. };
  14573. }; //------------------------------------------------------------------------------
  14574. // Transformations -------------------------------------------------------------
  14575. //------------------------------------------------------------------------------
  14576. exports.reverse = function (l) {
  14577. return l.slice().reverse();
  14578. };
  14579. exports.concat = function (xss) {
  14580. if (xss.length <= 10000) {
  14581. // This method is faster, but it crashes on big arrays.
  14582. // So we use it when can and fallback to simple variant otherwise.
  14583. return Array.prototype.concat.apply([], xss);
  14584. }
  14585. var result = [];
  14586. for (var i = 0, l = xss.length; i < l; i++) {
  14587. var xs = xss[i];
  14588. for (var j = 0, m = xs.length; j < m; j++) {
  14589. result.push(xs[j]);
  14590. }
  14591. }
  14592. return result;
  14593. };
  14594. exports.filter = function (f) {
  14595. return function (xs) {
  14596. return xs.filter(f);
  14597. };
  14598. };
  14599. exports.partition = function (f) {
  14600. return function (xs) {
  14601. var yes = [];
  14602. var no = [];
  14603. for (var i = 0; i < xs.length; i++) {
  14604. var x = xs[i];
  14605. if (f(x)) yes.push(x);else no.push(x);
  14606. }
  14607. return {
  14608. yes: yes,
  14609. no: no
  14610. };
  14611. };
  14612. }; //------------------------------------------------------------------------------
  14613. // Sorting ---------------------------------------------------------------------
  14614. //------------------------------------------------------------------------------
  14615. exports.sortImpl = function (f) {
  14616. return function (l) {
  14617. return l.slice().sort(function (x, y) {
  14618. return f(x)(y);
  14619. });
  14620. };
  14621. }; //------------------------------------------------------------------------------
  14622. // Subarrays -------------------------------------------------------------------
  14623. //------------------------------------------------------------------------------
  14624. exports.slice = function (s) {
  14625. return function (e) {
  14626. return function (l) {
  14627. return l.slice(s, e);
  14628. };
  14629. };
  14630. };
  14631. exports.take = function (n) {
  14632. return function (l) {
  14633. return n < 1 ? [] : l.slice(0, n);
  14634. };
  14635. };
  14636. exports.drop = function (n) {
  14637. return function (l) {
  14638. return n < 1 ? l : l.slice(n);
  14639. };
  14640. }; //------------------------------------------------------------------------------
  14641. // Zipping ---------------------------------------------------------------------
  14642. //------------------------------------------------------------------------------
  14643. exports.zipWith = function (f) {
  14644. return function (xs) {
  14645. return function (ys) {
  14646. var l = xs.length < ys.length ? xs.length : ys.length;
  14647. var result = new Array(l);
  14648. for (var i = 0; i < l; i++) {
  14649. result[i] = f(xs[i])(ys[i]);
  14650. }
  14651. return result;
  14652. };
  14653. };
  14654. }; //------------------------------------------------------------------------------
  14655. // Partial ---------------------------------------------------------------------
  14656. //------------------------------------------------------------------------------
  14657. exports.unsafeIndexImpl = function (xs) {
  14658. return function (n) {
  14659. return xs[n];
  14660. };
  14661. };
  14662. },{}],"../output/Control.Monad.ST.Internal/foreign.js":[function(require,module,exports) {
  14663. "use strict";
  14664. exports.map_ = function (f) {
  14665. return function (a) {
  14666. return function () {
  14667. return f(a());
  14668. };
  14669. };
  14670. };
  14671. exports.pure_ = function (a) {
  14672. return function () {
  14673. return a;
  14674. };
  14675. };
  14676. exports.bind_ = function (a) {
  14677. return function (f) {
  14678. return function () {
  14679. return f(a())();
  14680. };
  14681. };
  14682. };
  14683. exports.run = function (f) {
  14684. return f();
  14685. };
  14686. exports["while"] = function (f) {
  14687. return function (a) {
  14688. return function () {
  14689. while (f()) {
  14690. a();
  14691. }
  14692. };
  14693. };
  14694. };
  14695. exports["for"] = function (lo) {
  14696. return function (hi) {
  14697. return function (f) {
  14698. return function () {
  14699. for (var i = lo; i < hi; i++) {
  14700. f(i)();
  14701. }
  14702. };
  14703. };
  14704. };
  14705. };
  14706. exports.foreach = function (as) {
  14707. return function (f) {
  14708. return function () {
  14709. for (var i = 0, l = as.length; i < l; i++) {
  14710. f(as[i])();
  14711. }
  14712. };
  14713. };
  14714. };
  14715. exports.new = function (val) {
  14716. return function () {
  14717. return {
  14718. value: val
  14719. };
  14720. };
  14721. };
  14722. exports.read = function (ref) {
  14723. return function () {
  14724. return ref.value;
  14725. };
  14726. };
  14727. exports["modify'"] = function (f) {
  14728. return function (ref) {
  14729. return function () {
  14730. var t = f(ref.value);
  14731. ref.value = t.state;
  14732. return t.value;
  14733. };
  14734. };
  14735. };
  14736. exports.write = function (a) {
  14737. return function (ref) {
  14738. return function () {
  14739. return ref.value = a; // eslint-disable-line no-return-assign
  14740. };
  14741. };
  14742. };
  14743. },{}],"../output/Control.Monad.ST.Internal/index.js":[function(require,module,exports) {
  14744. // Generated by purs version 0.13.6
  14745. "use strict";
  14746. var $foreign = require("./foreign.js");
  14747. var Control_Applicative = require("../Control.Applicative/index.js");
  14748. var Control_Apply = require("../Control.Apply/index.js");
  14749. var Control_Bind = require("../Control.Bind/index.js");
  14750. var Control_Monad = require("../Control.Monad/index.js");
  14751. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  14752. var Data_Functor = require("../Data.Functor/index.js");
  14753. var Data_Unit = require("../Data.Unit/index.js");
  14754. var modify = function modify(f) {
  14755. return $foreign["modify'"](function (s) {
  14756. var s$prime = f(s);
  14757. return {
  14758. state: s$prime,
  14759. value: s$prime
  14760. };
  14761. });
  14762. };
  14763. var functorST = new Data_Functor.Functor($foreign.map_);
  14764. var monadST = new Control_Monad.Monad(function () {
  14765. return applicativeST;
  14766. }, function () {
  14767. return bindST;
  14768. });
  14769. var bindST = new Control_Bind.Bind(function () {
  14770. return applyST;
  14771. }, $foreign.bind_);
  14772. var applyST = new Control_Apply.Apply(function () {
  14773. return functorST;
  14774. }, Control_Monad.ap(monadST));
  14775. var applicativeST = new Control_Applicative.Applicative(function () {
  14776. return applyST;
  14777. }, $foreign.pure_);
  14778. var monadRecST = new Control_Monad_Rec_Class.MonadRec(function () {
  14779. return monadST;
  14780. }, function (f) {
  14781. return function (a) {
  14782. var isLooping = function isLooping(v) {
  14783. if (v instanceof Control_Monad_Rec_Class.Loop) {
  14784. return true;
  14785. }
  14786. ;
  14787. return false;
  14788. };
  14789. var fromDone = function fromDone(v) {
  14790. if (v instanceof Control_Monad_Rec_Class.Done) {
  14791. return v.value0;
  14792. }
  14793. ;
  14794. throw new Error("Failed pattern match at Control.Monad.ST.Internal (line 54, column 32 - line 54, column 46): " + [v.constructor.name]);
  14795. };
  14796. return Control_Bind.bind(bindST)(Control_Bind.bindFlipped(bindST)($foreign["new"])(f(a)))(function (r) {
  14797. 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) {
  14798. if (v instanceof Control_Monad_Rec_Class.Loop) {
  14799. return Control_Bind.bind(bindST)(f(v.value0))(function (e) {
  14800. return Data_Functor["void"](functorST)($foreign.write(e)(r));
  14801. });
  14802. }
  14803. ;
  14804. if (v instanceof Control_Monad_Rec_Class.Done) {
  14805. return Control_Applicative.pure(applicativeST)(Data_Unit.unit);
  14806. }
  14807. ;
  14808. throw new Error("Failed pattern match at Control.Monad.ST.Internal (line 46, column 18 - line 50, column 28): " + [v.constructor.name]);
  14809. })))(function () {
  14810. return Data_Functor.map(functorST)(fromDone)($foreign.read(r));
  14811. });
  14812. });
  14813. };
  14814. });
  14815. module.exports = {
  14816. modify: modify,
  14817. functorST: functorST,
  14818. applyST: applyST,
  14819. applicativeST: applicativeST,
  14820. bindST: bindST,
  14821. monadST: monadST,
  14822. monadRecST: monadRecST,
  14823. map_: $foreign.map_,
  14824. pure_: $foreign.pure_,
  14825. bind_: $foreign.bind_,
  14826. run: $foreign.run,
  14827. "while": $foreign["while"],
  14828. "for": $foreign["for"],
  14829. foreach: $foreign.foreach,
  14830. "new": $foreign["new"],
  14831. read: $foreign.read,
  14832. "modify'": $foreign["modify'"],
  14833. write: $foreign.write
  14834. };
  14835. },{"./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) {
  14836. "use strict";
  14837. exports.empty = function () {
  14838. return [];
  14839. };
  14840. exports.peekImpl = function (just) {
  14841. return function (nothing) {
  14842. return function (i) {
  14843. return function (xs) {
  14844. return function () {
  14845. return i >= 0 && i < xs.length ? just(xs[i]) : nothing;
  14846. };
  14847. };
  14848. };
  14849. };
  14850. };
  14851. exports.poke = function (i) {
  14852. return function (a) {
  14853. return function (xs) {
  14854. return function () {
  14855. var ret = i >= 0 && i < xs.length;
  14856. if (ret) xs[i] = a;
  14857. return ret;
  14858. };
  14859. };
  14860. };
  14861. };
  14862. exports.popImpl = function (just) {
  14863. return function (nothing) {
  14864. return function (xs) {
  14865. return function () {
  14866. return xs.length > 0 ? just(xs.pop()) : nothing;
  14867. };
  14868. };
  14869. };
  14870. };
  14871. exports.pushAll = function (as) {
  14872. return function (xs) {
  14873. return function () {
  14874. return xs.push.apply(xs, as);
  14875. };
  14876. };
  14877. };
  14878. exports.shiftImpl = function (just) {
  14879. return function (nothing) {
  14880. return function (xs) {
  14881. return function () {
  14882. return xs.length > 0 ? just(xs.shift()) : nothing;
  14883. };
  14884. };
  14885. };
  14886. };
  14887. exports.unshiftAll = function (as) {
  14888. return function (xs) {
  14889. return function () {
  14890. return xs.unshift.apply(xs, as);
  14891. };
  14892. };
  14893. };
  14894. exports.splice = function (i) {
  14895. return function (howMany) {
  14896. return function (bs) {
  14897. return function (xs) {
  14898. return function () {
  14899. return xs.splice.apply(xs, [i, howMany].concat(bs));
  14900. };
  14901. };
  14902. };
  14903. };
  14904. };
  14905. exports.unsafeFreeze = function (xs) {
  14906. return function () {
  14907. return xs;
  14908. };
  14909. };
  14910. exports.unsafeThaw = function (xs) {
  14911. return function () {
  14912. return xs;
  14913. };
  14914. };
  14915. function copyImpl(xs) {
  14916. return function () {
  14917. return xs.slice();
  14918. };
  14919. }
  14920. exports.freeze = copyImpl;
  14921. exports.thaw = copyImpl;
  14922. exports.sortByImpl = function (comp) {
  14923. return function (xs) {
  14924. return function () {
  14925. return xs.sort(function (x, y) {
  14926. return comp(x)(y);
  14927. });
  14928. };
  14929. };
  14930. };
  14931. exports.toAssocArray = function (xs) {
  14932. return function () {
  14933. var n = xs.length;
  14934. var as = new Array(n);
  14935. for (var i = 0; i < n; i++) {
  14936. as[i] = {
  14937. value: xs[i],
  14938. index: i
  14939. };
  14940. }
  14941. return as;
  14942. };
  14943. };
  14944. },{}],"../output/Data.Array.ST/index.js":[function(require,module,exports) {
  14945. // Generated by purs version 0.13.6
  14946. "use strict";
  14947. var $foreign = require("./foreign.js");
  14948. var Control_Bind = require("../Control.Bind/index.js");
  14949. var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
  14950. var Data_Maybe = require("../Data.Maybe/index.js");
  14951. var Data_Ord = require("../Data.Ord/index.js");
  14952. var Data_Ordering = require("../Data.Ordering/index.js");
  14953. var withArray = function withArray(f) {
  14954. return function (xs) {
  14955. return function __do() {
  14956. var result = $foreign.thaw(xs)();
  14957. f(result)();
  14958. return $foreign.unsafeFreeze(result)();
  14959. };
  14960. };
  14961. };
  14962. var unshift = function unshift(a) {
  14963. return $foreign.unshiftAll([a]);
  14964. };
  14965. var sortBy = function sortBy(comp) {
  14966. var comp$prime = function comp$prime(x) {
  14967. return function (y) {
  14968. var v = comp(x)(y);
  14969. if (v instanceof Data_Ordering.GT) {
  14970. return 1;
  14971. }
  14972. ;
  14973. if (v instanceof Data_Ordering.EQ) {
  14974. return 0;
  14975. }
  14976. ;
  14977. if (v instanceof Data_Ordering.LT) {
  14978. return -1 | 0;
  14979. }
  14980. ;
  14981. throw new Error("Failed pattern match at Data.Array.ST (line 105, column 15 - line 108, column 13): " + [v.constructor.name]);
  14982. };
  14983. };
  14984. return $foreign.sortByImpl(comp$prime);
  14985. };
  14986. var sortWith = function sortWith(dictOrd) {
  14987. return function (f) {
  14988. return sortBy(Data_Ord.comparing(dictOrd)(f));
  14989. };
  14990. };
  14991. var sort = function sort(dictOrd) {
  14992. return sortBy(Data_Ord.compare(dictOrd));
  14993. };
  14994. var shift = $foreign.shiftImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  14995. var run = function run(st) {
  14996. return Control_Bind.bind(Control_Monad_ST_Internal.bindST)(st)($foreign.unsafeFreeze)();
  14997. };
  14998. var push = function push(a) {
  14999. return $foreign.pushAll([a]);
  15000. };
  15001. var pop = $foreign.popImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15002. var peek = $foreign.peekImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15003. var modify = function modify(i) {
  15004. return function (f) {
  15005. return function (xs) {
  15006. return function __do() {
  15007. var entry = peek(i)(xs)();
  15008. if (entry instanceof Data_Maybe.Just) {
  15009. return $foreign.poke(i)(f(entry.value0))(xs)();
  15010. }
  15011. ;
  15012. if (entry instanceof Data_Maybe.Nothing) {
  15013. return false;
  15014. }
  15015. ;
  15016. throw new Error("Failed pattern match at Data.Array.ST (line 188, column 3 - line 190, column 26): " + [entry.constructor.name]);
  15017. };
  15018. };
  15019. };
  15020. };
  15021. module.exports = {
  15022. run: run,
  15023. withArray: withArray,
  15024. peek: peek,
  15025. modify: modify,
  15026. pop: pop,
  15027. push: push,
  15028. shift: shift,
  15029. unshift: unshift,
  15030. sort: sort,
  15031. sortBy: sortBy,
  15032. sortWith: sortWith,
  15033. empty: $foreign.empty,
  15034. poke: $foreign.poke,
  15035. pushAll: $foreign.pushAll,
  15036. unshiftAll: $foreign.unshiftAll,
  15037. splice: $foreign.splice,
  15038. freeze: $foreign.freeze,
  15039. thaw: $foreign.thaw,
  15040. unsafeFreeze: $foreign.unsafeFreeze,
  15041. unsafeThaw: $foreign.unsafeThaw,
  15042. toAssocArray: $foreign.toAssocArray
  15043. };
  15044. },{"./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) {
  15045. // Generated by purs version 0.13.6
  15046. "use strict";
  15047. var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
  15048. var Data_Array_ST = require("../Data.Array.ST/index.js");
  15049. var Data_Function = require("../Data.Function/index.js");
  15050. var Data_Functor = require("../Data.Functor/index.js");
  15051. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  15052. var Data_Maybe = require("../Data.Maybe/index.js");
  15053. var Iterator = function () {
  15054. function Iterator(value0, value1) {
  15055. this.value0 = value0;
  15056. this.value1 = value1;
  15057. }
  15058. ;
  15059. Iterator.create = function (value0) {
  15060. return function (value1) {
  15061. return new Iterator(value0, value1);
  15062. };
  15063. };
  15064. return Iterator;
  15065. }();
  15066. var peek = function peek(v) {
  15067. return function __do() {
  15068. var i = Control_Monad_ST_Internal.read(v.value1)();
  15069. return v.value0(i);
  15070. };
  15071. };
  15072. var next = function next(v) {
  15073. return function __do() {
  15074. var i = Control_Monad_ST_Internal.read(v.value1)();
  15075. Control_Monad_ST_Internal.modify(function (v1) {
  15076. return v1 + 1 | 0;
  15077. })(v.value1)();
  15078. return v.value0(i);
  15079. };
  15080. };
  15081. var pushWhile = function pushWhile(p) {
  15082. return function (iter) {
  15083. return function (array) {
  15084. return function __do() {
  15085. var $$break = Control_Monad_ST_Internal["new"](false)();
  15086. while (Data_Functor.map(Control_Monad_ST_Internal.functorST)(Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean))(Control_Monad_ST_Internal.read($$break))()) {
  15087. (function __do() {
  15088. var mx = peek(iter)();
  15089. if (mx instanceof Data_Maybe.Just && p(mx.value0)) {
  15090. Data_Array_ST.push(mx.value0)(array)();
  15091. return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(next(iter))();
  15092. }
  15093. ;
  15094. return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Control_Monad_ST_Internal.write(true)($$break))();
  15095. })();
  15096. }
  15097. ;
  15098. return {};
  15099. };
  15100. };
  15101. };
  15102. };
  15103. var pushAll = pushWhile(Data_Function["const"](true));
  15104. var iterator = function iterator(f) {
  15105. return Data_Functor.map(Control_Monad_ST_Internal.functorST)(Iterator.create(f))(Control_Monad_ST_Internal["new"](0));
  15106. };
  15107. var iterate = function iterate(iter) {
  15108. return function (f) {
  15109. return function __do() {
  15110. var $$break = Control_Monad_ST_Internal["new"](false)();
  15111. while (Data_Functor.map(Control_Monad_ST_Internal.functorST)(Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean))(Control_Monad_ST_Internal.read($$break))()) {
  15112. (function __do() {
  15113. var mx = next(iter)();
  15114. if (mx instanceof Data_Maybe.Just) {
  15115. return f(mx.value0)();
  15116. }
  15117. ;
  15118. if (mx instanceof Data_Maybe.Nothing) {
  15119. return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Control_Monad_ST_Internal.write(true)($$break))();
  15120. }
  15121. ;
  15122. throw new Error("Failed pattern match at Data.Array.ST.Iterator (line 42, column 5 - line 44, column 47): " + [mx.constructor.name]);
  15123. })();
  15124. }
  15125. ;
  15126. return {};
  15127. };
  15128. };
  15129. };
  15130. var exhausted = function () {
  15131. var $13 = Data_Functor.map(Control_Monad_ST_Internal.functorST)(Data_Maybe.isNothing);
  15132. return function ($14) {
  15133. return $13(peek($14));
  15134. };
  15135. }();
  15136. module.exports = {
  15137. iterator: iterator,
  15138. iterate: iterate,
  15139. next: next,
  15140. peek: peek,
  15141. exhausted: exhausted,
  15142. pushWhile: pushWhile,
  15143. pushAll: pushAll
  15144. };
  15145. },{"../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) {
  15146. // Generated by purs version 0.13.6
  15147. "use strict";
  15148. var $foreign = require("./foreign.js");
  15149. var Control_Alt = require("../Control.Alt/index.js");
  15150. var Control_Applicative = require("../Control.Applicative/index.js");
  15151. var Control_Apply = require("../Control.Apply/index.js");
  15152. var Control_Bind = require("../Control.Bind/index.js");
  15153. var Control_Category = require("../Control.Category/index.js");
  15154. var Control_Lazy = require("../Control.Lazy/index.js");
  15155. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  15156. var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
  15157. var Data_Array_ST = require("../Data.Array.ST/index.js");
  15158. var Data_Array_ST_Iterator = require("../Data.Array.ST.Iterator/index.js");
  15159. var Data_Boolean = require("../Data.Boolean/index.js");
  15160. var Data_Eq = require("../Data.Eq/index.js");
  15161. var Data_Foldable = require("../Data.Foldable/index.js");
  15162. var Data_Function = require("../Data.Function/index.js");
  15163. var Data_Functor = require("../Data.Functor/index.js");
  15164. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  15165. var Data_Maybe = require("../Data.Maybe/index.js");
  15166. var Data_Ord = require("../Data.Ord/index.js");
  15167. var Data_Ordering = require("../Data.Ordering/index.js");
  15168. var Data_Semigroup = require("../Data.Semigroup/index.js");
  15169. var Data_Traversable = require("../Data.Traversable/index.js");
  15170. var Data_Tuple = require("../Data.Tuple/index.js");
  15171. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  15172. var zipWithA = function zipWithA(dictApplicative) {
  15173. return function (f) {
  15174. return function (xs) {
  15175. return function (ys) {
  15176. return Data_Traversable.sequence(Data_Traversable.traversableArray)(dictApplicative)($foreign.zipWith(f)(xs)(ys));
  15177. };
  15178. };
  15179. };
  15180. };
  15181. var zip = $foreign.zipWith(Data_Tuple.Tuple.create);
  15182. var updateAtIndices = function updateAtIndices(dictFoldable) {
  15183. return function (us) {
  15184. return function (xs) {
  15185. return Data_Array_ST.withArray(function (res) {
  15186. return Data_Foldable.traverse_(Control_Monad_ST_Internal.applicativeST)(dictFoldable)(function (v) {
  15187. return Data_Array_ST.poke(v.value0)(v.value1)(res);
  15188. })(us);
  15189. })(xs)();
  15190. };
  15191. };
  15192. };
  15193. var updateAt = $foreign["_updateAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15194. var unsafeIndex = function unsafeIndex(dictPartial) {
  15195. return $foreign.unsafeIndexImpl;
  15196. };
  15197. var uncons = $foreign["uncons'"](Data_Function["const"](Data_Maybe.Nothing.value))(function (x) {
  15198. return function (xs) {
  15199. return new Data_Maybe.Just({
  15200. head: x,
  15201. tail: xs
  15202. });
  15203. };
  15204. });
  15205. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  15206. return function (xs) {
  15207. var len = $foreign.length(xs);
  15208. var f = function f(i) {
  15209. if (i < len) {
  15210. return new Data_Maybe.Just(new Data_Tuple.Tuple(unsafeIndex()(xs)(i), i + 1 | 0));
  15211. }
  15212. ;
  15213. if (Data_Boolean.otherwise) {
  15214. return Data_Maybe.Nothing.value;
  15215. }
  15216. ;
  15217. throw new Error("Failed pattern match at Data.Array (line 143, column 3 - line 145, column 26): " + [i.constructor.name]);
  15218. };
  15219. return Data_Unfoldable.unfoldr(dictUnfoldable)(f)(0);
  15220. };
  15221. };
  15222. var takeEnd = function takeEnd(n) {
  15223. return function (xs) {
  15224. return $foreign.drop($foreign.length(xs) - n | 0)(xs);
  15225. };
  15226. };
  15227. var tail = $foreign["uncons'"](Data_Function["const"](Data_Maybe.Nothing.value))(function (v) {
  15228. return function (xs) {
  15229. return new Data_Maybe.Just(xs);
  15230. };
  15231. });
  15232. var sortBy = function sortBy(comp) {
  15233. return function (xs) {
  15234. var comp$prime = function comp$prime(x) {
  15235. return function (y) {
  15236. var v = comp(x)(y);
  15237. if (v instanceof Data_Ordering.GT) {
  15238. return 1;
  15239. }
  15240. ;
  15241. if (v instanceof Data_Ordering.EQ) {
  15242. return 0;
  15243. }
  15244. ;
  15245. if (v instanceof Data_Ordering.LT) {
  15246. return -1 | 0;
  15247. }
  15248. ;
  15249. throw new Error("Failed pattern match at Data.Array (line 702, column 15 - line 705, column 13): " + [v.constructor.name]);
  15250. };
  15251. };
  15252. return $foreign.sortImpl(comp$prime)(xs);
  15253. };
  15254. };
  15255. var sortWith = function sortWith(dictOrd) {
  15256. return function (f) {
  15257. return sortBy(Data_Ord.comparing(dictOrd)(f));
  15258. };
  15259. };
  15260. var sort = function sort(dictOrd) {
  15261. return function (xs) {
  15262. return sortBy(Data_Ord.compare(dictOrd))(xs);
  15263. };
  15264. };
  15265. var singleton = function singleton(a) {
  15266. return [a];
  15267. };
  15268. var $$null = function $$null(xs) {
  15269. return $foreign.length(xs) === 0;
  15270. };
  15271. var nubByEq = function nubByEq(eq) {
  15272. return function (xs) {
  15273. return function __do() {
  15274. var arr = Data_Array_ST.empty();
  15275. Control_Monad_ST_Internal.foreach(xs)(function (x) {
  15276. return function __do() {
  15277. var e = Data_Functor.map(Control_Monad_ST_Internal.functorST)(function () {
  15278. var $84 = Data_HeytingAlgebra.not(Data_HeytingAlgebra.heytingAlgebraBoolean);
  15279. var $85 = Data_Foldable.any(Data_Foldable.foldableArray)(Data_HeytingAlgebra.heytingAlgebraBoolean)(function (v) {
  15280. return eq(v)(x);
  15281. });
  15282. return function ($86) {
  15283. return $84($85($86));
  15284. };
  15285. }())(Data_Array_ST.unsafeFreeze(arr))();
  15286. return Control_Applicative.when(Control_Monad_ST_Internal.applicativeST)(e)(Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(x)(arr)))();
  15287. };
  15288. })();
  15289. return Data_Array_ST.unsafeFreeze(arr)();
  15290. }();
  15291. };
  15292. };
  15293. var nubEq = function nubEq(dictEq) {
  15294. return nubByEq(Data_Eq.eq(dictEq));
  15295. };
  15296. var modifyAtIndices = function modifyAtIndices(dictFoldable) {
  15297. return function (is) {
  15298. return function (f) {
  15299. return function (xs) {
  15300. return Data_Array_ST.withArray(function (res) {
  15301. return Data_Foldable.traverse_(Control_Monad_ST_Internal.applicativeST)(dictFoldable)(function (i) {
  15302. return Data_Array_ST.modify(i)(f)(res);
  15303. })(is);
  15304. })(xs)();
  15305. };
  15306. };
  15307. };
  15308. };
  15309. var mapWithIndex = function mapWithIndex(f) {
  15310. return function (xs) {
  15311. return $foreign.zipWith(f)($foreign.range(0)($foreign.length(xs) - 1 | 0))(xs);
  15312. };
  15313. };
  15314. var some = function some(dictAlternative) {
  15315. return function (dictLazy) {
  15316. return function (v) {
  15317. return Control_Apply.apply(dictAlternative.Applicative0().Apply0())(Data_Functor.map(dictAlternative.Plus1().Alt0().Functor0())($foreign.cons)(v))(Control_Lazy.defer(dictLazy)(function (v1) {
  15318. return many(dictAlternative)(dictLazy)(v);
  15319. }));
  15320. };
  15321. };
  15322. };
  15323. var many = function many(dictAlternative) {
  15324. return function (dictLazy) {
  15325. return function (v) {
  15326. return Control_Alt.alt(dictAlternative.Plus1().Alt0())(some(dictAlternative)(dictLazy)(v))(Control_Applicative.pure(dictAlternative.Applicative0())([]));
  15327. };
  15328. };
  15329. };
  15330. var insertAt = $foreign["_insertAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15331. var init = function init(xs) {
  15332. if ($$null(xs)) {
  15333. return Data_Maybe.Nothing.value;
  15334. }
  15335. ;
  15336. if (Data_Boolean.otherwise) {
  15337. return new Data_Maybe.Just($foreign.slice(0)($foreign.length(xs) - 1 | 0)(xs));
  15338. }
  15339. ;
  15340. throw new Error("Failed pattern match at Data.Array (line 323, column 1 - line 323, column 45): " + [xs.constructor.name]);
  15341. };
  15342. var index = $foreign.indexImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15343. var last = function last(xs) {
  15344. return index(xs)($foreign.length(xs) - 1 | 0);
  15345. };
  15346. var unsnoc = function unsnoc(xs) {
  15347. return Control_Apply.apply(Data_Maybe.applyMaybe)(Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
  15348. return function (v1) {
  15349. return {
  15350. init: v,
  15351. last: v1
  15352. };
  15353. };
  15354. })(init(xs)))(last(xs));
  15355. };
  15356. var modifyAt = function modifyAt(i) {
  15357. return function (f) {
  15358. return function (xs) {
  15359. var go = function go(x) {
  15360. return updateAt(i)(f(x))(xs);
  15361. };
  15362. return Data_Maybe.maybe(Data_Maybe.Nothing.value)(go)(index(xs)(i));
  15363. };
  15364. };
  15365. };
  15366. var span = function span(p) {
  15367. return function (arr) {
  15368. var go = function go($copy_i) {
  15369. var $tco_done = false;
  15370. var $tco_result;
  15371. function $tco_loop(i) {
  15372. var v = index(arr)(i);
  15373. if (v instanceof Data_Maybe.Just) {
  15374. var $60 = p(v.value0);
  15375. if ($60) {
  15376. $copy_i = i + 1 | 0;
  15377. return;
  15378. }
  15379. ;
  15380. $tco_done = true;
  15381. return new Data_Maybe.Just(i);
  15382. }
  15383. ;
  15384. if (v instanceof Data_Maybe.Nothing) {
  15385. $tco_done = true;
  15386. return Data_Maybe.Nothing.value;
  15387. }
  15388. ;
  15389. throw new Error("Failed pattern match at Data.Array (line 834, column 5 - line 836, column 25): " + [v.constructor.name]);
  15390. }
  15391. ;
  15392. while (!$tco_done) {
  15393. $tco_result = $tco_loop($copy_i);
  15394. }
  15395. ;
  15396. return $tco_result;
  15397. };
  15398. var breakIndex = go(0);
  15399. if (breakIndex instanceof Data_Maybe.Just && breakIndex.value0 === 0) {
  15400. return {
  15401. init: [],
  15402. rest: arr
  15403. };
  15404. }
  15405. ;
  15406. if (breakIndex instanceof Data_Maybe.Just) {
  15407. return {
  15408. init: $foreign.slice(0)(breakIndex.value0)(arr),
  15409. rest: $foreign.slice(breakIndex.value0)($foreign.length(arr))(arr)
  15410. };
  15411. }
  15412. ;
  15413. if (breakIndex instanceof Data_Maybe.Nothing) {
  15414. return {
  15415. init: arr,
  15416. rest: []
  15417. };
  15418. }
  15419. ;
  15420. throw new Error("Failed pattern match at Data.Array (line 821, column 3 - line 827, column 30): " + [breakIndex.constructor.name]);
  15421. };
  15422. };
  15423. var takeWhile = function takeWhile(p) {
  15424. return function (xs) {
  15425. return span(p)(xs).init;
  15426. };
  15427. };
  15428. var unzip = function unzip(xs) {
  15429. return function __do() {
  15430. var fsts = Data_Array_ST.empty();
  15431. var snds = Data_Array_ST.empty();
  15432. var iter = Data_Array_ST_Iterator.iterator(function (v) {
  15433. return index(xs)(v);
  15434. })();
  15435. Data_Array_ST_Iterator.iterate(iter)(function (v) {
  15436. return function __do() {
  15437. Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(v.value0)(fsts))();
  15438. return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Data_Array_ST.push(v.value1)(snds))();
  15439. };
  15440. })();
  15441. var fsts$prime = Data_Array_ST.unsafeFreeze(fsts)();
  15442. var snds$prime = Data_Array_ST.unsafeFreeze(snds)();
  15443. return new Data_Tuple.Tuple(fsts$prime, snds$prime);
  15444. }();
  15445. };
  15446. var head = function head(xs) {
  15447. return index(xs)(0);
  15448. };
  15449. var nubBy = function nubBy(comp) {
  15450. return function (xs) {
  15451. var indexedAndSorted = sortBy(function (x) {
  15452. return function (y) {
  15453. return comp(Data_Tuple.snd(x))(Data_Tuple.snd(y));
  15454. };
  15455. })(mapWithIndex(Data_Tuple.Tuple.create)(xs));
  15456. var v = head(indexedAndSorted);
  15457. if (v instanceof Data_Maybe.Nothing) {
  15458. return [];
  15459. }
  15460. ;
  15461. if (v instanceof Data_Maybe.Just) {
  15462. return Data_Functor.map(Data_Functor.functorArray)(Data_Tuple.snd)(sortWith(Data_Ord.ordInt)(Data_Tuple.fst)(function __do() {
  15463. var result = Data_Array_ST.unsafeThaw(singleton(v.value0))();
  15464. Control_Monad_ST_Internal.foreach(indexedAndSorted)(function (v1) {
  15465. return function __do() {
  15466. var lst = Data_Functor.map(Control_Monad_ST_Internal.functorST)(function () {
  15467. var $87 = function (dictPartial) {
  15468. var $89 = Data_Maybe.fromJust();
  15469. return function ($90) {
  15470. return $89(last($90));
  15471. };
  15472. }();
  15473. return function ($88) {
  15474. return Data_Tuple.snd($87($88));
  15475. };
  15476. }())(Data_Array_ST.unsafeFreeze(result))();
  15477. 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)))();
  15478. };
  15479. })();
  15480. return Data_Array_ST.unsafeFreeze(result)();
  15481. }()));
  15482. }
  15483. ;
  15484. throw new Error("Failed pattern match at Data.Array (line 903, column 17 - line 911, column 29): " + [v.constructor.name]);
  15485. };
  15486. };
  15487. var nub = function nub(dictOrd) {
  15488. return nubBy(Data_Ord.compare(dictOrd));
  15489. };
  15490. var groupBy = function groupBy(op) {
  15491. return function (xs) {
  15492. return function __do() {
  15493. var result = Data_Array_ST.empty();
  15494. var iter = Data_Array_ST_Iterator.iterator(function (v) {
  15495. return index(xs)(v);
  15496. })();
  15497. Data_Array_ST_Iterator.iterate(iter)(function (x) {
  15498. return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(function __do() {
  15499. var sub = Data_Array_ST.empty();
  15500. Data_Array_ST.push(x)(sub)();
  15501. Data_Array_ST_Iterator.pushWhile(op(x))(iter)(sub)();
  15502. var grp = Data_Array_ST.unsafeFreeze(sub)();
  15503. return Data_Array_ST.push(grp)(result)();
  15504. });
  15505. })();
  15506. return Data_Array_ST.unsafeFreeze(result)();
  15507. }();
  15508. };
  15509. };
  15510. var group = function group(dictEq) {
  15511. return function (xs) {
  15512. return groupBy(Data_Eq.eq(dictEq))(xs);
  15513. };
  15514. };
  15515. var group$prime = function group$prime(dictOrd) {
  15516. var $91 = group(dictOrd.Eq0());
  15517. var $92 = sort(dictOrd);
  15518. return function ($93) {
  15519. return $91($92($93));
  15520. };
  15521. };
  15522. var fromFoldable = function fromFoldable(dictFoldable) {
  15523. return $foreign.fromFoldableImpl(Data_Foldable.foldr(dictFoldable));
  15524. };
  15525. var foldRecM = function foldRecM(dictMonadRec) {
  15526. return function (f) {
  15527. return function (a) {
  15528. return function (array) {
  15529. var go = function go(res) {
  15530. return function (i) {
  15531. if (i >= $foreign.length(array)) {
  15532. return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(new Control_Monad_Rec_Class.Done(res));
  15533. }
  15534. ;
  15535. if (Data_Boolean.otherwise) {
  15536. return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(f(res)(unsafeIndex()(array)(i)))(function (res$prime) {
  15537. return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(new Control_Monad_Rec_Class.Loop({
  15538. a: res$prime,
  15539. b: i + 1 | 0
  15540. }));
  15541. });
  15542. }
  15543. ;
  15544. throw new Error("Failed pattern match at Data.Array (line 1101, column 3 - line 1105, column 42): " + [res.constructor.name, i.constructor.name]);
  15545. };
  15546. };
  15547. return Control_Monad_Rec_Class.tailRecM2(dictMonadRec)(go)(a)(0);
  15548. };
  15549. };
  15550. };
  15551. };
  15552. var foldM = function foldM(dictMonad) {
  15553. return function (f) {
  15554. return function (a) {
  15555. return $foreign["uncons'"](function (v) {
  15556. return Control_Applicative.pure(dictMonad.Applicative0())(a);
  15557. })(function (b) {
  15558. return function (bs) {
  15559. return Control_Bind.bind(dictMonad.Bind1())(f(a)(b))(function (a$prime) {
  15560. return foldM(dictMonad)(f)(a$prime)(bs);
  15561. });
  15562. };
  15563. });
  15564. };
  15565. };
  15566. };
  15567. var findLastIndex = $foreign.findLastIndexImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15568. var insertBy = function insertBy(cmp) {
  15569. return function (x) {
  15570. return function (ys) {
  15571. var i = Data_Maybe.maybe(0)(function (v) {
  15572. return v + 1 | 0;
  15573. })(findLastIndex(function (y) {
  15574. return Data_Eq.eq(Data_Ordering.eqOrdering)(cmp(x)(y))(Data_Ordering.GT.value);
  15575. })(ys));
  15576. return Data_Maybe.fromJust()(insertAt(i)(x)(ys));
  15577. };
  15578. };
  15579. };
  15580. var insert = function insert(dictOrd) {
  15581. return insertBy(Data_Ord.compare(dictOrd));
  15582. };
  15583. var findIndex = $foreign.findIndexImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15584. var intersectBy = function intersectBy(eq) {
  15585. return function (xs) {
  15586. return function (ys) {
  15587. return $foreign.filter(function (x) {
  15588. return Data_Maybe.isJust(findIndex(eq(x))(ys));
  15589. })(xs);
  15590. };
  15591. };
  15592. };
  15593. var intersect = function intersect(dictEq) {
  15594. return intersectBy(Data_Eq.eq(dictEq));
  15595. };
  15596. var elemLastIndex = function elemLastIndex(dictEq) {
  15597. return function (x) {
  15598. return findLastIndex(function (v) {
  15599. return Data_Eq.eq(dictEq)(v)(x);
  15600. });
  15601. };
  15602. };
  15603. var elemIndex = function elemIndex(dictEq) {
  15604. return function (x) {
  15605. return findIndex(function (v) {
  15606. return Data_Eq.eq(dictEq)(v)(x);
  15607. });
  15608. };
  15609. };
  15610. var dropWhile = function dropWhile(p) {
  15611. return function (xs) {
  15612. return span(p)(xs).rest;
  15613. };
  15614. };
  15615. var dropEnd = function dropEnd(n) {
  15616. return function (xs) {
  15617. return $foreign.take($foreign.length(xs) - n | 0)(xs);
  15618. };
  15619. };
  15620. var deleteAt = $foreign["_deleteAt"](Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  15621. var deleteBy = function deleteBy(v) {
  15622. return function (v1) {
  15623. return function (v2) {
  15624. if (v2.length === 0) {
  15625. return [];
  15626. }
  15627. ;
  15628. return Data_Maybe.maybe(v2)(function (i) {
  15629. return Data_Maybe.fromJust()(deleteAt(i)(v2));
  15630. })(findIndex(v(v1))(v2));
  15631. };
  15632. };
  15633. };
  15634. var unionBy = function unionBy(eq) {
  15635. return function (xs) {
  15636. return function (ys) {
  15637. return Data_Semigroup.append(Data_Semigroup.semigroupArray)(xs)(Data_Foldable.foldl(Data_Foldable.foldableArray)(Data_Function.flip(deleteBy(eq)))(nubByEq(eq)(ys))(xs));
  15638. };
  15639. };
  15640. };
  15641. var union = function union(dictEq) {
  15642. return unionBy(Data_Eq.eq(dictEq));
  15643. };
  15644. var $$delete = function $$delete(dictEq) {
  15645. return deleteBy(Data_Eq.eq(dictEq));
  15646. };
  15647. var difference = function difference(dictEq) {
  15648. return Data_Foldable.foldr(Data_Foldable.foldableArray)($$delete(dictEq));
  15649. };
  15650. var concatMap = Data_Function.flip(Control_Bind.bind(Control_Bind.bindArray));
  15651. var mapMaybe = function mapMaybe(f) {
  15652. return concatMap(function () {
  15653. var $94 = Data_Maybe.maybe([])(singleton);
  15654. return function ($95) {
  15655. return $94(f($95));
  15656. };
  15657. }());
  15658. };
  15659. var filterA = function filterA(dictApplicative) {
  15660. return function (p) {
  15661. var $96 = Data_Functor.map(dictApplicative.Apply0().Functor0())(mapMaybe(function (v) {
  15662. if (v.value1) {
  15663. return new Data_Maybe.Just(v.value0);
  15664. }
  15665. ;
  15666. return Data_Maybe.Nothing.value;
  15667. }));
  15668. var $97 = Data_Traversable.traverse(Data_Traversable.traversableArray)(dictApplicative)(function (x) {
  15669. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Tuple.Tuple.create(x))(p(x));
  15670. });
  15671. return function ($98) {
  15672. return $96($97($98));
  15673. };
  15674. };
  15675. };
  15676. var catMaybes = mapMaybe(Control_Category.identity(Control_Category.categoryFn));
  15677. var alterAt = function alterAt(i) {
  15678. return function (f) {
  15679. return function (xs) {
  15680. var go = function go(x) {
  15681. var v = f(x);
  15682. if (v instanceof Data_Maybe.Nothing) {
  15683. return deleteAt(i)(xs);
  15684. }
  15685. ;
  15686. if (v instanceof Data_Maybe.Just) {
  15687. return updateAt(i)(v.value0)(xs);
  15688. }
  15689. ;
  15690. throw new Error("Failed pattern match at Data.Array (line 544, column 10 - line 546, column 32): " + [v.constructor.name]);
  15691. };
  15692. return Data_Maybe.maybe(Data_Maybe.Nothing.value)(go)(index(xs)(i));
  15693. };
  15694. };
  15695. };
  15696. module.exports = {
  15697. fromFoldable: fromFoldable,
  15698. toUnfoldable: toUnfoldable,
  15699. singleton: singleton,
  15700. some: some,
  15701. many: many,
  15702. "null": $$null,
  15703. insert: insert,
  15704. insertBy: insertBy,
  15705. head: head,
  15706. last: last,
  15707. tail: tail,
  15708. init: init,
  15709. uncons: uncons,
  15710. unsnoc: unsnoc,
  15711. index: index,
  15712. elemIndex: elemIndex,
  15713. elemLastIndex: elemLastIndex,
  15714. findIndex: findIndex,
  15715. findLastIndex: findLastIndex,
  15716. insertAt: insertAt,
  15717. deleteAt: deleteAt,
  15718. updateAt: updateAt,
  15719. updateAtIndices: updateAtIndices,
  15720. modifyAt: modifyAt,
  15721. modifyAtIndices: modifyAtIndices,
  15722. alterAt: alterAt,
  15723. concatMap: concatMap,
  15724. filterA: filterA,
  15725. mapMaybe: mapMaybe,
  15726. catMaybes: catMaybes,
  15727. mapWithIndex: mapWithIndex,
  15728. sort: sort,
  15729. sortBy: sortBy,
  15730. sortWith: sortWith,
  15731. takeEnd: takeEnd,
  15732. takeWhile: takeWhile,
  15733. dropEnd: dropEnd,
  15734. dropWhile: dropWhile,
  15735. span: span,
  15736. group: group,
  15737. "group'": group$prime,
  15738. groupBy: groupBy,
  15739. nub: nub,
  15740. nubEq: nubEq,
  15741. nubBy: nubBy,
  15742. nubByEq: nubByEq,
  15743. union: union,
  15744. unionBy: unionBy,
  15745. "delete": $$delete,
  15746. deleteBy: deleteBy,
  15747. difference: difference,
  15748. intersect: intersect,
  15749. intersectBy: intersectBy,
  15750. zipWithA: zipWithA,
  15751. zip: zip,
  15752. unzip: unzip,
  15753. foldM: foldM,
  15754. foldRecM: foldRecM,
  15755. unsafeIndex: unsafeIndex,
  15756. range: $foreign.range,
  15757. replicate: $foreign.replicate,
  15758. length: $foreign.length,
  15759. cons: $foreign.cons,
  15760. snoc: $foreign.snoc,
  15761. reverse: $foreign.reverse,
  15762. concat: $foreign.concat,
  15763. filter: $foreign.filter,
  15764. partition: $foreign.partition,
  15765. slice: $foreign.slice,
  15766. take: $foreign.take,
  15767. drop: $foreign.drop,
  15768. zipWith: $foreign.zipWith
  15769. };
  15770. },{"./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) {
  15771. // Generated by purs version 0.13.6
  15772. "use strict";
  15773. var Control_Applicative = require("../Control.Applicative/index.js");
  15774. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  15775. var Data_Boolean = require("../Data.Boolean/index.js");
  15776. var Data_Identity = require("../Data.Identity/index.js");
  15777. var Foreign = require("../Foreign/index.js");
  15778. var isObject = function isObject(v) {
  15779. return Foreign.tagOf(v) === "Object";
  15780. };
  15781. var readObject = function readObject(value) {
  15782. if (isObject(value)) {
  15783. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Foreign.unsafeFromForeign(value));
  15784. }
  15785. ;
  15786. if (Data_Boolean.otherwise) {
  15787. return Foreign.fail(new Foreign.TypeMismatch("Object", Foreign.tagOf(value)));
  15788. }
  15789. ;
  15790. throw new Error("Failed pattern match at Foreign.Generic.Internal (line 13, column 1 - line 13, column 44): " + [value.constructor.name]);
  15791. };
  15792. module.exports = {
  15793. isObject: isObject,
  15794. readObject: readObject
  15795. };
  15796. },{"../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) {
  15797. "use strict";
  15798. exports.unsafeReadPropImpl = function (f, s, key, value) {
  15799. return value == null ? f : s(value[key]);
  15800. };
  15801. exports.unsafeHasOwnProperty = function (prop, value) {
  15802. return Object.prototype.hasOwnProperty.call(value, prop);
  15803. };
  15804. exports.unsafeHasProperty = function (prop, value) {
  15805. return prop in value;
  15806. };
  15807. },{}],"../output/Foreign.Index/index.js":[function(require,module,exports) {
  15808. // Generated by purs version 0.13.6
  15809. "use strict";
  15810. var $foreign = require("./foreign.js");
  15811. var Control_Applicative = require("../Control.Applicative/index.js");
  15812. var Control_Bind = require("../Control.Bind/index.js");
  15813. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  15814. var Data_Function = require("../Data.Function/index.js");
  15815. var Data_Identity = require("../Data.Identity/index.js");
  15816. var Foreign = require("../Foreign/index.js");
  15817. var Indexable = function Indexable(ix) {
  15818. this.ix = ix;
  15819. };
  15820. var Index = function Index(errorAt, hasOwnProperty, hasProperty, index) {
  15821. this.errorAt = errorAt;
  15822. this.hasOwnProperty = hasOwnProperty;
  15823. this.hasProperty = hasProperty;
  15824. this.index = index;
  15825. };
  15826. var unsafeReadProp = function unsafeReadProp(k) {
  15827. return function (value) {
  15828. 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);
  15829. };
  15830. };
  15831. var readProp = unsafeReadProp;
  15832. var readIndex = unsafeReadProp;
  15833. var ix = function ix(dict) {
  15834. return dict.ix;
  15835. };
  15836. var index = function index(dict) {
  15837. return dict.index;
  15838. };
  15839. var indexableExceptT = new Indexable(function (dictIndex) {
  15840. return function (f) {
  15841. return function (i) {
  15842. return Control_Bind.bindFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Data_Function.flip(index(dictIndex))(i))(f);
  15843. };
  15844. };
  15845. });
  15846. var indexableForeign = new Indexable(function (dictIndex) {
  15847. return index(dictIndex);
  15848. });
  15849. var hasPropertyImpl = function hasPropertyImpl(v) {
  15850. return function (value) {
  15851. if (Foreign.isNull(value)) {
  15852. return false;
  15853. }
  15854. ;
  15855. if (Foreign.isUndefined(value)) {
  15856. return false;
  15857. }
  15858. ;
  15859. if (Foreign.typeOf(value) === "object" || Foreign.typeOf(value) === "function") {
  15860. return $foreign.unsafeHasProperty(v, value);
  15861. }
  15862. ;
  15863. return false;
  15864. };
  15865. };
  15866. var hasProperty = function hasProperty(dict) {
  15867. return dict.hasProperty;
  15868. };
  15869. var hasOwnPropertyImpl = function hasOwnPropertyImpl(v) {
  15870. return function (value) {
  15871. if (Foreign.isNull(value)) {
  15872. return false;
  15873. }
  15874. ;
  15875. if (Foreign.isUndefined(value)) {
  15876. return false;
  15877. }
  15878. ;
  15879. if (Foreign.typeOf(value) === "object" || Foreign.typeOf(value) === "function") {
  15880. return $foreign.unsafeHasOwnProperty(v, value);
  15881. }
  15882. ;
  15883. return false;
  15884. };
  15885. };
  15886. var indexInt = new Index(Foreign.ErrorAtIndex.create, hasOwnPropertyImpl, hasPropertyImpl, Data_Function.flip(readIndex));
  15887. var indexString = new Index(Foreign.ErrorAtProperty.create, hasOwnPropertyImpl, hasPropertyImpl, Data_Function.flip(readProp));
  15888. var hasOwnProperty = function hasOwnProperty(dict) {
  15889. return dict.hasOwnProperty;
  15890. };
  15891. var errorAt = function errorAt(dict) {
  15892. return dict.errorAt;
  15893. };
  15894. module.exports = {
  15895. Index: Index,
  15896. Indexable: Indexable,
  15897. readProp: readProp,
  15898. readIndex: readIndex,
  15899. ix: ix,
  15900. index: index,
  15901. hasProperty: hasProperty,
  15902. hasOwnProperty: hasOwnProperty,
  15903. errorAt: errorAt,
  15904. indexString: indexString,
  15905. indexInt: indexInt,
  15906. indexableForeign: indexableForeign,
  15907. indexableExceptT: indexableExceptT
  15908. };
  15909. },{"./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) {
  15910. exports['null'] = null;
  15911. exports['undefined'] = undefined;
  15912. },{}],"../output/Foreign.NullOrUndefined/index.js":[function(require,module,exports) {
  15913. // Generated by purs version 0.13.6
  15914. "use strict";
  15915. var $foreign = require("./foreign.js");
  15916. var Control_Applicative = require("../Control.Applicative/index.js");
  15917. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  15918. var Data_Functor = require("../Data.Functor/index.js");
  15919. var Data_Identity = require("../Data.Identity/index.js");
  15920. var Data_Maybe = require("../Data.Maybe/index.js");
  15921. var Foreign = require("../Foreign/index.js");
  15922. var readNullOrUndefined = function readNullOrUndefined(v) {
  15923. return function (value) {
  15924. if (Foreign.isNull(value) || Foreign.isUndefined(value)) {
  15925. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Maybe.Nothing.value);
  15926. }
  15927. ;
  15928. return Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Maybe.Just.create)(v(value));
  15929. };
  15930. };
  15931. module.exports = {
  15932. readNullOrUndefined: readNullOrUndefined,
  15933. "undefined": $foreign["undefined"],
  15934. "null": $foreign["null"]
  15935. };
  15936. },{"./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) {
  15937. "use strict";
  15938. exports._copyST = function (m) {
  15939. return function () {
  15940. var r = {};
  15941. for (var k in m) {
  15942. if (hasOwnProperty.call(m, k)) {
  15943. r[k] = m[k];
  15944. }
  15945. }
  15946. return r;
  15947. };
  15948. };
  15949. exports.empty = {};
  15950. exports.runST = function (f) {
  15951. return f();
  15952. };
  15953. exports._fmapObject = function (m0, f) {
  15954. var m = {};
  15955. for (var k in m0) {
  15956. if (hasOwnProperty.call(m0, k)) {
  15957. m[k] = f(m0[k]);
  15958. }
  15959. }
  15960. return m;
  15961. };
  15962. exports._mapWithKey = function (m0, f) {
  15963. var m = {};
  15964. for (var k in m0) {
  15965. if (hasOwnProperty.call(m0, k)) {
  15966. m[k] = f(k)(m0[k]);
  15967. }
  15968. }
  15969. return m;
  15970. };
  15971. exports._foldM = function (bind) {
  15972. return function (f) {
  15973. return function (mz) {
  15974. return function (m) {
  15975. var acc = mz;
  15976. function g(k) {
  15977. return function (z) {
  15978. return f(z)(k)(m[k]);
  15979. };
  15980. }
  15981. for (var k in m) {
  15982. if (hasOwnProperty.call(m, k)) {
  15983. acc = bind(acc)(g(k));
  15984. }
  15985. }
  15986. return acc;
  15987. };
  15988. };
  15989. };
  15990. };
  15991. exports._foldSCObject = function (m, z, f, fromMaybe) {
  15992. var acc = z;
  15993. for (var k in m) {
  15994. if (hasOwnProperty.call(m, k)) {
  15995. var maybeR = f(acc)(k)(m[k]);
  15996. var r = fromMaybe(null)(maybeR);
  15997. if (r === null) return acc;else acc = r;
  15998. }
  15999. }
  16000. return acc;
  16001. };
  16002. exports.all = function (f) {
  16003. return function (m) {
  16004. for (var k in m) {
  16005. if (hasOwnProperty.call(m, k) && !f(k)(m[k])) return false;
  16006. }
  16007. return true;
  16008. };
  16009. };
  16010. exports.size = function (m) {
  16011. var s = 0;
  16012. for (var k in m) {
  16013. if (hasOwnProperty.call(m, k)) {
  16014. ++s;
  16015. }
  16016. }
  16017. return s;
  16018. };
  16019. exports._lookup = function (no, yes, k, m) {
  16020. return k in m ? yes(m[k]) : no;
  16021. };
  16022. exports._lookupST = function (no, yes, k, m) {
  16023. return function () {
  16024. return k in m ? yes(m[k]) : no;
  16025. };
  16026. };
  16027. function toArrayWithKey(f) {
  16028. return function (m) {
  16029. var r = [];
  16030. for (var k in m) {
  16031. if (hasOwnProperty.call(m, k)) {
  16032. r.push(f(k)(m[k]));
  16033. }
  16034. }
  16035. return r;
  16036. };
  16037. }
  16038. exports.toArrayWithKey = toArrayWithKey;
  16039. exports.keys = Object.keys || toArrayWithKey(function (k) {
  16040. return function () {
  16041. return k;
  16042. };
  16043. });
  16044. },{}],"../output/Data.Function.Uncurried/foreign.js":[function(require,module,exports) {
  16045. "use strict"; // module Data.Function.Uncurried
  16046. exports.mkFn0 = function (fn) {
  16047. return function () {
  16048. return fn({});
  16049. };
  16050. };
  16051. exports.mkFn2 = function (fn) {
  16052. /* jshint maxparams: 2 */
  16053. return function (a, b) {
  16054. return fn(a)(b);
  16055. };
  16056. };
  16057. exports.mkFn3 = function (fn) {
  16058. /* jshint maxparams: 3 */
  16059. return function (a, b, c) {
  16060. return fn(a)(b)(c);
  16061. };
  16062. };
  16063. exports.mkFn4 = function (fn) {
  16064. /* jshint maxparams: 4 */
  16065. return function (a, b, c, d) {
  16066. return fn(a)(b)(c)(d);
  16067. };
  16068. };
  16069. exports.mkFn5 = function (fn) {
  16070. /* jshint maxparams: 5 */
  16071. return function (a, b, c, d, e) {
  16072. return fn(a)(b)(c)(d)(e);
  16073. };
  16074. };
  16075. exports.mkFn6 = function (fn) {
  16076. /* jshint maxparams: 6 */
  16077. return function (a, b, c, d, e, f) {
  16078. return fn(a)(b)(c)(d)(e)(f);
  16079. };
  16080. };
  16081. exports.mkFn7 = function (fn) {
  16082. /* jshint maxparams: 7 */
  16083. return function (a, b, c, d, e, f, g) {
  16084. return fn(a)(b)(c)(d)(e)(f)(g);
  16085. };
  16086. };
  16087. exports.mkFn8 = function (fn) {
  16088. /* jshint maxparams: 8 */
  16089. return function (a, b, c, d, e, f, g, h) {
  16090. return fn(a)(b)(c)(d)(e)(f)(g)(h);
  16091. };
  16092. };
  16093. exports.mkFn9 = function (fn) {
  16094. /* jshint maxparams: 9 */
  16095. return function (a, b, c, d, e, f, g, h, i) {
  16096. return fn(a)(b)(c)(d)(e)(f)(g)(h)(i);
  16097. };
  16098. };
  16099. exports.mkFn10 = function (fn) {
  16100. /* jshint maxparams: 10 */
  16101. return function (a, b, c, d, e, f, g, h, i, j) {
  16102. return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)(j);
  16103. };
  16104. };
  16105. exports.runFn0 = function (fn) {
  16106. return fn();
  16107. };
  16108. exports.runFn2 = function (fn) {
  16109. return function (a) {
  16110. return function (b) {
  16111. return fn(a, b);
  16112. };
  16113. };
  16114. };
  16115. exports.runFn3 = function (fn) {
  16116. return function (a) {
  16117. return function (b) {
  16118. return function (c) {
  16119. return fn(a, b, c);
  16120. };
  16121. };
  16122. };
  16123. };
  16124. exports.runFn4 = function (fn) {
  16125. return function (a) {
  16126. return function (b) {
  16127. return function (c) {
  16128. return function (d) {
  16129. return fn(a, b, c, d);
  16130. };
  16131. };
  16132. };
  16133. };
  16134. };
  16135. exports.runFn5 = function (fn) {
  16136. return function (a) {
  16137. return function (b) {
  16138. return function (c) {
  16139. return function (d) {
  16140. return function (e) {
  16141. return fn(a, b, c, d, e);
  16142. };
  16143. };
  16144. };
  16145. };
  16146. };
  16147. };
  16148. exports.runFn6 = function (fn) {
  16149. return function (a) {
  16150. return function (b) {
  16151. return function (c) {
  16152. return function (d) {
  16153. return function (e) {
  16154. return function (f) {
  16155. return fn(a, b, c, d, e, f);
  16156. };
  16157. };
  16158. };
  16159. };
  16160. };
  16161. };
  16162. };
  16163. exports.runFn7 = function (fn) {
  16164. return function (a) {
  16165. return function (b) {
  16166. return function (c) {
  16167. return function (d) {
  16168. return function (e) {
  16169. return function (f) {
  16170. return function (g) {
  16171. return fn(a, b, c, d, e, f, g);
  16172. };
  16173. };
  16174. };
  16175. };
  16176. };
  16177. };
  16178. };
  16179. };
  16180. exports.runFn8 = function (fn) {
  16181. return function (a) {
  16182. return function (b) {
  16183. return function (c) {
  16184. return function (d) {
  16185. return function (e) {
  16186. return function (f) {
  16187. return function (g) {
  16188. return function (h) {
  16189. return fn(a, b, c, d, e, f, g, h);
  16190. };
  16191. };
  16192. };
  16193. };
  16194. };
  16195. };
  16196. };
  16197. };
  16198. };
  16199. exports.runFn9 = function (fn) {
  16200. return function (a) {
  16201. return function (b) {
  16202. return function (c) {
  16203. return function (d) {
  16204. return function (e) {
  16205. return function (f) {
  16206. return function (g) {
  16207. return function (h) {
  16208. return function (i) {
  16209. return fn(a, b, c, d, e, f, g, h, i);
  16210. };
  16211. };
  16212. };
  16213. };
  16214. };
  16215. };
  16216. };
  16217. };
  16218. };
  16219. };
  16220. exports.runFn10 = function (fn) {
  16221. return function (a) {
  16222. return function (b) {
  16223. return function (c) {
  16224. return function (d) {
  16225. return function (e) {
  16226. return function (f) {
  16227. return function (g) {
  16228. return function (h) {
  16229. return function (i) {
  16230. return function (j) {
  16231. return fn(a, b, c, d, e, f, g, h, i, j);
  16232. };
  16233. };
  16234. };
  16235. };
  16236. };
  16237. };
  16238. };
  16239. };
  16240. };
  16241. };
  16242. };
  16243. },{}],"../output/Data.Function.Uncurried/index.js":[function(require,module,exports) {
  16244. // Generated by purs version 0.13.6
  16245. "use strict";
  16246. var $foreign = require("./foreign.js");
  16247. var runFn1 = function runFn1(f) {
  16248. return f;
  16249. };
  16250. var mkFn1 = function mkFn1(f) {
  16251. return f;
  16252. };
  16253. module.exports = {
  16254. mkFn1: mkFn1,
  16255. runFn1: runFn1,
  16256. mkFn0: $foreign.mkFn0,
  16257. mkFn2: $foreign.mkFn2,
  16258. mkFn3: $foreign.mkFn3,
  16259. mkFn4: $foreign.mkFn4,
  16260. mkFn5: $foreign.mkFn5,
  16261. mkFn6: $foreign.mkFn6,
  16262. mkFn7: $foreign.mkFn7,
  16263. mkFn8: $foreign.mkFn8,
  16264. mkFn9: $foreign.mkFn9,
  16265. mkFn10: $foreign.mkFn10,
  16266. runFn0: $foreign.runFn0,
  16267. runFn2: $foreign.runFn2,
  16268. runFn3: $foreign.runFn3,
  16269. runFn4: $foreign.runFn4,
  16270. runFn5: $foreign.runFn5,
  16271. runFn6: $foreign.runFn6,
  16272. runFn7: $foreign.runFn7,
  16273. runFn8: $foreign.runFn8,
  16274. runFn9: $foreign.runFn9,
  16275. runFn10: $foreign.runFn10
  16276. };
  16277. },{"./foreign.js":"../output/Data.Function.Uncurried/foreign.js"}],"../output/Foreign.Object.ST/foreign.js":[function(require,module,exports) {
  16278. "use strict";
  16279. exports["new"] = function () {
  16280. return {};
  16281. };
  16282. exports.peekImpl = function (just) {
  16283. return function (nothing) {
  16284. return function (k) {
  16285. return function (m) {
  16286. return function () {
  16287. return {}.hasOwnProperty.call(m, k) ? just(m[k]) : nothing;
  16288. };
  16289. };
  16290. };
  16291. };
  16292. };
  16293. exports.poke = function (k) {
  16294. return function (v) {
  16295. return function (m) {
  16296. return function () {
  16297. m[k] = v;
  16298. return m;
  16299. };
  16300. };
  16301. };
  16302. };
  16303. exports["delete"] = function (k) {
  16304. return function (m) {
  16305. return function () {
  16306. delete m[k];
  16307. return m;
  16308. };
  16309. };
  16310. };
  16311. },{}],"../output/Foreign.Object.ST/index.js":[function(require,module,exports) {
  16312. // Generated by purs version 0.13.6
  16313. "use strict";
  16314. var $foreign = require("./foreign.js");
  16315. var Data_Maybe = require("../Data.Maybe/index.js");
  16316. var peek = $foreign.peekImpl(Data_Maybe.Just.create)(Data_Maybe.Nothing.value);
  16317. module.exports = {
  16318. peek: peek,
  16319. "new": $foreign["new"],
  16320. poke: $foreign.poke,
  16321. "delete": $foreign["delete"]
  16322. };
  16323. },{"./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) {
  16324. "use strict"; // module Unsafe.Coerce
  16325. exports.unsafeCoerce = function (x) {
  16326. return x;
  16327. };
  16328. },{}],"../output/Unsafe.Coerce/index.js":[function(require,module,exports) {
  16329. // Generated by purs version 0.13.6
  16330. "use strict";
  16331. var $foreign = require("./foreign.js");
  16332. module.exports = {
  16333. unsafeCoerce: $foreign.unsafeCoerce
  16334. };
  16335. },{"./foreign.js":"../output/Unsafe.Coerce/foreign.js"}],"../output/Foreign.Object/index.js":[function(require,module,exports) {
  16336. // Generated by purs version 0.13.6
  16337. "use strict";
  16338. var $foreign = require("./foreign.js");
  16339. var Control_Applicative = require("../Control.Applicative/index.js");
  16340. var Control_Apply = require("../Control.Apply/index.js");
  16341. var Control_Bind = require("../Control.Bind/index.js");
  16342. var Control_Category = require("../Control.Category/index.js");
  16343. var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
  16344. var Data_Array = require("../Data.Array/index.js");
  16345. var Data_Eq = require("../Data.Eq/index.js");
  16346. var Data_Foldable = require("../Data.Foldable/index.js");
  16347. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  16348. var Data_Function = require("../Data.Function/index.js");
  16349. var Data_Function_Uncurried = require("../Data.Function.Uncurried/index.js");
  16350. var Data_Functor = require("../Data.Functor/index.js");
  16351. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  16352. var Data_Maybe = require("../Data.Maybe/index.js");
  16353. var Data_Monoid = require("../Data.Monoid/index.js");
  16354. var Data_Ord = require("../Data.Ord/index.js");
  16355. var Data_Semigroup = require("../Data.Semigroup/index.js");
  16356. var Data_Show = require("../Data.Show/index.js");
  16357. var Data_Traversable = require("../Data.Traversable/index.js");
  16358. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  16359. var Data_Tuple = require("../Data.Tuple/index.js");
  16360. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  16361. var Foreign_Object_ST = require("../Foreign.Object.ST/index.js");
  16362. var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
  16363. var values = $foreign.toArrayWithKey(function (v) {
  16364. return function (v1) {
  16365. return v1;
  16366. };
  16367. });
  16368. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  16369. var $36 = Data_Array.toUnfoldable(dictUnfoldable);
  16370. var $37 = $foreign.toArrayWithKey(Data_Tuple.Tuple.create);
  16371. return function ($38) {
  16372. return $36($37($38));
  16373. };
  16374. };
  16375. var toAscUnfoldable = function toAscUnfoldable(dictUnfoldable) {
  16376. var $39 = Data_Array.toUnfoldable(dictUnfoldable);
  16377. var $40 = Data_Array.sortWith(Data_Ord.ordString)(Data_Tuple.fst);
  16378. var $41 = $foreign.toArrayWithKey(Data_Tuple.Tuple.create);
  16379. return function ($42) {
  16380. return $39($40($41($42)));
  16381. };
  16382. };
  16383. var toAscArray = toAscUnfoldable(Data_Unfoldable.unfoldableArray);
  16384. var toArray = $foreign.toArrayWithKey(Data_Tuple.Tuple.create);
  16385. var thawST = $foreign["_copyST"];
  16386. var singleton = function singleton(k) {
  16387. return function (v) {
  16388. return $foreign.runST(Control_Bind.bindFlipped(Control_Monad_ST_Internal.bindST)(Foreign_Object_ST.poke(k)(v))(Foreign_Object_ST["new"]));
  16389. };
  16390. };
  16391. var showObject = function showObject(dictShow) {
  16392. return new Data_Show.Show(function (m) {
  16393. return "(fromFoldable " + (Data_Show.show(Data_Show.showArray(Data_Tuple.showTuple(Data_Show.showString)(dictShow)))(toArray(m)) + ")");
  16394. });
  16395. };
  16396. var mutate = function mutate(f) {
  16397. return function (m) {
  16398. return $foreign.runST(function __do() {
  16399. var s = thawST(m)();
  16400. f(s)();
  16401. return s;
  16402. });
  16403. };
  16404. };
  16405. var member = Data_Function_Uncurried.runFn4($foreign["_lookup"])(false)(Data_Function["const"](true));
  16406. var mapWithKey = function mapWithKey(f) {
  16407. return function (m) {
  16408. return $foreign["_mapWithKey"](m, f);
  16409. };
  16410. };
  16411. var lookup = Data_Function_Uncurried.runFn4($foreign["_lookup"])(Data_Maybe.Nothing.value)(Data_Maybe.Just.create);
  16412. var isSubmap = function isSubmap(dictEq) {
  16413. return function (m1) {
  16414. return function (m2) {
  16415. var f = function f(k) {
  16416. return function (v) {
  16417. return $foreign["_lookup"](false, Data_Eq.eq(dictEq)(v), k, m2);
  16418. };
  16419. };
  16420. return $foreign.all(f)(m1);
  16421. };
  16422. };
  16423. };
  16424. var isEmpty = $foreign.all(function (v) {
  16425. return function (v1) {
  16426. return false;
  16427. };
  16428. });
  16429. var insert = function insert(k) {
  16430. return function (v) {
  16431. return mutate(Foreign_Object_ST.poke(k)(v));
  16432. };
  16433. };
  16434. var functorObject = new Data_Functor.Functor(function (f) {
  16435. return function (m) {
  16436. return $foreign["_fmapObject"](m, f);
  16437. };
  16438. });
  16439. var functorWithIndexObject = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  16440. return functorObject;
  16441. }, mapWithKey);
  16442. var fromHomogeneous = function fromHomogeneous(dictHomogeneous) {
  16443. return Unsafe_Coerce.unsafeCoerce;
  16444. };
  16445. var fromFoldableWith = function fromFoldableWith(dictFoldable) {
  16446. return function (f) {
  16447. return function (l) {
  16448. return $foreign.runST(function __do() {
  16449. var s = Foreign_Object_ST["new"]();
  16450. Data_Foldable.for_(Control_Monad_ST_Internal.applicativeST)(dictFoldable)(l)(function (v) {
  16451. return function __do() {
  16452. var v$prime = $foreign["_lookupST"](v.value1, f(v.value1), v.value0, s)();
  16453. return Foreign_Object_ST.poke(v.value0)(v$prime)(s)();
  16454. };
  16455. })();
  16456. return s;
  16457. });
  16458. };
  16459. };
  16460. };
  16461. var fromFoldable = function fromFoldable(dictFoldable) {
  16462. return function (l) {
  16463. return $foreign.runST(function __do() {
  16464. var s = Foreign_Object_ST["new"]();
  16465. Control_Monad_ST_Internal.foreach(Data_Array.fromFoldable(dictFoldable)(l))(function (v) {
  16466. return Data_Functor["void"](Control_Monad_ST_Internal.functorST)(Foreign_Object_ST.poke(v.value0)(v.value1)(s));
  16467. })();
  16468. return s;
  16469. });
  16470. };
  16471. };
  16472. var freezeST = $foreign["_copyST"];
  16473. var foldMaybe = function foldMaybe(f) {
  16474. return function (z) {
  16475. return function (m) {
  16476. return $foreign["_foldSCObject"](m, z, f, Data_Maybe.fromMaybe);
  16477. };
  16478. };
  16479. };
  16480. var foldM = function foldM(dictMonad) {
  16481. return function (f) {
  16482. return function (z) {
  16483. return $foreign["_foldM"](Control_Bind.bind(dictMonad.Bind1()))(f)(Control_Applicative.pure(dictMonad.Applicative0())(z));
  16484. };
  16485. };
  16486. };
  16487. var semigroupObject = function semigroupObject(dictSemigroup) {
  16488. return new Data_Semigroup.Semigroup(function (m1) {
  16489. return function (m2) {
  16490. return mutate(function (s1) {
  16491. return foldM(Control_Monad_ST_Internal.monadST)(function (s2) {
  16492. return function (k) {
  16493. return function (v2) {
  16494. return Foreign_Object_ST.poke(k)($foreign["_lookup"](v2, function (v1) {
  16495. return Data_Semigroup.append(dictSemigroup)(v1)(v2);
  16496. }, k, m2))(s2);
  16497. };
  16498. };
  16499. })(s1)(m1);
  16500. })(m2);
  16501. };
  16502. });
  16503. };
  16504. var monoidObject = function monoidObject(dictSemigroup) {
  16505. return new Data_Monoid.Monoid(function () {
  16506. return semigroupObject(dictSemigroup);
  16507. }, $foreign.empty);
  16508. };
  16509. var union = function union(m) {
  16510. return mutate(function (s) {
  16511. return foldM(Control_Monad_ST_Internal.monadST)(function (s$prime) {
  16512. return function (k) {
  16513. return function (v) {
  16514. return Foreign_Object_ST.poke(k)(v)(s$prime);
  16515. };
  16516. };
  16517. })(s)(m);
  16518. });
  16519. };
  16520. var unions = function unions(dictFoldable) {
  16521. return Data_Foldable.foldl(dictFoldable)(union)($foreign.empty);
  16522. };
  16523. var fold = $foreign["_foldM"](Data_Function.applyFlipped);
  16524. var foldMap = function foldMap(dictMonoid) {
  16525. return function (f) {
  16526. return fold(function (acc) {
  16527. return function (k) {
  16528. return function (v) {
  16529. return Data_Semigroup.append(dictMonoid.Semigroup0())(acc)(f(k)(v));
  16530. };
  16531. };
  16532. })(Data_Monoid.mempty(dictMonoid));
  16533. };
  16534. };
  16535. var foldableObject = new Data_Foldable.Foldable(function (dictMonoid) {
  16536. return function (f) {
  16537. return foldMap(dictMonoid)(Data_Function["const"](f));
  16538. };
  16539. }, function (f) {
  16540. return fold(function (z) {
  16541. return function (v) {
  16542. return f(z);
  16543. };
  16544. });
  16545. }, function (f) {
  16546. return function (z) {
  16547. return function (m) {
  16548. return Data_Foldable.foldr(Data_Foldable.foldableArray)(f)(z)(values(m));
  16549. };
  16550. };
  16551. });
  16552. var foldableWithIndexObject = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  16553. return foldableObject;
  16554. }, function (dictMonoid) {
  16555. return foldMap(dictMonoid);
  16556. }, function (f) {
  16557. return fold(Data_Function.flip(f));
  16558. }, function (f) {
  16559. return function (z) {
  16560. return function (m) {
  16561. return Data_Foldable.foldr(Data_Foldable.foldableArray)(Data_Tuple.uncurry(f))(z)($foreign.toArrayWithKey(Data_Tuple.Tuple.create)(m));
  16562. };
  16563. };
  16564. });
  16565. var traversableWithIndexObject = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  16566. return foldableWithIndexObject;
  16567. }, function () {
  16568. return functorWithIndexObject;
  16569. }, function () {
  16570. return traversableObject;
  16571. }, function (dictApplicative) {
  16572. return function (f) {
  16573. return function (ms) {
  16574. return fold(function (acc) {
  16575. return function (k) {
  16576. return function (v) {
  16577. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Function.flip(insert(k)))(acc))(f(k)(v));
  16578. };
  16579. };
  16580. })(Control_Applicative.pure(dictApplicative)($foreign.empty))(ms);
  16581. };
  16582. };
  16583. });
  16584. var traversableObject = new Data_Traversable.Traversable(function () {
  16585. return foldableObject;
  16586. }, function () {
  16587. return functorObject;
  16588. }, function (dictApplicative) {
  16589. return Data_Traversable.traverse(traversableObject)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
  16590. }, function (dictApplicative) {
  16591. var $43 = Data_TraversableWithIndex.traverseWithIndex(traversableWithIndexObject)(dictApplicative);
  16592. return function ($44) {
  16593. return $43(Data_Function["const"]($44));
  16594. };
  16595. });
  16596. var filterWithKey = function filterWithKey(predicate) {
  16597. return function (m) {
  16598. var go = function () {
  16599. var step = function step(acc) {
  16600. return function (k) {
  16601. return function (v) {
  16602. var $33 = predicate(k)(v);
  16603. if ($33) {
  16604. return Foreign_Object_ST.poke(k)(v)(acc);
  16605. }
  16606. ;
  16607. return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(acc);
  16608. };
  16609. };
  16610. };
  16611. return function __do() {
  16612. var m$prime = Foreign_Object_ST["new"]();
  16613. return foldM(Control_Monad_ST_Internal.monadST)(step)(m$prime)(m)();
  16614. };
  16615. }();
  16616. return $foreign.runST(go);
  16617. };
  16618. };
  16619. var filterKeys = function filterKeys(predicate) {
  16620. return filterWithKey(function ($45) {
  16621. return Data_Function["const"](predicate($45));
  16622. });
  16623. };
  16624. var filter = function filter(predicate) {
  16625. return filterWithKey(Data_Function["const"](predicate));
  16626. };
  16627. var eqObject = function eqObject(dictEq) {
  16628. return new Data_Eq.Eq(function (m1) {
  16629. return function (m2) {
  16630. return isSubmap(dictEq)(m1)(m2) && isSubmap(dictEq)(m2)(m1);
  16631. };
  16632. });
  16633. };
  16634. var ordObject = function ordObject(dictOrd) {
  16635. return new Data_Ord.Ord(function () {
  16636. return eqObject(dictOrd.Eq0());
  16637. }, function (m1) {
  16638. return function (m2) {
  16639. return Data_Ord.compare(Data_Ord.ordArray(Data_Tuple.ordTuple(Data_Ord.ordString)(dictOrd)))(toAscArray(m1))(toAscArray(m2));
  16640. };
  16641. });
  16642. };
  16643. var eq1Object = new Data_Eq.Eq1(function (dictEq) {
  16644. return Data_Eq.eq(eqObject(dictEq));
  16645. });
  16646. var $$delete = function $$delete(k) {
  16647. return mutate(Foreign_Object_ST["delete"](k));
  16648. };
  16649. var pop = function pop(k) {
  16650. return function (m) {
  16651. return Data_Functor.mapFlipped(Data_Maybe.functorMaybe)(lookup(k)(m))(function (a) {
  16652. return new Data_Tuple.Tuple(a, $$delete(k)(m));
  16653. });
  16654. };
  16655. };
  16656. var alter = function alter(f) {
  16657. return function (k) {
  16658. return function (m) {
  16659. var v = f(lookup(k)(m));
  16660. if (v instanceof Data_Maybe.Nothing) {
  16661. return $$delete(k)(m);
  16662. }
  16663. ;
  16664. if (v instanceof Data_Maybe.Just) {
  16665. return insert(k)(v.value0)(m);
  16666. }
  16667. ;
  16668. throw new Error("Failed pattern match at Foreign.Object (line 206, column 15 - line 208, column 25): " + [v.constructor.name]);
  16669. };
  16670. };
  16671. };
  16672. var update = function update(f) {
  16673. return function (k) {
  16674. return function (m) {
  16675. return alter(Data_Maybe.maybe(Data_Maybe.Nothing.value)(f))(k)(m);
  16676. };
  16677. };
  16678. };
  16679. module.exports = {
  16680. isEmpty: isEmpty,
  16681. singleton: singleton,
  16682. insert: insert,
  16683. lookup: lookup,
  16684. toUnfoldable: toUnfoldable,
  16685. toAscUnfoldable: toAscUnfoldable,
  16686. fromFoldable: fromFoldable,
  16687. fromFoldableWith: fromFoldableWith,
  16688. fromHomogeneous: fromHomogeneous,
  16689. "delete": $$delete,
  16690. pop: pop,
  16691. member: member,
  16692. alter: alter,
  16693. update: update,
  16694. mapWithKey: mapWithKey,
  16695. filterWithKey: filterWithKey,
  16696. filterKeys: filterKeys,
  16697. filter: filter,
  16698. values: values,
  16699. union: union,
  16700. unions: unions,
  16701. isSubmap: isSubmap,
  16702. fold: fold,
  16703. foldMap: foldMap,
  16704. foldM: foldM,
  16705. foldMaybe: foldMaybe,
  16706. thawST: thawST,
  16707. freezeST: freezeST,
  16708. functorObject: functorObject,
  16709. functorWithIndexObject: functorWithIndexObject,
  16710. foldableObject: foldableObject,
  16711. foldableWithIndexObject: foldableWithIndexObject,
  16712. traversableObject: traversableObject,
  16713. traversableWithIndexObject: traversableWithIndexObject,
  16714. eqObject: eqObject,
  16715. eq1Object: eq1Object,
  16716. ordObject: ordObject,
  16717. showObject: showObject,
  16718. semigroupObject: semigroupObject,
  16719. monoidObject: monoidObject,
  16720. empty: $foreign.empty,
  16721. size: $foreign.size,
  16722. keys: $foreign.keys,
  16723. all: $foreign.all,
  16724. runST: $foreign.runST,
  16725. toArrayWithKey: $foreign.toArrayWithKey
  16726. };
  16727. },{"./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) {
  16728. "use strict";
  16729. exports.unsafeUnionFn = function (r1, r2) {
  16730. var copy = {};
  16731. for (var k1 in r2) {
  16732. if ({}.hasOwnProperty.call(r2, k1)) {
  16733. copy[k1] = r2[k1];
  16734. }
  16735. }
  16736. for (var k2 in r1) {
  16737. if ({}.hasOwnProperty.call(r1, k2)) {
  16738. copy[k2] = r1[k2];
  16739. }
  16740. }
  16741. return copy;
  16742. };
  16743. },{}],"../output/Record.Unsafe.Union/index.js":[function(require,module,exports) {
  16744. // Generated by purs version 0.13.6
  16745. "use strict";
  16746. var $foreign = require("./foreign.js");
  16747. var Data_Function_Uncurried = require("../Data.Function.Uncurried/index.js");
  16748. var unsafeUnion = Data_Function_Uncurried.runFn2($foreign.unsafeUnionFn);
  16749. module.exports = {
  16750. unsafeUnion: unsafeUnion,
  16751. unsafeUnionFn: $foreign.unsafeUnionFn
  16752. };
  16753. },{"./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) {
  16754. // Generated by purs version 0.13.6
  16755. "use strict";
  16756. var Data_Eq = require("../Data.Eq/index.js");
  16757. var Data_Symbol = require("../Data.Symbol/index.js");
  16758. var Record_Unsafe = require("../Record.Unsafe/index.js");
  16759. var Record_Unsafe_Union = require("../Record.Unsafe.Union/index.js");
  16760. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  16761. var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
  16762. var EqualFields = function EqualFields(equalFields) {
  16763. this.equalFields = equalFields;
  16764. };
  16765. var union = function union(dictUnion) {
  16766. return function (l) {
  16767. return function (r) {
  16768. return Record_Unsafe_Union.unsafeUnionFn(l, r);
  16769. };
  16770. };
  16771. };
  16772. var set = function set(dictIsSymbol) {
  16773. return function (dictCons) {
  16774. return function (dictCons1) {
  16775. return function (l) {
  16776. return function (b) {
  16777. return function (r) {
  16778. return Record_Unsafe.unsafeSet(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(b)(r);
  16779. };
  16780. };
  16781. };
  16782. };
  16783. };
  16784. };
  16785. var nub = function nub(dictNub) {
  16786. return Unsafe_Coerce.unsafeCoerce;
  16787. };
  16788. var merge = function merge(dictUnion) {
  16789. return function (dictNub) {
  16790. return function (l) {
  16791. return function (r) {
  16792. return Record_Unsafe_Union.unsafeUnionFn(l, r);
  16793. };
  16794. };
  16795. };
  16796. };
  16797. var insert = function insert(dictIsSymbol) {
  16798. return function (dictLacks) {
  16799. return function (dictCons) {
  16800. return function (l) {
  16801. return function (a) {
  16802. return function (r) {
  16803. return Record_Unsafe.unsafeSet(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(a)(r);
  16804. };
  16805. };
  16806. };
  16807. };
  16808. };
  16809. };
  16810. var get = function get(dictIsSymbol) {
  16811. return function (dictCons) {
  16812. return function (l) {
  16813. return function (r) {
  16814. return Record_Unsafe.unsafeGet(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(r);
  16815. };
  16816. };
  16817. };
  16818. };
  16819. var modify = function modify(dictIsSymbol) {
  16820. return function (dictCons) {
  16821. return function (dictCons1) {
  16822. return function (l) {
  16823. return function (f) {
  16824. return function (r) {
  16825. return set(dictIsSymbol)()()(l)(f(get(dictIsSymbol)()(l)(r)))(r);
  16826. };
  16827. };
  16828. };
  16829. };
  16830. };
  16831. };
  16832. var equalFieldsNil = new EqualFields(function (v) {
  16833. return function (v1) {
  16834. return function (v2) {
  16835. return true;
  16836. };
  16837. };
  16838. });
  16839. var equalFields = function equalFields(dict) {
  16840. return dict.equalFields;
  16841. };
  16842. var equalFieldsCons = function equalFieldsCons(dictIsSymbol) {
  16843. return function (dictEq) {
  16844. return function (dictCons) {
  16845. return function (dictEqualFields) {
  16846. return new EqualFields(function (v) {
  16847. return function (a) {
  16848. return function (b) {
  16849. var get$prime = get(dictIsSymbol)()(Data_Symbol.SProxy.value);
  16850. var equalRest = equalFields(dictEqualFields)(Type_Data_RowList.RLProxy.value);
  16851. return Data_Eq.eq(dictEq)(get$prime(a))(get$prime(b)) && equalRest(a)(b);
  16852. };
  16853. };
  16854. });
  16855. };
  16856. };
  16857. };
  16858. };
  16859. var equal = function equal(dictRowToList) {
  16860. return function (dictEqualFields) {
  16861. return function (a) {
  16862. return function (b) {
  16863. return equalFields(dictEqualFields)(Type_Data_RowList.RLProxy.value)(a)(b);
  16864. };
  16865. };
  16866. };
  16867. };
  16868. var disjointUnion = function disjointUnion(dictUnion) {
  16869. return function (dictNub) {
  16870. return function (l) {
  16871. return function (r) {
  16872. return Record_Unsafe_Union.unsafeUnionFn(l, r);
  16873. };
  16874. };
  16875. };
  16876. };
  16877. var $$delete = function $$delete(dictIsSymbol) {
  16878. return function (dictLacks) {
  16879. return function (dictCons) {
  16880. return function (l) {
  16881. return function (r) {
  16882. return Record_Unsafe.unsafeDelete(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(r);
  16883. };
  16884. };
  16885. };
  16886. };
  16887. };
  16888. var rename = function rename(dictIsSymbol) {
  16889. return function (dictIsSymbol1) {
  16890. return function (dictCons) {
  16891. return function (dictLacks) {
  16892. return function (dictCons1) {
  16893. return function (dictLacks1) {
  16894. return function (prev) {
  16895. return function (next) {
  16896. return function (record) {
  16897. return insert(dictIsSymbol1)()()(next)(get(dictIsSymbol)()(prev)(record))($$delete(dictIsSymbol)()()(prev)(record));
  16898. };
  16899. };
  16900. };
  16901. };
  16902. };
  16903. };
  16904. };
  16905. };
  16906. };
  16907. module.exports = {
  16908. get: get,
  16909. set: set,
  16910. modify: modify,
  16911. insert: insert,
  16912. "delete": $$delete,
  16913. rename: rename,
  16914. equal: equal,
  16915. merge: merge,
  16916. union: union,
  16917. disjointUnion: disjointUnion,
  16918. nub: nub,
  16919. EqualFields: EqualFields,
  16920. equalFields: equalFields,
  16921. equalFieldsCons: equalFieldsCons,
  16922. equalFieldsNil: equalFieldsNil
  16923. };
  16924. },{"../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) {
  16925. "use strict";
  16926. exports.copyRecord = function (rec) {
  16927. var copy = {};
  16928. for (var key in rec) {
  16929. if ({}.hasOwnProperty.call(rec, key)) {
  16930. copy[key] = rec[key];
  16931. }
  16932. }
  16933. return copy;
  16934. };
  16935. exports.unsafeInsert = function (l) {
  16936. return function (a) {
  16937. return function (rec) {
  16938. rec[l] = a;
  16939. return rec;
  16940. };
  16941. };
  16942. };
  16943. exports.unsafeModify = function (l) {
  16944. return function (f) {
  16945. return function (rec) {
  16946. rec[l] = f(rec[l]);
  16947. return rec;
  16948. };
  16949. };
  16950. };
  16951. exports.unsafeDelete = function (l) {
  16952. return function (rec) {
  16953. delete rec[l];
  16954. return rec;
  16955. };
  16956. };
  16957. exports.unsafeRename = function (l1) {
  16958. return function (l2) {
  16959. return function (rec) {
  16960. rec[l2] = rec[l1];
  16961. delete rec[l1];
  16962. return rec;
  16963. };
  16964. };
  16965. };
  16966. },{}],"../output/Record.Builder/index.js":[function(require,module,exports) {
  16967. // Generated by purs version 0.13.6
  16968. "use strict";
  16969. var $foreign = require("./foreign.js");
  16970. var Control_Category = require("../Control.Category/index.js");
  16971. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  16972. var Data_Symbol = require("../Data.Symbol/index.js");
  16973. var Record_Unsafe_Union = require("../Record.Unsafe.Union/index.js");
  16974. var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
  16975. var Builder = function Builder(x) {
  16976. return x;
  16977. };
  16978. var union = function union(dictUnion) {
  16979. return function (r2) {
  16980. return function (r1) {
  16981. return Record_Unsafe_Union.unsafeUnionFn(r1, r2);
  16982. };
  16983. };
  16984. };
  16985. var semigroupoidBuilder = Control_Semigroupoid.semigroupoidFn;
  16986. var rename = function rename(dictIsSymbol) {
  16987. return function (dictIsSymbol1) {
  16988. return function (dictCons) {
  16989. return function (dictLacks) {
  16990. return function (dictCons1) {
  16991. return function (dictLacks1) {
  16992. return function (l1) {
  16993. return function (l2) {
  16994. return function (r1) {
  16995. return $foreign.unsafeRename(Data_Symbol.reflectSymbol(dictIsSymbol)(l1))(Data_Symbol.reflectSymbol(dictIsSymbol1)(l2))(r1);
  16996. };
  16997. };
  16998. };
  16999. };
  17000. };
  17001. };
  17002. };
  17003. };
  17004. };
  17005. var nub = function nub(dictNub) {
  17006. return Unsafe_Coerce.unsafeCoerce;
  17007. };
  17008. var modify = function modify(dictCons) {
  17009. return function (dictCons1) {
  17010. return function (dictIsSymbol) {
  17011. return function (l) {
  17012. return function (f) {
  17013. return function (r1) {
  17014. return $foreign.unsafeModify(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(f)(r1);
  17015. };
  17016. };
  17017. };
  17018. };
  17019. };
  17020. };
  17021. var merge = function merge(dictUnion) {
  17022. return function (dictNub) {
  17023. return function (r2) {
  17024. return function (r1) {
  17025. return Record_Unsafe_Union.unsafeUnionFn(r1, r2);
  17026. };
  17027. };
  17028. };
  17029. };
  17030. var insert = function insert(dictCons) {
  17031. return function (dictLacks) {
  17032. return function (dictIsSymbol) {
  17033. return function (l) {
  17034. return function (a) {
  17035. return function (r1) {
  17036. return $foreign.unsafeInsert(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(a)(r1);
  17037. };
  17038. };
  17039. };
  17040. };
  17041. };
  17042. };
  17043. var disjointUnion = function disjointUnion(dictUnion) {
  17044. return function (dictNub) {
  17045. return function (r1) {
  17046. return function (r2) {
  17047. return Record_Unsafe_Union.unsafeUnionFn(r1, r2);
  17048. };
  17049. };
  17050. };
  17051. };
  17052. var $$delete = function $$delete(dictIsSymbol) {
  17053. return function (dictLacks) {
  17054. return function (dictCons) {
  17055. return function (l) {
  17056. return function (r2) {
  17057. return $foreign.unsafeDelete(Data_Symbol.reflectSymbol(dictIsSymbol)(l))(r2);
  17058. };
  17059. };
  17060. };
  17061. };
  17062. };
  17063. var categoryBuilder = Control_Category.categoryFn;
  17064. var build = function build(v) {
  17065. return function (r1) {
  17066. return v($foreign.copyRecord(r1));
  17067. };
  17068. };
  17069. module.exports = {
  17070. build: build,
  17071. insert: insert,
  17072. modify: modify,
  17073. "delete": $$delete,
  17074. rename: rename,
  17075. merge: merge,
  17076. union: union,
  17077. disjointUnion: disjointUnion,
  17078. nub: nub,
  17079. semigroupoidBuilder: semigroupoidBuilder,
  17080. categoryBuilder: categoryBuilder
  17081. };
  17082. },{"./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) {
  17083. // Generated by purs version 0.13.6
  17084. "use strict";
  17085. var Control_Applicative = require("../Control.Applicative/index.js");
  17086. var Control_Apply = require("../Control.Apply/index.js");
  17087. var Control_Bind = require("../Control.Bind/index.js");
  17088. var Control_Monad = require("../Control.Monad/index.js");
  17089. var Data_BooleanAlgebra = require("../Data.BooleanAlgebra/index.js");
  17090. var Data_Bounded = require("../Data.Bounded/index.js");
  17091. var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
  17092. var Data_Eq = require("../Data.Eq/index.js");
  17093. var Data_Functor = require("../Data.Functor/index.js");
  17094. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  17095. var Data_Ord = require("../Data.Ord/index.js");
  17096. var Data_Ordering = require("../Data.Ordering/index.js");
  17097. var Data_Ring = require("../Data.Ring/index.js");
  17098. var Data_Semigroup = require("../Data.Semigroup/index.js");
  17099. var Data_Semiring = require("../Data.Semiring/index.js");
  17100. var Data_Show = require("../Data.Show/index.js");
  17101. var Proxy3 = function () {
  17102. function Proxy3() {}
  17103. ;
  17104. Proxy3.value = new Proxy3();
  17105. return Proxy3;
  17106. }();
  17107. var Proxy2 = function () {
  17108. function Proxy2() {}
  17109. ;
  17110. Proxy2.value = new Proxy2();
  17111. return Proxy2;
  17112. }();
  17113. var $$Proxy = function () {
  17114. function $$Proxy() {}
  17115. ;
  17116. $$Proxy.value = new $$Proxy();
  17117. return $$Proxy;
  17118. }();
  17119. var showProxy3 = new Data_Show.Show(function (v) {
  17120. return "Proxy3";
  17121. });
  17122. var showProxy2 = new Data_Show.Show(function (v) {
  17123. return "Proxy2";
  17124. });
  17125. var showProxy = new Data_Show.Show(function (v) {
  17126. return "Proxy";
  17127. });
  17128. var semiringProxy3 = new Data_Semiring.Semiring(function (v) {
  17129. return function (v1) {
  17130. return Proxy3.value;
  17131. };
  17132. }, function (v) {
  17133. return function (v1) {
  17134. return Proxy3.value;
  17135. };
  17136. }, Proxy3.value, Proxy3.value);
  17137. var semiringProxy2 = new Data_Semiring.Semiring(function (v) {
  17138. return function (v1) {
  17139. return Proxy2.value;
  17140. };
  17141. }, function (v) {
  17142. return function (v1) {
  17143. return Proxy2.value;
  17144. };
  17145. }, Proxy2.value, Proxy2.value);
  17146. var semiringProxy = new Data_Semiring.Semiring(function (v) {
  17147. return function (v1) {
  17148. return $$Proxy.value;
  17149. };
  17150. }, function (v) {
  17151. return function (v1) {
  17152. return $$Proxy.value;
  17153. };
  17154. }, $$Proxy.value, $$Proxy.value);
  17155. var semigroupProxy3 = new Data_Semigroup.Semigroup(function (v) {
  17156. return function (v1) {
  17157. return Proxy3.value;
  17158. };
  17159. });
  17160. var semigroupProxy2 = new Data_Semigroup.Semigroup(function (v) {
  17161. return function (v1) {
  17162. return Proxy2.value;
  17163. };
  17164. });
  17165. var semigroupProxy = new Data_Semigroup.Semigroup(function (v) {
  17166. return function (v1) {
  17167. return $$Proxy.value;
  17168. };
  17169. });
  17170. var ringProxy3 = new Data_Ring.Ring(function () {
  17171. return semiringProxy3;
  17172. }, function (v) {
  17173. return function (v1) {
  17174. return Proxy3.value;
  17175. };
  17176. });
  17177. var ringProxy2 = new Data_Ring.Ring(function () {
  17178. return semiringProxy2;
  17179. }, function (v) {
  17180. return function (v1) {
  17181. return Proxy2.value;
  17182. };
  17183. });
  17184. var ringProxy = new Data_Ring.Ring(function () {
  17185. return semiringProxy;
  17186. }, function (v) {
  17187. return function (v1) {
  17188. return $$Proxy.value;
  17189. };
  17190. });
  17191. var heytingAlgebraProxy3 = new Data_HeytingAlgebra.HeytingAlgebra(function (v) {
  17192. return function (v1) {
  17193. return Proxy3.value;
  17194. };
  17195. }, function (v) {
  17196. return function (v1) {
  17197. return Proxy3.value;
  17198. };
  17199. }, Proxy3.value, function (v) {
  17200. return function (v1) {
  17201. return Proxy3.value;
  17202. };
  17203. }, function (v) {
  17204. return Proxy3.value;
  17205. }, Proxy3.value);
  17206. var heytingAlgebraProxy2 = new Data_HeytingAlgebra.HeytingAlgebra(function (v) {
  17207. return function (v1) {
  17208. return Proxy2.value;
  17209. };
  17210. }, function (v) {
  17211. return function (v1) {
  17212. return Proxy2.value;
  17213. };
  17214. }, Proxy2.value, function (v) {
  17215. return function (v1) {
  17216. return Proxy2.value;
  17217. };
  17218. }, function (v) {
  17219. return Proxy2.value;
  17220. }, Proxy2.value);
  17221. var heytingAlgebraProxy = new Data_HeytingAlgebra.HeytingAlgebra(function (v) {
  17222. return function (v1) {
  17223. return $$Proxy.value;
  17224. };
  17225. }, function (v) {
  17226. return function (v1) {
  17227. return $$Proxy.value;
  17228. };
  17229. }, $$Proxy.value, function (v) {
  17230. return function (v1) {
  17231. return $$Proxy.value;
  17232. };
  17233. }, function (v) {
  17234. return $$Proxy.value;
  17235. }, $$Proxy.value);
  17236. var functorProxy = new Data_Functor.Functor(function (f) {
  17237. return function (m) {
  17238. return $$Proxy.value;
  17239. };
  17240. });
  17241. var eqProxy3 = new Data_Eq.Eq(function (x) {
  17242. return function (y) {
  17243. return true;
  17244. };
  17245. });
  17246. var ordProxy3 = new Data_Ord.Ord(function () {
  17247. return eqProxy3;
  17248. }, function (x) {
  17249. return function (y) {
  17250. return Data_Ordering.EQ.value;
  17251. };
  17252. });
  17253. var eqProxy2 = new Data_Eq.Eq(function (x) {
  17254. return function (y) {
  17255. return true;
  17256. };
  17257. });
  17258. var ordProxy2 = new Data_Ord.Ord(function () {
  17259. return eqProxy2;
  17260. }, function (x) {
  17261. return function (y) {
  17262. return Data_Ordering.EQ.value;
  17263. };
  17264. });
  17265. var eqProxy = new Data_Eq.Eq(function (x) {
  17266. return function (y) {
  17267. return true;
  17268. };
  17269. });
  17270. var ordProxy = new Data_Ord.Ord(function () {
  17271. return eqProxy;
  17272. }, function (x) {
  17273. return function (y) {
  17274. return Data_Ordering.EQ.value;
  17275. };
  17276. });
  17277. var discardProxy3 = new Control_Bind.Discard(function (dictBind) {
  17278. return Control_Bind.bind(dictBind);
  17279. });
  17280. var discardProxy2 = new Control_Bind.Discard(function (dictBind) {
  17281. return Control_Bind.bind(dictBind);
  17282. });
  17283. var discardProxy = new Control_Bind.Discard(function (dictBind) {
  17284. return Control_Bind.bind(dictBind);
  17285. });
  17286. var commutativeRingProxy3 = new Data_CommutativeRing.CommutativeRing(function () {
  17287. return ringProxy3;
  17288. });
  17289. var commutativeRingProxy2 = new Data_CommutativeRing.CommutativeRing(function () {
  17290. return ringProxy2;
  17291. });
  17292. var commutativeRingProxy = new Data_CommutativeRing.CommutativeRing(function () {
  17293. return ringProxy;
  17294. });
  17295. var boundedProxy3 = new Data_Bounded.Bounded(function () {
  17296. return ordProxy3;
  17297. }, Proxy3.value, Proxy3.value);
  17298. var boundedProxy2 = new Data_Bounded.Bounded(function () {
  17299. return ordProxy2;
  17300. }, Proxy2.value, Proxy2.value);
  17301. var boundedProxy = new Data_Bounded.Bounded(function () {
  17302. return ordProxy;
  17303. }, $$Proxy.value, $$Proxy.value);
  17304. var booleanAlgebraProxy3 = new Data_BooleanAlgebra.BooleanAlgebra(function () {
  17305. return heytingAlgebraProxy3;
  17306. });
  17307. var booleanAlgebraProxy2 = new Data_BooleanAlgebra.BooleanAlgebra(function () {
  17308. return heytingAlgebraProxy2;
  17309. });
  17310. var booleanAlgebraProxy = new Data_BooleanAlgebra.BooleanAlgebra(function () {
  17311. return heytingAlgebraProxy;
  17312. });
  17313. var applyProxy = new Control_Apply.Apply(function () {
  17314. return functorProxy;
  17315. }, function (v) {
  17316. return function (v1) {
  17317. return $$Proxy.value;
  17318. };
  17319. });
  17320. var bindProxy = new Control_Bind.Bind(function () {
  17321. return applyProxy;
  17322. }, function (v) {
  17323. return function (v1) {
  17324. return $$Proxy.value;
  17325. };
  17326. });
  17327. var applicativeProxy = new Control_Applicative.Applicative(function () {
  17328. return applyProxy;
  17329. }, function (v) {
  17330. return $$Proxy.value;
  17331. });
  17332. var monadProxy = new Control_Monad.Monad(function () {
  17333. return applicativeProxy;
  17334. }, function () {
  17335. return bindProxy;
  17336. });
  17337. module.exports = {
  17338. "Proxy": $$Proxy,
  17339. Proxy2: Proxy2,
  17340. Proxy3: Proxy3,
  17341. eqProxy: eqProxy,
  17342. functorProxy: functorProxy,
  17343. ordProxy: ordProxy,
  17344. applicativeProxy: applicativeProxy,
  17345. applyProxy: applyProxy,
  17346. bindProxy: bindProxy,
  17347. booleanAlgebraProxy: booleanAlgebraProxy,
  17348. boundedProxy: boundedProxy,
  17349. commutativeRingProxy: commutativeRingProxy,
  17350. discardProxy: discardProxy,
  17351. heytingAlgebraProxy: heytingAlgebraProxy,
  17352. monadProxy: monadProxy,
  17353. ringProxy: ringProxy,
  17354. semigroupProxy: semigroupProxy,
  17355. semiringProxy: semiringProxy,
  17356. showProxy: showProxy,
  17357. eqProxy2: eqProxy2,
  17358. ordProxy2: ordProxy2,
  17359. booleanAlgebraProxy2: booleanAlgebraProxy2,
  17360. boundedProxy2: boundedProxy2,
  17361. commutativeRingProxy2: commutativeRingProxy2,
  17362. discardProxy2: discardProxy2,
  17363. heytingAlgebraProxy2: heytingAlgebraProxy2,
  17364. ringProxy2: ringProxy2,
  17365. semigroupProxy2: semigroupProxy2,
  17366. semiringProxy2: semiringProxy2,
  17367. showProxy2: showProxy2,
  17368. eqProxy3: eqProxy3,
  17369. ordProxy3: ordProxy3,
  17370. booleanAlgebraProxy3: booleanAlgebraProxy3,
  17371. boundedProxy3: boundedProxy3,
  17372. commutativeRingProxy3: commutativeRingProxy3,
  17373. discardProxy3: discardProxy3,
  17374. heytingAlgebraProxy3: heytingAlgebraProxy3,
  17375. ringProxy3: ringProxy3,
  17376. semigroupProxy3: semigroupProxy3,
  17377. semiringProxy3: semiringProxy3,
  17378. showProxy3: showProxy3
  17379. };
  17380. },{"../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) {
  17381. // Generated by purs version 0.13.6
  17382. "use strict";
  17383. var Control_Alt = require("../Control.Alt/index.js");
  17384. var Control_Applicative = require("../Control.Applicative/index.js");
  17385. var Control_Bind = require("../Control.Bind/index.js");
  17386. var Control_Category = require("../Control.Category/index.js");
  17387. var Control_Monad_Except = require("../Control.Monad.Except/index.js");
  17388. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  17389. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  17390. var Data_Array = require("../Data.Array/index.js");
  17391. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  17392. var Data_Either = require("../Data.Either/index.js");
  17393. var Data_Foldable = require("../Data.Foldable/index.js");
  17394. var Data_Function = require("../Data.Function/index.js");
  17395. var Data_Functor = require("../Data.Functor/index.js");
  17396. var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
  17397. var Data_Identity = require("../Data.Identity/index.js");
  17398. var Data_List = require("../Data.List/index.js");
  17399. var Data_List_Types = require("../Data.List.Types/index.js");
  17400. var Data_Maybe = require("../Data.Maybe/index.js");
  17401. var Data_Monoid = require("../Data.Monoid/index.js");
  17402. var Data_Newtype = require("../Data.Newtype/index.js");
  17403. var Data_Semigroup = require("../Data.Semigroup/index.js");
  17404. var Data_Show = require("../Data.Show/index.js");
  17405. var Data_Symbol = require("../Data.Symbol/index.js");
  17406. var Data_Traversable = require("../Data.Traversable/index.js");
  17407. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  17408. var Data_Unit = require("../Data.Unit/index.js");
  17409. var Data_Void = require("../Data.Void/index.js");
  17410. var Foreign = require("../Foreign/index.js");
  17411. var Foreign_Generic_Internal = require("../Foreign.Generic.Internal/index.js");
  17412. var Foreign_Index = require("../Foreign.Index/index.js");
  17413. var Foreign_NullOrUndefined = require("../Foreign.NullOrUndefined/index.js");
  17414. var Foreign_Object = require("../Foreign.Object/index.js");
  17415. var Record = require("../Record/index.js");
  17416. var Record_Builder = require("../Record.Builder/index.js");
  17417. var Type_Data_RowList = require("../Type.Data.RowList/index.js");
  17418. var Type_Proxy = require("../Type.Proxy/index.js");
  17419. var TaggedObject = function () {
  17420. function TaggedObject(value0) {
  17421. this.value0 = value0;
  17422. }
  17423. ;
  17424. TaggedObject.create = function (value0) {
  17425. return new TaggedObject(value0);
  17426. };
  17427. return TaggedObject;
  17428. }();
  17429. var GenericEncodeArgs = function GenericEncodeArgs(encodeArgs) {
  17430. this.encodeArgs = encodeArgs;
  17431. };
  17432. var GenericEncode = function GenericEncode(encodeOpts) {
  17433. this.encodeOpts = encodeOpts;
  17434. };
  17435. var GenericDecodeArgs = function GenericDecodeArgs(decodeArgs) {
  17436. this.decodeArgs = decodeArgs;
  17437. };
  17438. var GenericDecode = function GenericDecode(decodeOpts) {
  17439. this.decodeOpts = decodeOpts;
  17440. };
  17441. var GenericCountArgs = function GenericCountArgs(countArgs) {
  17442. this.countArgs = countArgs;
  17443. };
  17444. var EncodeWithOptions = function EncodeWithOptions(encodeWithOptions) {
  17445. this.encodeWithOptions = encodeWithOptions;
  17446. };
  17447. var EncodeRecord = function EncodeRecord(encodeRecordWithOptions) {
  17448. this.encodeRecordWithOptions = encodeRecordWithOptions;
  17449. };
  17450. var Encode = function Encode(encode) {
  17451. this.encode = encode;
  17452. };
  17453. var DecodeWithOptions = function DecodeWithOptions(decodeWithOptions) {
  17454. this.decodeWithOptions = decodeWithOptions;
  17455. };
  17456. var DecodeRecord = function DecodeRecord(decodeRecordWithOptions) {
  17457. this.decodeRecordWithOptions = decodeRecordWithOptions;
  17458. };
  17459. var Decode = function Decode(decode) {
  17460. this.decode = decode;
  17461. };
  17462. var voidEncode = new Encode(Data_Void.absurd);
  17463. var voidDecode = new Decode(function (v) {
  17464. 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"))));
  17465. });
  17466. var unitEncode = new Encode(function (v) {
  17467. return Foreign.unsafeToForeign({});
  17468. });
  17469. var unitDecode = new Decode(function (v) {
  17470. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Data_Unit.unit);
  17471. });
  17472. var stringEncode = new Encode(Foreign.unsafeToForeign);
  17473. var stringDecode = new Decode(Foreign.readString);
  17474. var numberEncode = new Encode(Foreign.unsafeToForeign);
  17475. var numberDecode = new Decode(Foreign.readNumber);
  17476. var intEncode = new Encode(Foreign.unsafeToForeign);
  17477. var intDecode = new Decode(Foreign.readInt);
  17478. var genericEncodeArgsNoArguments = new GenericEncodeArgs(function (v) {
  17479. return Data_Monoid.mempty(Data_Monoid.monoidFn(Data_List_Types.monoidList));
  17480. });
  17481. var genericDecodeNoConstructors = new GenericDecode(function (opts) {
  17482. return function (v) {
  17483. return Foreign.fail(new Foreign.ForeignError("No constructors"));
  17484. };
  17485. });
  17486. var genericDecodeArgsNoArguments = new GenericDecodeArgs(function (v) {
  17487. return function (v1) {
  17488. return function (v2) {
  17489. if (v2 instanceof Data_List_Types.Nil) {
  17490. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({
  17491. result: Data_Generic_Rep.NoArguments.value,
  17492. rest: Data_List_Types.Nil.value,
  17493. next: v1
  17494. });
  17495. }
  17496. ;
  17497. return Foreign.fail(new Foreign.ForeignError("Too many constructor arguments"));
  17498. };
  17499. };
  17500. });
  17501. var genericCountArgsNoArguments = new GenericCountArgs(function (v) {
  17502. return new Data_Either.Left(Data_Generic_Rep.NoArguments.value);
  17503. });
  17504. var genericCountArgsArgument = new GenericCountArgs(function (v) {
  17505. return new Data_Either.Right(1);
  17506. });
  17507. var foreignEncode = new Encode(Control_Category.identity(Control_Category.categoryFn));
  17508. var foreignDecode = new Decode(Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity)));
  17509. var encodeWithOptions = function encodeWithOptions(dict) {
  17510. return dict.encodeWithOptions;
  17511. };
  17512. var genericEncodeArgsArgument = function genericEncodeArgsArgument(dictEncodeWithOptions) {
  17513. return new GenericEncodeArgs(function (opts) {
  17514. return function (v) {
  17515. return Data_List.singleton(encodeWithOptions(dictEncodeWithOptions)(opts)(v));
  17516. };
  17517. });
  17518. };
  17519. var encodeRecordWithOptions = function encodeRecordWithOptions(dict) {
  17520. return dict.encodeRecordWithOptions;
  17521. };
  17522. var encodeWithOptionsRecord = function encodeWithOptionsRecord(dictRowToList) {
  17523. return function (dictEncodeRecord) {
  17524. return new EncodeWithOptions(function (opts) {
  17525. var $148 = encodeRecordWithOptions(dictEncodeRecord)(Type_Data_RowList.RLProxy.value)(opts);
  17526. return function ($149) {
  17527. return Foreign.unsafeToForeign($148($149));
  17528. };
  17529. });
  17530. };
  17531. };
  17532. var encodeRecordNil = new EncodeRecord(function (v) {
  17533. return function (v1) {
  17534. return function (v2) {
  17535. return Foreign_Object.empty;
  17536. };
  17537. };
  17538. });
  17539. var encodeRecordCons = function encodeRecordCons(dictCons) {
  17540. return function (dictEncodeRecord) {
  17541. return function (dictIsSymbol) {
  17542. return function (dictEncodeWithOptions) {
  17543. return new EncodeRecord(function (v) {
  17544. return function (opts) {
  17545. return function (rec) {
  17546. var obj = encodeRecordWithOptions(dictEncodeRecord)(Type_Data_RowList.RLProxy.value)(opts)(rec);
  17547. var l = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  17548. return Foreign_Object.insert(opts.fieldTransform(l))(encodeWithOptions(dictEncodeWithOptions)(opts)(Record.get(dictIsSymbol)()(Data_Symbol.SProxy.value)(rec)))(obj);
  17549. };
  17550. };
  17551. });
  17552. };
  17553. };
  17554. };
  17555. };
  17556. var encodeOpts = function encodeOpts(dict) {
  17557. return dict.encodeOpts;
  17558. };
  17559. var genericEncodeNoConstructors = new GenericEncode(function (opts) {
  17560. return function (a) {
  17561. return encodeOpts(genericEncodeNoConstructors)(opts)(a);
  17562. };
  17563. });
  17564. var genericEncodeSum = function genericEncodeSum(dictGenericEncode) {
  17565. return function (dictGenericEncode1) {
  17566. return new GenericEncode(function (opts) {
  17567. return function (v) {
  17568. if (v instanceof Data_Generic_Rep.Inl) {
  17569. return encodeOpts(dictGenericEncode)({
  17570. sumEncoding: opts.sumEncoding,
  17571. unwrapSingleConstructors: false,
  17572. unwrapSingleArguments: opts.unwrapSingleArguments,
  17573. fieldTransform: opts.fieldTransform
  17574. })(v.value0);
  17575. }
  17576. ;
  17577. if (v instanceof Data_Generic_Rep.Inr) {
  17578. return encodeOpts(dictGenericEncode1)({
  17579. sumEncoding: opts.sumEncoding,
  17580. unwrapSingleConstructors: false,
  17581. unwrapSingleArguments: opts.unwrapSingleArguments,
  17582. fieldTransform: opts.fieldTransform
  17583. })(v.value0);
  17584. }
  17585. ;
  17586. throw new Error("Failed pattern match at Foreign.Generic.Class (line 351, column 1 - line 355, column 85): " + [opts.constructor.name, v.constructor.name]);
  17587. };
  17588. });
  17589. };
  17590. };
  17591. var encodeArgs = function encodeArgs(dict) {
  17592. return dict.encodeArgs;
  17593. };
  17594. var genericEncodeArgsProduct = function genericEncodeArgsProduct(dictGenericEncodeArgs) {
  17595. return function (dictGenericEncodeArgs1) {
  17596. return new GenericEncodeArgs(function (opts) {
  17597. return function (v) {
  17598. return Data_Semigroup.append(Data_List_Types.semigroupList)(encodeArgs(dictGenericEncodeArgs)(opts)(v.value0))(encodeArgs(dictGenericEncodeArgs1)(opts)(v.value1));
  17599. };
  17600. });
  17601. };
  17602. };
  17603. var genericEncodeConstructor = function genericEncodeConstructor(dictIsSymbol) {
  17604. return function (dictGenericEncodeArgs) {
  17605. return new GenericEncode(function (opts) {
  17606. return function (v) {
  17607. var unwrapArguments = function unwrapArguments(v1) {
  17608. if (v1.length === 0) {
  17609. return Data_Maybe.Nothing.value;
  17610. }
  17611. ;
  17612. if (v1.length === 1 && opts.unwrapSingleArguments) {
  17613. return new Data_Maybe.Just(v1[0]);
  17614. }
  17615. ;
  17616. return new Data_Maybe.Just(Foreign.unsafeToForeign(v1));
  17617. };
  17618. var encodeArgsArray = function () {
  17619. var $150 = Data_List.toUnfoldable(Data_Unfoldable.unfoldableArray);
  17620. var $151 = encodeArgs(dictGenericEncodeArgs)(opts);
  17621. return function ($152) {
  17622. return unwrapArguments($150($151($152)));
  17623. };
  17624. }();
  17625. var ctorName = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  17626. if (opts.unwrapSingleConstructors) {
  17627. return Data_Maybe.maybe(Foreign.unsafeToForeign({}))(Foreign.unsafeToForeign)(encodeArgsArray(v));
  17628. }
  17629. ;
  17630. 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))));
  17631. };
  17632. });
  17633. };
  17634. };
  17635. var encode = function encode(dict) {
  17636. return dict.encode;
  17637. };
  17638. var encodeWithOptionsOther = function encodeWithOptionsOther(dictEncode) {
  17639. return new EncodeWithOptions(function (v) {
  17640. return encode(dictEncode);
  17641. });
  17642. };
  17643. var identityEncode = function identityEncode(dictEncode) {
  17644. return new Encode(function () {
  17645. var $153 = encode(dictEncode);
  17646. var $154 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
  17647. return function ($155) {
  17648. return $153($154($155));
  17649. };
  17650. }());
  17651. };
  17652. var maybeEncode = function maybeEncode(dictEncode) {
  17653. return new Encode(Data_Maybe.maybe(Foreign_NullOrUndefined["null"])(encode(dictEncode)));
  17654. };
  17655. var objectEncode = function objectEncode(dictEncode) {
  17656. return new Encode(function () {
  17657. var $156 = Foreign_Object.mapWithKey(function (v) {
  17658. return encode(dictEncode);
  17659. });
  17660. return function ($157) {
  17661. return Foreign.unsafeToForeign($156($157));
  17662. };
  17663. }());
  17664. };
  17665. var defaultOptions = {
  17666. sumEncoding: new TaggedObject({
  17667. tagFieldName: "tag",
  17668. contentsFieldName: "contents",
  17669. constructorTagTransform: Control_Category.identity(Control_Category.categoryFn)
  17670. }),
  17671. unwrapSingleConstructors: false,
  17672. unwrapSingleArguments: true,
  17673. fieldTransform: Control_Category.identity(Control_Category.categoryFn)
  17674. };
  17675. var recordEncode = function recordEncode(dictRowToList) {
  17676. return function (dictEncodeRecord) {
  17677. return new Encode(encodeWithOptions(encodeWithOptionsRecord()(dictEncodeRecord))(defaultOptions));
  17678. };
  17679. };
  17680. var decodeWithOptions = function decodeWithOptions(dict) {
  17681. return dict.decodeWithOptions;
  17682. };
  17683. var genericDecodeArgsArgument = function genericDecodeArgsArgument(dictDecodeWithOptions) {
  17684. return new GenericDecodeArgs(function (v) {
  17685. return function (v1) {
  17686. return function (v2) {
  17687. if (v2 instanceof Data_List_Types.Cons) {
  17688. 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) {
  17689. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({
  17690. result: a,
  17691. rest: v2.value1,
  17692. next: v1 + 1 | 0
  17693. });
  17694. });
  17695. }
  17696. ;
  17697. return Foreign.fail(new Foreign.ForeignError("Not enough constructor arguments"));
  17698. };
  17699. };
  17700. });
  17701. };
  17702. var decodeRecordWithOptions = function decodeRecordWithOptions(dict) {
  17703. return dict.decodeRecordWithOptions;
  17704. };
  17705. var decodeWithOptionsRecord = function decodeWithOptionsRecord(dictRowToList) {
  17706. return function (dictDecodeRecord) {
  17707. return new DecodeWithOptions(function (opts) {
  17708. 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));
  17709. });
  17710. };
  17711. };
  17712. var recordDecode = function recordDecode(dictRowToList) {
  17713. return function (dictDecodeRecord) {
  17714. return new Decode(decodeWithOptions(decodeWithOptionsRecord()(dictDecodeRecord))(defaultOptions));
  17715. };
  17716. };
  17717. var decodeRecordNil = new DecodeRecord(function (v) {
  17718. return function (v1) {
  17719. return function (v2) {
  17720. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(Control_Category.identity(Record_Builder.categoryBuilder));
  17721. };
  17722. };
  17723. });
  17724. var decodeRecordCons = function decodeRecordCons(dictCons) {
  17725. return function (dictDecodeRecord) {
  17726. return function (dictIsSymbol) {
  17727. return function (dictDecodeWithOptions) {
  17728. return function (dictLacks) {
  17729. return new DecodeRecord(function (v) {
  17730. return function (opts) {
  17731. return function (f) {
  17732. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeRecordWithOptions(dictDecodeRecord)(Type_Data_RowList.RLProxy.value)(opts)(f))(function (builder) {
  17733. var l = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  17734. var l_transformed = opts.fieldTransform(l);
  17735. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign_Index.index(Foreign_Index.indexString)(f)(l_transformed))(function (f_) {
  17736. 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) {
  17737. 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)));
  17738. });
  17739. });
  17740. });
  17741. };
  17742. };
  17743. });
  17744. };
  17745. };
  17746. };
  17747. };
  17748. };
  17749. var decodeOpts = function decodeOpts(dict) {
  17750. return dict.decodeOpts;
  17751. };
  17752. var genericDecodeSum = function genericDecodeSum(dictGenericDecode) {
  17753. return function (dictGenericDecode1) {
  17754. return new GenericDecode(function (opts) {
  17755. return function (f) {
  17756. var opts$prime = {
  17757. unwrapSingleConstructors: false,
  17758. fieldTransform: opts.fieldTransform,
  17759. sumEncoding: opts.sumEncoding,
  17760. unwrapSingleArguments: opts.unwrapSingleArguments
  17761. };
  17762. 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)));
  17763. };
  17764. });
  17765. };
  17766. };
  17767. var decodeArgs = function decodeArgs(dict) {
  17768. return dict.decodeArgs;
  17769. };
  17770. var genericDecodeArgsProduct = function genericDecodeArgsProduct(dictGenericDecodeArgs) {
  17771. return function (dictGenericDecodeArgs1) {
  17772. return new GenericDecodeArgs(function (opts) {
  17773. return function (i) {
  17774. return function (xs) {
  17775. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs)(opts)(i)(xs))(function (v) {
  17776. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs1)(opts)(v.next)(v.rest))(function (v1) {
  17777. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))({
  17778. result: new Data_Generic_Rep.Product(v.result, v1.result),
  17779. rest: v1.rest,
  17780. next: v1.next
  17781. });
  17782. });
  17783. });
  17784. };
  17785. };
  17786. });
  17787. };
  17788. };
  17789. var decode = function decode(dict) {
  17790. return dict.decode;
  17791. };
  17792. var decodeWithOptionsOther = function decodeWithOptionsOther(dictDecode) {
  17793. return new DecodeWithOptions(function (v) {
  17794. return decode(dictDecode);
  17795. });
  17796. };
  17797. var identityDecode = function identityDecode(dictDecode) {
  17798. return new Decode(function () {
  17799. var $158 = Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Identity.Identity);
  17800. var $159 = decode(dictDecode);
  17801. return function ($160) {
  17802. return $158($159($160));
  17803. };
  17804. }());
  17805. };
  17806. var maybeDecode = function maybeDecode(dictDecode) {
  17807. return new Decode(Foreign_NullOrUndefined.readNullOrUndefined(decode(dictDecode)));
  17808. };
  17809. var objectDecode = function objectDecode(dictDecode) {
  17810. return new Decode(Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(function () {
  17811. var $161 = Data_Traversable.sequence(Foreign_Object.traversableObject)(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity));
  17812. var $162 = Foreign_Object.mapWithKey(function (v) {
  17813. return decode(dictDecode);
  17814. });
  17815. return function ($163) {
  17816. return $161($162($163));
  17817. };
  17818. }())(Foreign_Generic_Internal.readObject));
  17819. };
  17820. var countArgs = function countArgs(dict) {
  17821. return dict.countArgs;
  17822. };
  17823. var genericCountArgsProduct = function genericCountArgsProduct(dictGenericCountArgs) {
  17824. return function (dictGenericCountArgs1) {
  17825. return new GenericCountArgs(function (v) {
  17826. var v1 = countArgs(dictGenericCountArgs1)(Type_Proxy["Proxy"].value);
  17827. var v2 = countArgs(dictGenericCountArgs)(Type_Proxy["Proxy"].value);
  17828. if (v2 instanceof Data_Either.Left && v1 instanceof Data_Either.Left) {
  17829. return new Data_Either.Left(new Data_Generic_Rep.Product(v2.value0, v1.value0));
  17830. }
  17831. ;
  17832. if (v2 instanceof Data_Either.Left && v1 instanceof Data_Either.Right) {
  17833. return new Data_Either.Right(v1.value0);
  17834. }
  17835. ;
  17836. if (v2 instanceof Data_Either.Right && v1 instanceof Data_Either.Left) {
  17837. return new Data_Either.Right(v2.value0);
  17838. }
  17839. ;
  17840. if (v2 instanceof Data_Either.Right && v1 instanceof Data_Either.Right) {
  17841. return new Data_Either.Right(v2.value0 + v1.value0 | 0);
  17842. }
  17843. ;
  17844. throw new Error("Failed pattern match at Foreign.Generic.Class (line 400, column 5 - line 404, column 40): " + [v2.constructor.name, v1.constructor.name]);
  17845. });
  17846. };
  17847. };
  17848. var genericDecodeConstructor = function genericDecodeConstructor(dictIsSymbol) {
  17849. return function (dictGenericDecodeArgs) {
  17850. return function (dictGenericCountArgs) {
  17851. return new GenericDecode(function (opts) {
  17852. return function (f) {
  17853. var numArgs = countArgs(dictGenericCountArgs)(Type_Proxy["Proxy"].value);
  17854. var readArguments = function readArguments(args) {
  17855. if (numArgs instanceof Data_Either.Left) {
  17856. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(numArgs.value0);
  17857. }
  17858. ;
  17859. if (numArgs instanceof Data_Either.Right && numArgs.value0 === 1 && opts.unwrapSingleArguments) {
  17860. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(decodeArgs(dictGenericDecodeArgs)(opts)(0)(Data_List.singleton(args)))(function (v) {
  17861. 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 () {
  17862. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(v.result);
  17863. });
  17864. });
  17865. }
  17866. ;
  17867. if (numArgs instanceof Data_Either.Right) {
  17868. return Control_Bind.bind(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign.readArray(args))(function (vals) {
  17869. 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) {
  17870. 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 () {
  17871. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(v.result);
  17872. });
  17873. });
  17874. });
  17875. }
  17876. ;
  17877. throw new Error("Failed pattern match at Foreign.Generic.Class (line 307, column 9 - line 319, column 24): " + [numArgs.constructor.name]);
  17878. };
  17879. var ctorName = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  17880. if (opts.unwrapSingleConstructors) {
  17881. return Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Generic_Rep.Constructor)(readArguments(f));
  17882. }
  17883. ;
  17884. 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) {
  17885. var expected = opts.sumEncoding.value0.constructorTagTransform(ctorName);
  17886. 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 () {
  17887. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(tag);
  17888. });
  17889. })))(function (tag) {
  17890. 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) {
  17891. return Control_Applicative.pure(Control_Monad_Except_Trans.applicativeExceptT(Data_Identity.monadIdentity))(args);
  17892. });
  17893. });
  17894. };
  17895. });
  17896. };
  17897. };
  17898. };
  17899. var charEncode = new Encode(Foreign.unsafeToForeign);
  17900. var charDecode = new Decode(Foreign.readChar);
  17901. var booleanEncode = new Encode(Foreign.unsafeToForeign);
  17902. var booleanDecode = new Decode(Foreign.readBoolean);
  17903. var arrayEncode = function arrayEncode(dictEncode) {
  17904. return new Encode(function () {
  17905. var $164 = Data_Functor.map(Data_Functor.functorArray)(encode(dictEncode));
  17906. return function ($165) {
  17907. return Foreign.unsafeToForeign($164($165));
  17908. };
  17909. }());
  17910. };
  17911. var arrayDecode = function arrayDecode(dictDecode) {
  17912. return new Decode(function () {
  17913. var readElement = function readElement(i) {
  17914. return function (value) {
  17915. 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));
  17916. };
  17917. };
  17918. var readElements = function readElements(arr) {
  17919. 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));
  17920. };
  17921. return Control_Bind.composeKleisli(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(Foreign.readArray)(readElements);
  17922. }());
  17923. };
  17924. module.exports = {
  17925. countArgs: countArgs,
  17926. decode: decode,
  17927. decodeArgs: decodeArgs,
  17928. decodeOpts: decodeOpts,
  17929. decodeRecordWithOptions: decodeRecordWithOptions,
  17930. decodeWithOptions: decodeWithOptions,
  17931. encode: encode,
  17932. encodeArgs: encodeArgs,
  17933. encodeOpts: encodeOpts,
  17934. encodeRecordWithOptions: encodeRecordWithOptions,
  17935. encodeWithOptions: encodeWithOptions,
  17936. TaggedObject: TaggedObject,
  17937. defaultOptions: defaultOptions,
  17938. Decode: Decode,
  17939. Encode: Encode,
  17940. DecodeWithOptions: DecodeWithOptions,
  17941. EncodeWithOptions: EncodeWithOptions,
  17942. DecodeRecord: DecodeRecord,
  17943. EncodeRecord: EncodeRecord,
  17944. GenericDecode: GenericDecode,
  17945. GenericEncode: GenericEncode,
  17946. GenericDecodeArgs: GenericDecodeArgs,
  17947. GenericEncodeArgs: GenericEncodeArgs,
  17948. GenericCountArgs: GenericCountArgs,
  17949. voidDecode: voidDecode,
  17950. unitDecode: unitDecode,
  17951. foreignDecode: foreignDecode,
  17952. stringDecode: stringDecode,
  17953. charDecode: charDecode,
  17954. booleanDecode: booleanDecode,
  17955. numberDecode: numberDecode,
  17956. intDecode: intDecode,
  17957. identityDecode: identityDecode,
  17958. arrayDecode: arrayDecode,
  17959. maybeDecode: maybeDecode,
  17960. objectDecode: objectDecode,
  17961. recordDecode: recordDecode,
  17962. voidEncode: voidEncode,
  17963. unitEncode: unitEncode,
  17964. foreignEncode: foreignEncode,
  17965. stringEncode: stringEncode,
  17966. charEncode: charEncode,
  17967. booleanEncode: booleanEncode,
  17968. numberEncode: numberEncode,
  17969. intEncode: intEncode,
  17970. identityEncode: identityEncode,
  17971. arrayEncode: arrayEncode,
  17972. maybeEncode: maybeEncode,
  17973. objectEncode: objectEncode,
  17974. recordEncode: recordEncode,
  17975. decodeWithOptionsRecord: decodeWithOptionsRecord,
  17976. decodeWithOptionsOther: decodeWithOptionsOther,
  17977. encodeWithOptionsRecord: encodeWithOptionsRecord,
  17978. encodeWithOptionsOther: encodeWithOptionsOther,
  17979. decodeRecordNil: decodeRecordNil,
  17980. encodeRecordNil: encodeRecordNil,
  17981. decodeRecordCons: decodeRecordCons,
  17982. encodeRecordCons: encodeRecordCons,
  17983. genericDecodeNoConstructors: genericDecodeNoConstructors,
  17984. genericEncodeNoConstructors: genericEncodeNoConstructors,
  17985. genericDecodeConstructor: genericDecodeConstructor,
  17986. genericEncodeConstructor: genericEncodeConstructor,
  17987. genericDecodeSum: genericDecodeSum,
  17988. genericEncodeSum: genericEncodeSum,
  17989. genericDecodeArgsNoArguments: genericDecodeArgsNoArguments,
  17990. genericEncodeArgsNoArguments: genericEncodeArgsNoArguments,
  17991. genericDecodeArgsArgument: genericDecodeArgsArgument,
  17992. genericEncodeArgsArgument: genericEncodeArgsArgument,
  17993. genericDecodeArgsProduct: genericDecodeArgsProduct,
  17994. genericEncodeArgsProduct: genericEncodeArgsProduct,
  17995. genericCountArgsNoArguments: genericCountArgsNoArguments,
  17996. genericCountArgsArgument: genericCountArgsArgument,
  17997. genericCountArgsProduct: genericCountArgsProduct
  17998. };
  17999. },{"../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) {
  18000. "use strict";
  18001. exports.parseJSONImpl = function (str) {
  18002. return JSON.parse(str);
  18003. };
  18004. },{}],"../output/Effect.Uncurried/foreign.js":[function(require,module,exports) {
  18005. "use strict";
  18006. exports.mkEffectFn1 = function mkEffectFn1(fn) {
  18007. return function (x) {
  18008. return fn(x)();
  18009. };
  18010. };
  18011. exports.mkEffectFn2 = function mkEffectFn2(fn) {
  18012. return function (a, b) {
  18013. return fn(a)(b)();
  18014. };
  18015. };
  18016. exports.mkEffectFn3 = function mkEffectFn3(fn) {
  18017. return function (a, b, c) {
  18018. return fn(a)(b)(c)();
  18019. };
  18020. };
  18021. exports.mkEffectFn4 = function mkEffectFn4(fn) {
  18022. return function (a, b, c, d) {
  18023. return fn(a)(b)(c)(d)();
  18024. };
  18025. };
  18026. exports.mkEffectFn5 = function mkEffectFn5(fn) {
  18027. return function (a, b, c, d, e) {
  18028. return fn(a)(b)(c)(d)(e)();
  18029. };
  18030. };
  18031. exports.mkEffectFn6 = function mkEffectFn6(fn) {
  18032. return function (a, b, c, d, e, f) {
  18033. return fn(a)(b)(c)(d)(e)(f)();
  18034. };
  18035. };
  18036. exports.mkEffectFn7 = function mkEffectFn7(fn) {
  18037. return function (a, b, c, d, e, f, g) {
  18038. return fn(a)(b)(c)(d)(e)(f)(g)();
  18039. };
  18040. };
  18041. exports.mkEffectFn8 = function mkEffectFn8(fn) {
  18042. return function (a, b, c, d, e, f, g, h) {
  18043. return fn(a)(b)(c)(d)(e)(f)(g)(h)();
  18044. };
  18045. };
  18046. exports.mkEffectFn9 = function mkEffectFn9(fn) {
  18047. return function (a, b, c, d, e, f, g, h, i) {
  18048. return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)();
  18049. };
  18050. };
  18051. exports.mkEffectFn10 = function mkEffectFn10(fn) {
  18052. return function (a, b, c, d, e, f, g, h, i, j) {
  18053. return fn(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)();
  18054. };
  18055. };
  18056. exports.runEffectFn1 = function runEffectFn1(fn) {
  18057. return function (a) {
  18058. return function () {
  18059. return fn(a);
  18060. };
  18061. };
  18062. };
  18063. exports.runEffectFn2 = function runEffectFn2(fn) {
  18064. return function (a) {
  18065. return function (b) {
  18066. return function () {
  18067. return fn(a, b);
  18068. };
  18069. };
  18070. };
  18071. };
  18072. exports.runEffectFn3 = function runEffectFn3(fn) {
  18073. return function (a) {
  18074. return function (b) {
  18075. return function (c) {
  18076. return function () {
  18077. return fn(a, b, c);
  18078. };
  18079. };
  18080. };
  18081. };
  18082. };
  18083. exports.runEffectFn4 = function runEffectFn4(fn) {
  18084. return function (a) {
  18085. return function (b) {
  18086. return function (c) {
  18087. return function (d) {
  18088. return function () {
  18089. return fn(a, b, c, d);
  18090. };
  18091. };
  18092. };
  18093. };
  18094. };
  18095. };
  18096. exports.runEffectFn5 = function runEffectFn5(fn) {
  18097. return function (a) {
  18098. return function (b) {
  18099. return function (c) {
  18100. return function (d) {
  18101. return function (e) {
  18102. return function () {
  18103. return fn(a, b, c, d, e);
  18104. };
  18105. };
  18106. };
  18107. };
  18108. };
  18109. };
  18110. };
  18111. exports.runEffectFn6 = function runEffectFn6(fn) {
  18112. return function (a) {
  18113. return function (b) {
  18114. return function (c) {
  18115. return function (d) {
  18116. return function (e) {
  18117. return function (f) {
  18118. return function () {
  18119. return fn(a, b, c, d, e, f);
  18120. };
  18121. };
  18122. };
  18123. };
  18124. };
  18125. };
  18126. };
  18127. };
  18128. exports.runEffectFn7 = function runEffectFn7(fn) {
  18129. return function (a) {
  18130. return function (b) {
  18131. return function (c) {
  18132. return function (d) {
  18133. return function (e) {
  18134. return function (f) {
  18135. return function (g) {
  18136. return function () {
  18137. return fn(a, b, c, d, e, f, g);
  18138. };
  18139. };
  18140. };
  18141. };
  18142. };
  18143. };
  18144. };
  18145. };
  18146. };
  18147. exports.runEffectFn8 = function runEffectFn8(fn) {
  18148. return function (a) {
  18149. return function (b) {
  18150. return function (c) {
  18151. return function (d) {
  18152. return function (e) {
  18153. return function (f) {
  18154. return function (g) {
  18155. return function (h) {
  18156. return function () {
  18157. return fn(a, b, c, d, e, f, g, h);
  18158. };
  18159. };
  18160. };
  18161. };
  18162. };
  18163. };
  18164. };
  18165. };
  18166. };
  18167. };
  18168. exports.runEffectFn9 = function runEffectFn9(fn) {
  18169. return function (a) {
  18170. return function (b) {
  18171. return function (c) {
  18172. return function (d) {
  18173. return function (e) {
  18174. return function (f) {
  18175. return function (g) {
  18176. return function (h) {
  18177. return function (i) {
  18178. return function () {
  18179. return fn(a, b, c, d, e, f, g, h, i);
  18180. };
  18181. };
  18182. };
  18183. };
  18184. };
  18185. };
  18186. };
  18187. };
  18188. };
  18189. };
  18190. };
  18191. exports.runEffectFn10 = function runEffectFn10(fn) {
  18192. return function (a) {
  18193. return function (b) {
  18194. return function (c) {
  18195. return function (d) {
  18196. return function (e) {
  18197. return function (f) {
  18198. return function (g) {
  18199. return function (h) {
  18200. return function (i) {
  18201. return function (j) {
  18202. return function () {
  18203. return fn(a, b, c, d, e, f, g, h, i, j);
  18204. };
  18205. };
  18206. };
  18207. };
  18208. };
  18209. };
  18210. };
  18211. };
  18212. };
  18213. };
  18214. };
  18215. };
  18216. },{}],"../output/Effect.Uncurried/index.js":[function(require,module,exports) {
  18217. // Generated by purs version 0.13.6
  18218. "use strict";
  18219. var $foreign = require("./foreign.js");
  18220. module.exports = {
  18221. mkEffectFn1: $foreign.mkEffectFn1,
  18222. mkEffectFn2: $foreign.mkEffectFn2,
  18223. mkEffectFn3: $foreign.mkEffectFn3,
  18224. mkEffectFn4: $foreign.mkEffectFn4,
  18225. mkEffectFn5: $foreign.mkEffectFn5,
  18226. mkEffectFn6: $foreign.mkEffectFn6,
  18227. mkEffectFn7: $foreign.mkEffectFn7,
  18228. mkEffectFn8: $foreign.mkEffectFn8,
  18229. mkEffectFn9: $foreign.mkEffectFn9,
  18230. mkEffectFn10: $foreign.mkEffectFn10,
  18231. runEffectFn1: $foreign.runEffectFn1,
  18232. runEffectFn2: $foreign.runEffectFn2,
  18233. runEffectFn3: $foreign.runEffectFn3,
  18234. runEffectFn4: $foreign.runEffectFn4,
  18235. runEffectFn5: $foreign.runEffectFn5,
  18236. runEffectFn6: $foreign.runEffectFn6,
  18237. runEffectFn7: $foreign.runEffectFn7,
  18238. runEffectFn8: $foreign.runEffectFn8,
  18239. runEffectFn9: $foreign.runEffectFn9,
  18240. runEffectFn10: $foreign.runEffectFn10
  18241. };
  18242. },{"./foreign.js":"../output/Effect.Uncurried/foreign.js"}],"../output/Effect.Unsafe/foreign.js":[function(require,module,exports) {
  18243. "use strict";
  18244. exports.unsafePerformEffect = function (f) {
  18245. return f();
  18246. };
  18247. },{}],"../output/Effect.Unsafe/index.js":[function(require,module,exports) {
  18248. // Generated by purs version 0.13.6
  18249. "use strict";
  18250. var $foreign = require("./foreign.js");
  18251. module.exports = {
  18252. unsafePerformEffect: $foreign.unsafePerformEffect
  18253. };
  18254. },{"./foreign.js":"../output/Effect.Unsafe/foreign.js"}],"../output/Foreign.JSON/index.js":[function(require,module,exports) {
  18255. // Generated by purs version 0.13.6
  18256. "use strict";
  18257. var $foreign = require("./foreign.js");
  18258. var Control_Applicative = require("../Control.Applicative/index.js");
  18259. var Control_Bind = require("../Control.Bind/index.js");
  18260. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  18261. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  18262. var Data_Either = require("../Data.Either/index.js");
  18263. var Data_Identity = require("../Data.Identity/index.js");
  18264. var Data_List_Types = require("../Data.List.Types/index.js");
  18265. var Effect_Exception = require("../Effect.Exception/index.js");
  18266. var Effect_Uncurried = require("../Effect.Uncurried/index.js");
  18267. var Effect_Unsafe = require("../Effect.Unsafe/index.js");
  18268. var Foreign = require("../Foreign/index.js");
  18269. var parseJSON = function () {
  18270. var $0 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(function () {
  18271. var $3 = Control_Applicative.pure(Data_List_Types.applicativeNonEmptyList);
  18272. return function ($4) {
  18273. return $3(Foreign.ForeignError.create(Effect_Exception.message($4)));
  18274. };
  18275. }());
  18276. var $1 = Effect_Uncurried.runEffectFn1($foreign.parseJSONImpl);
  18277. return function ($2) {
  18278. return Control_Monad_Except_Trans.ExceptT(Data_Identity.Identity($0(Effect_Unsafe.unsafePerformEffect(Effect_Exception["try"]($1($2))))));
  18279. };
  18280. }();
  18281. var decodeJSONWith = function decodeJSONWith(f) {
  18282. return Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(f)(parseJSON);
  18283. };
  18284. module.exports = {
  18285. parseJSON: parseJSON,
  18286. decodeJSONWith: decodeJSONWith
  18287. };
  18288. },{"./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) {
  18289. /* globals exports, JSON */
  18290. "use strict";
  18291. exports.unsafeStringify = function (x) {
  18292. return JSON.stringify(x);
  18293. };
  18294. exports.unsafeToFixed = function (digits) {
  18295. return function (n) {
  18296. return n.toFixed(digits);
  18297. };
  18298. };
  18299. exports.unsafeToExponential = function (digits) {
  18300. return function (n) {
  18301. return n.toExponential(digits);
  18302. };
  18303. };
  18304. exports.unsafeToPrecision = function (digits) {
  18305. return function (n) {
  18306. return n.toPrecision(digits);
  18307. };
  18308. };
  18309. exports.unsafeDecodeURI = decodeURI;
  18310. exports.unsafeEncodeURI = encodeURI;
  18311. exports.unsafeDecodeURIComponent = decodeURIComponent;
  18312. exports.unsafeEncodeURIComponent = encodeURIComponent;
  18313. },{}],"../output/Global.Unsafe/index.js":[function(require,module,exports) {
  18314. // Generated by purs version 0.13.6
  18315. "use strict";
  18316. var $foreign = require("./foreign.js");
  18317. module.exports = {
  18318. unsafeStringify: $foreign.unsafeStringify,
  18319. unsafeToFixed: $foreign.unsafeToFixed,
  18320. unsafeToExponential: $foreign.unsafeToExponential,
  18321. unsafeToPrecision: $foreign.unsafeToPrecision,
  18322. unsafeDecodeURI: $foreign.unsafeDecodeURI,
  18323. unsafeEncodeURI: $foreign.unsafeEncodeURI,
  18324. unsafeDecodeURIComponent: $foreign.unsafeDecodeURIComponent,
  18325. unsafeEncodeURIComponent: $foreign.unsafeEncodeURIComponent
  18326. };
  18327. },{"./foreign.js":"../output/Global.Unsafe/foreign.js"}],"../output/Foreign.Generic/index.js":[function(require,module,exports) {
  18328. // Generated by purs version 0.13.6
  18329. "use strict";
  18330. var Control_Bind = require("../Control.Bind/index.js");
  18331. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  18332. var Data_Functor = require("../Data.Functor/index.js");
  18333. var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
  18334. var Data_Identity = require("../Data.Identity/index.js");
  18335. var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
  18336. var Foreign_JSON = require("../Foreign.JSON/index.js");
  18337. var Global_Unsafe = require("../Global.Unsafe/index.js");
  18338. var genericEncode = function genericEncode(dictGeneric) {
  18339. return function (dictGenericEncode) {
  18340. return function (opts) {
  18341. var $10 = Foreign_Generic_Class.encodeOpts(dictGenericEncode)(opts);
  18342. var $11 = Data_Generic_Rep.from(dictGeneric);
  18343. return function ($12) {
  18344. return $10($11($12));
  18345. };
  18346. };
  18347. };
  18348. };
  18349. var genericEncodeJSON = function genericEncodeJSON(dictGeneric) {
  18350. return function (dictGenericEncode) {
  18351. return function (opts) {
  18352. var $13 = genericEncode(dictGeneric)(dictGenericEncode)(opts);
  18353. return function ($14) {
  18354. return Global_Unsafe.unsafeStringify($13($14));
  18355. };
  18356. };
  18357. };
  18358. };
  18359. var genericDecode = function genericDecode(dictGeneric) {
  18360. return function (dictGenericDecode) {
  18361. return function (opts) {
  18362. var $15 = Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Data_Generic_Rep.to(dictGeneric));
  18363. var $16 = Foreign_Generic_Class.decodeOpts(dictGenericDecode)(opts);
  18364. return function ($17) {
  18365. return $15($16($17));
  18366. };
  18367. };
  18368. };
  18369. };
  18370. var genericDecodeJSON = function genericDecodeJSON(dictGeneric) {
  18371. return function (dictGenericDecode) {
  18372. return function (opts) {
  18373. return Control_Bind.composeKleisliFlipped(Control_Monad_Except_Trans.bindExceptT(Data_Identity.monadIdentity))(genericDecode(dictGeneric)(dictGenericDecode)(opts))(Foreign_JSON.parseJSON);
  18374. };
  18375. };
  18376. };
  18377. var encodeJSON = function encodeJSON(dictEncode) {
  18378. var $18 = Foreign_Generic_Class.encode(dictEncode);
  18379. return function ($19) {
  18380. return Global_Unsafe.unsafeStringify($18($19));
  18381. };
  18382. };
  18383. var decodeJSON = function decodeJSON(dictDecode) {
  18384. return Foreign_JSON.decodeJSONWith(Foreign_Generic_Class.decode(dictDecode));
  18385. };
  18386. module.exports = {
  18387. genericDecode: genericDecode,
  18388. genericEncode: genericEncode,
  18389. decodeJSON: decodeJSON,
  18390. encodeJSON: encodeJSON,
  18391. genericDecodeJSON: genericDecodeJSON,
  18392. genericEncodeJSON: genericEncodeJSON
  18393. };
  18394. },{"../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.Utils/index.js":[function(require,module,exports) {
  18395. // Generated by purs version 0.13.6
  18396. "use strict";
  18397. var $foreign = require("./foreign.js");
  18398. var Control_Applicative = require("../Control.Applicative/index.js");
  18399. var Control_Monad_Except = require("../Control.Monad.Except/index.js");
  18400. var Data_Either = require("../Data.Either/index.js");
  18401. var Data_Foldable = require("../Data.Foldable/index.js");
  18402. var Data_Functor = require("../Data.Functor/index.js");
  18403. var Data_List_Types = require("../Data.List.Types/index.js");
  18404. var Data_Monoid = require("../Data.Monoid/index.js");
  18405. var Effect = require("../Effect/index.js");
  18406. var Effect_Exception = require("../Effect.Exception/index.js");
  18407. var Foreign = require("../Foreign/index.js");
  18408. var Foreign_Generic = require("../Foreign.Generic/index.js");
  18409. var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
  18410. var Listener2 = function Listener2(x) {
  18411. return x;
  18412. };
  18413. var Listener = function Listener(x) {
  18414. return x;
  18415. };
  18416. var unwrapForeign = function unwrapForeign(dictGeneric) {
  18417. return function (dictGenericDecode) {
  18418. return function (d) {
  18419. var v = Control_Monad_Except.runExcept(Foreign_Generic.genericDecode(dictGeneric)(dictGenericDecode)({
  18420. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  18421. unwrapSingleConstructors: true,
  18422. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  18423. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  18424. })(d));
  18425. if (v instanceof Data_Either.Left) {
  18426. 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)));
  18427. }
  18428. ;
  18429. if (v instanceof Data_Either.Right) {
  18430. return Control_Applicative.pure(Effect.applicativeEffect)(v.value0);
  18431. }
  18432. ;
  18433. throw new Error("Failed pattern match at Browser.Utils (line 45, column 19 - line 47, column 24): " + [v.constructor.name]);
  18434. };
  18435. };
  18436. };
  18437. module.exports = {
  18438. unwrapForeign: unwrapForeign,
  18439. mkListenerUnit: $foreign.mkListenerUnit,
  18440. mkListenerOne: $foreign.mkListenerOne,
  18441. mkListenerTwo: $foreign.mkListenerTwo
  18442. };
  18443. },{"./foreign.js":"../output/Browser.Utils/foreign.js","../Control.Applicative/index.js":"../output/Control.Applicative/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","../Effect/index.js":"../output/Effect/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/Effect.Console/foreign.js":[function(require,module,exports) {
  18444. "use strict";
  18445. exports.log = function (s) {
  18446. return function () {
  18447. console.log(s);
  18448. return {};
  18449. };
  18450. };
  18451. exports.warn = function (s) {
  18452. return function () {
  18453. console.warn(s);
  18454. return {};
  18455. };
  18456. };
  18457. exports.error = function (s) {
  18458. return function () {
  18459. console.error(s);
  18460. return {};
  18461. };
  18462. };
  18463. exports.info = function (s) {
  18464. return function () {
  18465. console.info(s);
  18466. return {};
  18467. };
  18468. };
  18469. exports.time = function (s) {
  18470. return function () {
  18471. console.time(s);
  18472. return {};
  18473. };
  18474. };
  18475. exports.timeLog = function (s) {
  18476. return function () {
  18477. console.timeLog(s);
  18478. return {};
  18479. };
  18480. };
  18481. exports.timeEnd = function (s) {
  18482. return function () {
  18483. console.timeEnd(s);
  18484. return {};
  18485. };
  18486. };
  18487. exports.clear = function () {
  18488. console.clear();
  18489. return {};
  18490. };
  18491. },{}],"../output/Effect.Console/index.js":[function(require,module,exports) {
  18492. // Generated by purs version 0.13.6
  18493. "use strict";
  18494. var $foreign = require("./foreign.js");
  18495. var Data_Show = require("../Data.Show/index.js");
  18496. var warnShow = function warnShow(dictShow) {
  18497. return function (a) {
  18498. return $foreign.warn(Data_Show.show(dictShow)(a));
  18499. };
  18500. };
  18501. var logShow = function logShow(dictShow) {
  18502. return function (a) {
  18503. return $foreign.log(Data_Show.show(dictShow)(a));
  18504. };
  18505. };
  18506. var infoShow = function infoShow(dictShow) {
  18507. return function (a) {
  18508. return $foreign.info(Data_Show.show(dictShow)(a));
  18509. };
  18510. };
  18511. var errorShow = function errorShow(dictShow) {
  18512. return function (a) {
  18513. return $foreign.error(Data_Show.show(dictShow)(a));
  18514. };
  18515. };
  18516. module.exports = {
  18517. logShow: logShow,
  18518. warnShow: warnShow,
  18519. errorShow: errorShow,
  18520. infoShow: infoShow,
  18521. log: $foreign.log,
  18522. warn: $foreign.warn,
  18523. error: $foreign.error,
  18524. info: $foreign.info,
  18525. time: $foreign.time,
  18526. timeLog: $foreign.timeLog,
  18527. timeEnd: $foreign.timeEnd,
  18528. clear: $foreign.clear
  18529. };
  18530. },{"./foreign.js":"../output/Effect.Console/foreign.js","../Data.Show/index.js":"../output/Data.Show/index.js"}],"../output/Browser.Runtime/index.js":[function(require,module,exports) {
  18531. // Generated by purs version 0.13.6
  18532. "use strict";
  18533. var $foreign = require("./foreign.js");
  18534. var Browser_Utils = require("../Browser.Utils/index.js");
  18535. var Control_Monad_Except = require("../Control.Monad.Except/index.js");
  18536. var Data_Either = require("../Data.Either/index.js");
  18537. var Data_Eq = require("../Data.Eq/index.js");
  18538. var Data_Foldable = require("../Data.Foldable/index.js");
  18539. var Data_Functor = require("../Data.Functor/index.js");
  18540. var Data_List_Types = require("../Data.List.Types/index.js");
  18541. var Data_Monoid = require("../Data.Monoid/index.js");
  18542. var Effect_Console = require("../Effect.Console/index.js");
  18543. var Foreign = require("../Foreign/index.js");
  18544. var Foreign_Generic = require("../Foreign.Generic/index.js");
  18545. var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
  18546. var postMessageJson = function postMessageJson(dictGeneric) {
  18547. return function (dictGenericEncode) {
  18548. return function (port) {
  18549. return function (d) {
  18550. return $foreign.postMessage(port)(Foreign_Generic.genericEncodeJSON(dictGeneric)(dictGenericEncode)({
  18551. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  18552. unwrapSingleConstructors: true,
  18553. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  18554. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  18555. })(d));
  18556. };
  18557. };
  18558. };
  18559. };
  18560. var onMessageJsonAddListener = function onMessageJsonAddListener(dictGeneric) {
  18561. return function (dictGenericDecode) {
  18562. return function (port) {
  18563. return function (f) {
  18564. var listener = function listener(msg) {
  18565. var v = Control_Monad_Except.runExcept(Foreign_Generic.genericDecodeJSON(dictGeneric)(dictGenericDecode)({
  18566. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  18567. unwrapSingleConstructors: true,
  18568. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  18569. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  18570. })(msg));
  18571. if (v instanceof Data_Either.Left) {
  18572. return function __do() {
  18573. 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)))();
  18574. return Effect_Console.error("message was " + msg)();
  18575. };
  18576. }
  18577. ;
  18578. if (v instanceof Data_Either.Right) {
  18579. return f(v.value0);
  18580. }
  18581. ;
  18582. throw new Error("Failed pattern match at Browser.Runtime (line 46, column 24 - line 50, column 32): " + [v.constructor.name]);
  18583. };
  18584. return function __do() {
  18585. var jsonLst = Browser_Utils.mkListenerOne(listener)();
  18586. $foreign.onMessageAddListener(port)(jsonLst)();
  18587. return jsonLst;
  18588. };
  18589. };
  18590. };
  18591. };
  18592. };
  18593. var eqPort = new Data_Eq.Eq($foreign.portEquality);
  18594. module.exports = {
  18595. postMessageJson: postMessageJson,
  18596. onMessageJsonAddListener: onMessageJsonAddListener,
  18597. eqPort: eqPort,
  18598. connect: $foreign.connect,
  18599. onConnectAddListener: $foreign.onConnectAddListener,
  18600. portOnDisconnect: $foreign.portOnDisconnect,
  18601. postMessage: $foreign.postMessage,
  18602. onMessageAddListener: $foreign.onMessageAddListener,
  18603. onMessageRemoveListener: $foreign.onMessageRemoveListener
  18604. };
  18605. },{"./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/Browser.Tabs/foreign.js":[function(require,module,exports) {
  18606. "use strict";
  18607. exports.queryImpl = function () {
  18608. return browser.tabs.query({});
  18609. };
  18610. },{}],"../output/Control.Promise/foreign.js":[function(require,module,exports) {
  18611. // module Control.Promise
  18612. exports.promise = function (f) {
  18613. return function () {
  18614. return new Promise(function (success, error) {
  18615. var succF = function succF(s) {
  18616. return function () {
  18617. return success(s);
  18618. };
  18619. };
  18620. var failF = function failF(s) {
  18621. return function () {
  18622. return error(s);
  18623. };
  18624. }; // This indicates the aff was wrong?
  18625. try {
  18626. f(succF)(failF)();
  18627. } catch (e) {
  18628. error(e);
  18629. }
  18630. });
  18631. };
  18632. };
  18633. exports.thenImpl = function (promise) {
  18634. return function (errCB) {
  18635. return function (succCB) {
  18636. return function () {
  18637. promise.then(succCB, errCB);
  18638. };
  18639. };
  18640. };
  18641. };
  18642. },{}],"../output/Effect.Aff/foreign.js":[function(require,module,exports) {
  18643. /* globals setImmediate, clearImmediate, setTimeout, clearTimeout */
  18644. /* jshint -W083, -W098, -W003 */
  18645. "use strict";
  18646. var Aff = function () {
  18647. // A unique value for empty.
  18648. var EMPTY = {};
  18649. /*
  18650. An awkward approximation. We elide evidence we would otherwise need in PS for
  18651. efficiency sake.
  18652. data Aff eff a
  18653. = Pure a
  18654. | Throw Error
  18655. | Catch (Aff eff a) (Error -> Aff eff a)
  18656. | Sync (Eff eff a)
  18657. | Async ((Either Error a -> Eff eff Unit) -> Eff eff (Canceler eff))
  18658. | forall b. Bind (Aff eff b) (b -> Aff eff a)
  18659. | forall b. Bracket (Aff eff b) (BracketConditions eff b) (b -> Aff eff a)
  18660. | forall b. Fork Boolean (Aff eff b) ?(Fiber eff b -> a)
  18661. | Sequential (ParAff aff a)
  18662. */
  18663. var PURE = "Pure";
  18664. var THROW = "Throw";
  18665. var CATCH = "Catch";
  18666. var SYNC = "Sync";
  18667. var ASYNC = "Async";
  18668. var BIND = "Bind";
  18669. var BRACKET = "Bracket";
  18670. var FORK = "Fork";
  18671. var SEQ = "Sequential";
  18672. /*
  18673. data ParAff eff a
  18674. = forall b. Map (b -> a) (ParAff eff b)
  18675. | forall b. Apply (ParAff eff (b -> a)) (ParAff eff b)
  18676. | Alt (ParAff eff a) (ParAff eff a)
  18677. | ?Par (Aff eff a)
  18678. */
  18679. var MAP = "Map";
  18680. var APPLY = "Apply";
  18681. var ALT = "Alt"; // Various constructors used in interpretation
  18682. var CONS = "Cons"; // Cons-list, for stacks
  18683. var RESUME = "Resume"; // Continue indiscriminately
  18684. var RELEASE = "Release"; // Continue with bracket finalizers
  18685. var FINALIZER = "Finalizer"; // A non-interruptible effect
  18686. var FINALIZED = "Finalized"; // Marker for finalization
  18687. var FORKED = "Forked"; // Reference to a forked fiber, with resumption stack
  18688. var FIBER = "Fiber"; // Actual fiber reference
  18689. var THUNK = "Thunk"; // Primed effect, ready to invoke
  18690. function Aff(tag, _1, _2, _3) {
  18691. this.tag = tag;
  18692. this._1 = _1;
  18693. this._2 = _2;
  18694. this._3 = _3;
  18695. }
  18696. function AffCtr(tag) {
  18697. var fn = function fn(_1, _2, _3) {
  18698. return new Aff(tag, _1, _2, _3);
  18699. };
  18700. fn.tag = tag;
  18701. return fn;
  18702. }
  18703. function nonCanceler(error) {
  18704. return new Aff(PURE, void 0);
  18705. }
  18706. function runEff(eff) {
  18707. try {
  18708. eff();
  18709. } catch (error) {
  18710. setTimeout(function () {
  18711. throw error;
  18712. }, 0);
  18713. }
  18714. }
  18715. function runSync(left, right, eff) {
  18716. try {
  18717. return right(eff());
  18718. } catch (error) {
  18719. return left(error);
  18720. }
  18721. }
  18722. function runAsync(left, eff, k) {
  18723. try {
  18724. return eff(k)();
  18725. } catch (error) {
  18726. k(left(error))();
  18727. return nonCanceler;
  18728. }
  18729. }
  18730. var Scheduler = function () {
  18731. var limit = 1024;
  18732. var size = 0;
  18733. var ix = 0;
  18734. var queue = new Array(limit);
  18735. var draining = false;
  18736. function drain() {
  18737. var thunk;
  18738. draining = true;
  18739. while (size !== 0) {
  18740. size--;
  18741. thunk = queue[ix];
  18742. queue[ix] = void 0;
  18743. ix = (ix + 1) % limit;
  18744. thunk();
  18745. }
  18746. draining = false;
  18747. }
  18748. return {
  18749. isDraining: function isDraining() {
  18750. return draining;
  18751. },
  18752. enqueue: function enqueue(cb) {
  18753. var i, tmp;
  18754. if (size === limit) {
  18755. tmp = draining;
  18756. drain();
  18757. draining = tmp;
  18758. }
  18759. queue[(ix + size) % limit] = cb;
  18760. size++;
  18761. if (!draining) {
  18762. drain();
  18763. }
  18764. }
  18765. };
  18766. }();
  18767. function Supervisor(util) {
  18768. var fibers = {};
  18769. var fiberId = 0;
  18770. var count = 0;
  18771. return {
  18772. register: function register(fiber) {
  18773. var fid = fiberId++;
  18774. fiber.onComplete({
  18775. rethrow: true,
  18776. handler: function handler(result) {
  18777. return function () {
  18778. count--;
  18779. delete fibers[fid];
  18780. };
  18781. }
  18782. })();
  18783. fibers[fid] = fiber;
  18784. count++;
  18785. },
  18786. isEmpty: function isEmpty() {
  18787. return count === 0;
  18788. },
  18789. killAll: function killAll(killError, cb) {
  18790. return function () {
  18791. if (count === 0) {
  18792. return cb();
  18793. }
  18794. var killCount = 0;
  18795. var kills = {};
  18796. function kill(fid) {
  18797. kills[fid] = fibers[fid].kill(killError, function (result) {
  18798. return function () {
  18799. delete kills[fid];
  18800. killCount--;
  18801. if (util.isLeft(result) && util.fromLeft(result)) {
  18802. setTimeout(function () {
  18803. throw util.fromLeft(result);
  18804. }, 0);
  18805. }
  18806. if (killCount === 0) {
  18807. cb();
  18808. }
  18809. };
  18810. })();
  18811. }
  18812. for (var k in fibers) {
  18813. if (fibers.hasOwnProperty(k)) {
  18814. killCount++;
  18815. kill(k);
  18816. }
  18817. }
  18818. fibers = {};
  18819. fiberId = 0;
  18820. count = 0;
  18821. return function (error) {
  18822. return new Aff(SYNC, function () {
  18823. for (var k in kills) {
  18824. if (kills.hasOwnProperty(k)) {
  18825. kills[k]();
  18826. }
  18827. }
  18828. });
  18829. };
  18830. };
  18831. }
  18832. };
  18833. } // Fiber state machine
  18834. var SUSPENDED = 0; // Suspended, pending a join.
  18835. var CONTINUE = 1; // Interpret the next instruction.
  18836. var STEP_BIND = 2; // Apply the next bind.
  18837. var STEP_RESULT = 3; // Handle potential failure from a result.
  18838. var PENDING = 4; // An async effect is running.
  18839. var RETURN = 5; // The current stack has returned.
  18840. var COMPLETED = 6; // The entire fiber has completed.
  18841. function Fiber(util, supervisor, aff) {
  18842. // Monotonically increasing tick, increased on each asynchronous turn.
  18843. var runTick = 0; // The current branch of the state machine.
  18844. var status = SUSPENDED; // The current point of interest for the state machine branch.
  18845. var step = aff; // Successful step
  18846. var fail = null; // Failure step
  18847. var interrupt = null; // Asynchronous interrupt
  18848. // Stack of continuations for the current fiber.
  18849. var bhead = null;
  18850. var btail = null; // Stack of attempts and finalizers for error recovery. Every `Cons` is also
  18851. // tagged with current `interrupt` state. We use this to track which items
  18852. // should be ignored or evaluated as a result of a kill.
  18853. var attempts = null; // A special state is needed for Bracket, because it cannot be killed. When
  18854. // we enter a bracket acquisition or finalizer, we increment the counter,
  18855. // and then decrement once complete.
  18856. var bracketCount = 0; // Each join gets a new id so they can be revoked.
  18857. var joinId = 0;
  18858. var joins = null;
  18859. var rethrow = true; // Each invocation of `run` requires a tick. When an asynchronous effect is
  18860. // resolved, we must check that the local tick coincides with the fiber
  18861. // tick before resuming. This prevents multiple async continuations from
  18862. // accidentally resuming the same fiber. A common example may be invoking
  18863. // the provided callback in `makeAff` more than once, but it may also be an
  18864. // async effect resuming after the fiber was already cancelled.
  18865. function _run(localRunTick) {
  18866. var tmp, result, attempt;
  18867. while (true) {
  18868. tmp = null;
  18869. result = null;
  18870. attempt = null;
  18871. switch (status) {
  18872. case STEP_BIND:
  18873. status = CONTINUE;
  18874. try {
  18875. step = bhead(step);
  18876. if (btail === null) {
  18877. bhead = null;
  18878. } else {
  18879. bhead = btail._1;
  18880. btail = btail._2;
  18881. }
  18882. } catch (e) {
  18883. status = RETURN;
  18884. fail = util.left(e);
  18885. step = null;
  18886. }
  18887. break;
  18888. case STEP_RESULT:
  18889. if (util.isLeft(step)) {
  18890. status = RETURN;
  18891. fail = step;
  18892. step = null;
  18893. } else if (bhead === null) {
  18894. status = RETURN;
  18895. } else {
  18896. status = STEP_BIND;
  18897. step = util.fromRight(step);
  18898. }
  18899. break;
  18900. case CONTINUE:
  18901. switch (step.tag) {
  18902. case BIND:
  18903. if (bhead) {
  18904. btail = new Aff(CONS, bhead, btail);
  18905. }
  18906. bhead = step._2;
  18907. status = CONTINUE;
  18908. step = step._1;
  18909. break;
  18910. case PURE:
  18911. if (bhead === null) {
  18912. status = RETURN;
  18913. step = util.right(step._1);
  18914. } else {
  18915. status = STEP_BIND;
  18916. step = step._1;
  18917. }
  18918. break;
  18919. case SYNC:
  18920. status = STEP_RESULT;
  18921. step = runSync(util.left, util.right, step._1);
  18922. break;
  18923. case ASYNC:
  18924. status = PENDING;
  18925. step = runAsync(util.left, step._1, function (result) {
  18926. return function () {
  18927. if (runTick !== localRunTick) {
  18928. return;
  18929. }
  18930. runTick++;
  18931. Scheduler.enqueue(function () {
  18932. // It's possible to interrupt the fiber between enqueuing and
  18933. // resuming, so we need to check that the runTick is still
  18934. // valid.
  18935. if (runTick !== localRunTick + 1) {
  18936. return;
  18937. }
  18938. status = STEP_RESULT;
  18939. step = result;
  18940. _run(runTick);
  18941. });
  18942. };
  18943. });
  18944. return;
  18945. case THROW:
  18946. status = RETURN;
  18947. fail = util.left(step._1);
  18948. step = null;
  18949. break;
  18950. // Enqueue the Catch so that we can call the error handler later on
  18951. // in case of an exception.
  18952. case CATCH:
  18953. if (bhead === null) {
  18954. attempts = new Aff(CONS, step, attempts, interrupt);
  18955. } else {
  18956. attempts = new Aff(CONS, step, new Aff(CONS, new Aff(RESUME, bhead, btail), attempts, interrupt), interrupt);
  18957. }
  18958. bhead = null;
  18959. btail = null;
  18960. status = CONTINUE;
  18961. step = step._1;
  18962. break;
  18963. // Enqueue the Bracket so that we can call the appropriate handlers
  18964. // after resource acquisition.
  18965. case BRACKET:
  18966. bracketCount++;
  18967. if (bhead === null) {
  18968. attempts = new Aff(CONS, step, attempts, interrupt);
  18969. } else {
  18970. attempts = new Aff(CONS, step, new Aff(CONS, new Aff(RESUME, bhead, btail), attempts, interrupt), interrupt);
  18971. }
  18972. bhead = null;
  18973. btail = null;
  18974. status = CONTINUE;
  18975. step = step._1;
  18976. break;
  18977. case FORK:
  18978. status = STEP_RESULT;
  18979. tmp = Fiber(util, supervisor, step._2);
  18980. if (supervisor) {
  18981. supervisor.register(tmp);
  18982. }
  18983. if (step._1) {
  18984. tmp.run();
  18985. }
  18986. step = util.right(tmp);
  18987. break;
  18988. case SEQ:
  18989. status = CONTINUE;
  18990. step = sequential(util, supervisor, step._1);
  18991. break;
  18992. }
  18993. break;
  18994. case RETURN:
  18995. bhead = null;
  18996. btail = null; // If the current stack has returned, and we have no other stacks to
  18997. // resume or finalizers to run, the fiber has halted and we can
  18998. // invoke all join callbacks. Otherwise we need to resume.
  18999. if (attempts === null) {
  19000. status = COMPLETED;
  19001. step = interrupt || fail || step;
  19002. } else {
  19003. // The interrupt status for the enqueued item.
  19004. tmp = attempts._3;
  19005. attempt = attempts._1;
  19006. attempts = attempts._2;
  19007. switch (attempt.tag) {
  19008. // We cannot recover from an unmasked interrupt. Otherwise we should
  19009. // continue stepping, or run the exception handler if an exception
  19010. // was raised.
  19011. case CATCH:
  19012. // We should compare the interrupt status as well because we
  19013. // only want it to apply if there has been an interrupt since
  19014. // enqueuing the catch.
  19015. if (interrupt && interrupt !== tmp && bracketCount === 0) {
  19016. status = RETURN;
  19017. } else if (fail) {
  19018. status = CONTINUE;
  19019. step = attempt._2(util.fromLeft(fail));
  19020. fail = null;
  19021. }
  19022. break;
  19023. // We cannot resume from an unmasked interrupt or exception.
  19024. case RESUME:
  19025. // As with Catch, we only want to ignore in the case of an
  19026. // interrupt since enqueing the item.
  19027. if (interrupt && interrupt !== tmp && bracketCount === 0 || fail) {
  19028. status = RETURN;
  19029. } else {
  19030. bhead = attempt._1;
  19031. btail = attempt._2;
  19032. status = STEP_BIND;
  19033. step = util.fromRight(step);
  19034. }
  19035. break;
  19036. // If we have a bracket, we should enqueue the handlers,
  19037. // and continue with the success branch only if the fiber has
  19038. // not been interrupted. If the bracket acquisition failed, we
  19039. // should not run either.
  19040. case BRACKET:
  19041. bracketCount--;
  19042. if (fail === null) {
  19043. result = util.fromRight(step); // We need to enqueue the Release with the same interrupt
  19044. // status as the Bracket that is initiating it.
  19045. attempts = new Aff(CONS, new Aff(RELEASE, attempt._2, result), attempts, tmp); // We should only coninue as long as the interrupt status has not changed or
  19046. // we are currently within a non-interruptable finalizer.
  19047. if (interrupt === tmp || bracketCount > 0) {
  19048. status = CONTINUE;
  19049. step = attempt._3(result);
  19050. }
  19051. }
  19052. break;
  19053. // Enqueue the appropriate handler. We increase the bracket count
  19054. // because it should not be cancelled.
  19055. case RELEASE:
  19056. attempts = new Aff(CONS, new Aff(FINALIZED, step, fail), attempts, interrupt);
  19057. status = CONTINUE; // It has only been killed if the interrupt status has changed
  19058. // since we enqueued the item, and the bracket count is 0. If the
  19059. // bracket count is non-zero then we are in a masked state so it's
  19060. // impossible to be killed.
  19061. if (interrupt && interrupt !== tmp && bracketCount === 0) {
  19062. step = attempt._1.killed(util.fromLeft(interrupt))(attempt._2);
  19063. } else if (fail) {
  19064. step = attempt._1.failed(util.fromLeft(fail))(attempt._2);
  19065. } else {
  19066. step = attempt._1.completed(util.fromRight(step))(attempt._2);
  19067. }
  19068. fail = null;
  19069. bracketCount++;
  19070. break;
  19071. case FINALIZER:
  19072. bracketCount++;
  19073. attempts = new Aff(CONS, new Aff(FINALIZED, step, fail), attempts, interrupt);
  19074. status = CONTINUE;
  19075. step = attempt._1;
  19076. break;
  19077. case FINALIZED:
  19078. bracketCount--;
  19079. status = RETURN;
  19080. step = attempt._1;
  19081. fail = attempt._2;
  19082. break;
  19083. }
  19084. }
  19085. break;
  19086. case COMPLETED:
  19087. for (var k in joins) {
  19088. if (joins.hasOwnProperty(k)) {
  19089. rethrow = rethrow && joins[k].rethrow;
  19090. runEff(joins[k].handler(step));
  19091. }
  19092. }
  19093. joins = null; // If we have an interrupt and a fail, then the thread threw while
  19094. // running finalizers. This should always rethrow in a fresh stack.
  19095. if (interrupt && fail) {
  19096. setTimeout(function () {
  19097. throw util.fromLeft(fail);
  19098. }, 0); // If we have an unhandled exception, and no other fiber has joined
  19099. // then we need to throw the exception in a fresh stack.
  19100. } else if (util.isLeft(step) && rethrow) {
  19101. setTimeout(function () {
  19102. // Guard on reathrow because a completely synchronous fiber can
  19103. // still have an observer which was added after-the-fact.
  19104. if (rethrow) {
  19105. throw util.fromLeft(step);
  19106. }
  19107. }, 0);
  19108. }
  19109. return;
  19110. case SUSPENDED:
  19111. status = CONTINUE;
  19112. break;
  19113. case PENDING:
  19114. return;
  19115. }
  19116. }
  19117. }
  19118. function onComplete(join) {
  19119. return function () {
  19120. if (status === COMPLETED) {
  19121. rethrow = rethrow && join.rethrow;
  19122. join.handler(step)();
  19123. return function () {};
  19124. }
  19125. var jid = joinId++;
  19126. joins = joins || {};
  19127. joins[jid] = join;
  19128. return function () {
  19129. if (joins !== null) {
  19130. delete joins[jid];
  19131. }
  19132. };
  19133. };
  19134. }
  19135. function kill(error, cb) {
  19136. return function () {
  19137. if (status === COMPLETED) {
  19138. cb(util.right(void 0))();
  19139. return function () {};
  19140. }
  19141. var canceler = onComplete({
  19142. rethrow: false,
  19143. handler: function handler()
  19144. /* unused */
  19145. {
  19146. return cb(util.right(void 0));
  19147. }
  19148. })();
  19149. switch (status) {
  19150. case SUSPENDED:
  19151. interrupt = util.left(error);
  19152. status = COMPLETED;
  19153. step = interrupt;
  19154. _run(runTick);
  19155. break;
  19156. case PENDING:
  19157. if (interrupt === null) {
  19158. interrupt = util.left(error);
  19159. }
  19160. if (bracketCount === 0) {
  19161. if (status === PENDING) {
  19162. attempts = new Aff(CONS, new Aff(FINALIZER, step(error)), attempts, interrupt);
  19163. }
  19164. status = RETURN;
  19165. step = null;
  19166. fail = null;
  19167. _run(++runTick);
  19168. }
  19169. break;
  19170. default:
  19171. if (interrupt === null) {
  19172. interrupt = util.left(error);
  19173. }
  19174. if (bracketCount === 0) {
  19175. status = RETURN;
  19176. step = null;
  19177. fail = null;
  19178. }
  19179. }
  19180. return canceler;
  19181. };
  19182. }
  19183. function join(cb) {
  19184. return function () {
  19185. var canceler = onComplete({
  19186. rethrow: false,
  19187. handler: cb
  19188. })();
  19189. if (status === SUSPENDED) {
  19190. _run(runTick);
  19191. }
  19192. return canceler;
  19193. };
  19194. }
  19195. return {
  19196. kill: kill,
  19197. join: join,
  19198. onComplete: onComplete,
  19199. isSuspended: function isSuspended() {
  19200. return status === SUSPENDED;
  19201. },
  19202. run: function run() {
  19203. if (status === SUSPENDED) {
  19204. if (!Scheduler.isDraining()) {
  19205. Scheduler.enqueue(function () {
  19206. _run(runTick);
  19207. });
  19208. } else {
  19209. _run(runTick);
  19210. }
  19211. }
  19212. }
  19213. };
  19214. }
  19215. function runPar(util, supervisor, par, cb) {
  19216. // Table of all forked fibers.
  19217. var fiberId = 0;
  19218. var fibers = {}; // Table of currently running cancelers, as a product of `Alt` behavior.
  19219. var killId = 0;
  19220. var kills = {}; // Error used for early cancelation on Alt branches.
  19221. var early = new Error("[ParAff] Early exit"); // Error used to kill the entire tree.
  19222. var interrupt = null; // The root pointer of the tree.
  19223. var root = EMPTY; // Walks a tree, invoking all the cancelers. Returns the table of pending
  19224. // cancellation fibers.
  19225. function kill(error, par, cb) {
  19226. var step = par;
  19227. var head = null;
  19228. var tail = null;
  19229. var count = 0;
  19230. var kills = {};
  19231. var tmp, kid;
  19232. loop: while (true) {
  19233. tmp = null;
  19234. switch (step.tag) {
  19235. case FORKED:
  19236. if (step._3 === EMPTY) {
  19237. tmp = fibers[step._1];
  19238. kills[count++] = tmp.kill(error, function (result) {
  19239. return function () {
  19240. count--;
  19241. if (count === 0) {
  19242. cb(result)();
  19243. }
  19244. };
  19245. });
  19246. } // Terminal case.
  19247. if (head === null) {
  19248. break loop;
  19249. } // Go down the right side of the tree.
  19250. step = head._2;
  19251. if (tail === null) {
  19252. head = null;
  19253. } else {
  19254. head = tail._1;
  19255. tail = tail._2;
  19256. }
  19257. break;
  19258. case MAP:
  19259. step = step._2;
  19260. break;
  19261. case APPLY:
  19262. case ALT:
  19263. if (head) {
  19264. tail = new Aff(CONS, head, tail);
  19265. }
  19266. head = step;
  19267. step = step._1;
  19268. break;
  19269. }
  19270. }
  19271. if (count === 0) {
  19272. cb(util.right(void 0))();
  19273. } else {
  19274. // Run the cancelation effects. We alias `count` because it's mutable.
  19275. kid = 0;
  19276. tmp = count;
  19277. for (; kid < tmp; kid++) {
  19278. kills[kid] = kills[kid]();
  19279. }
  19280. }
  19281. return kills;
  19282. } // When a fiber resolves, we need to bubble back up the tree with the
  19283. // result, computing the applicative nodes.
  19284. function join(result, head, tail) {
  19285. var fail, step, lhs, rhs, tmp, kid;
  19286. if (util.isLeft(result)) {
  19287. fail = result;
  19288. step = null;
  19289. } else {
  19290. step = result;
  19291. fail = null;
  19292. }
  19293. loop: while (true) {
  19294. lhs = null;
  19295. rhs = null;
  19296. tmp = null;
  19297. kid = null; // We should never continue if the entire tree has been interrupted.
  19298. if (interrupt !== null) {
  19299. return;
  19300. } // We've made it all the way to the root of the tree, which means
  19301. // the tree has fully evaluated.
  19302. if (head === null) {
  19303. cb(fail || step)();
  19304. return;
  19305. } // The tree has already been computed, so we shouldn't try to do it
  19306. // again. This should never happen.
  19307. // TODO: Remove this?
  19308. if (head._3 !== EMPTY) {
  19309. return;
  19310. }
  19311. switch (head.tag) {
  19312. case MAP:
  19313. if (fail === null) {
  19314. head._3 = util.right(head._1(util.fromRight(step)));
  19315. step = head._3;
  19316. } else {
  19317. head._3 = fail;
  19318. }
  19319. break;
  19320. case APPLY:
  19321. lhs = head._1._3;
  19322. rhs = head._2._3; // If we have a failure we should kill the other side because we
  19323. // can't possible yield a result anymore.
  19324. if (fail) {
  19325. head._3 = fail;
  19326. tmp = true;
  19327. kid = killId++;
  19328. kills[kid] = kill(early, fail === lhs ? head._2 : head._1, function ()
  19329. /* unused */
  19330. {
  19331. return function () {
  19332. delete kills[kid];
  19333. if (tmp) {
  19334. tmp = false;
  19335. } else if (tail === null) {
  19336. join(fail, null, null);
  19337. } else {
  19338. join(fail, tail._1, tail._2);
  19339. }
  19340. };
  19341. });
  19342. if (tmp) {
  19343. tmp = false;
  19344. return;
  19345. }
  19346. } else if (lhs === EMPTY || rhs === EMPTY) {
  19347. // We can only proceed if both sides have resolved.
  19348. return;
  19349. } else {
  19350. step = util.right(util.fromRight(lhs)(util.fromRight(rhs)));
  19351. head._3 = step;
  19352. }
  19353. break;
  19354. case ALT:
  19355. lhs = head._1._3;
  19356. rhs = head._2._3; // We can only proceed if both have resolved or we have a success
  19357. if (lhs === EMPTY && util.isLeft(rhs) || rhs === EMPTY && util.isLeft(lhs)) {
  19358. return;
  19359. } // If both sides resolve with an error, we should continue with the
  19360. // first error
  19361. if (lhs !== EMPTY && util.isLeft(lhs) && rhs !== EMPTY && util.isLeft(rhs)) {
  19362. fail = step === lhs ? rhs : lhs;
  19363. step = null;
  19364. head._3 = fail;
  19365. } else {
  19366. head._3 = step;
  19367. tmp = true;
  19368. kid = killId++; // Once a side has resolved, we need to cancel the side that is still
  19369. // pending before we can continue.
  19370. kills[kid] = kill(early, step === lhs ? head._2 : head._1, function ()
  19371. /* unused */
  19372. {
  19373. return function () {
  19374. delete kills[kid];
  19375. if (tmp) {
  19376. tmp = false;
  19377. } else if (tail === null) {
  19378. join(step, null, null);
  19379. } else {
  19380. join(step, tail._1, tail._2);
  19381. }
  19382. };
  19383. });
  19384. if (tmp) {
  19385. tmp = false;
  19386. return;
  19387. }
  19388. }
  19389. break;
  19390. }
  19391. if (tail === null) {
  19392. head = null;
  19393. } else {
  19394. head = tail._1;
  19395. tail = tail._2;
  19396. }
  19397. }
  19398. }
  19399. function resolve(fiber) {
  19400. return function (result) {
  19401. return function () {
  19402. delete fibers[fiber._1];
  19403. fiber._3 = result;
  19404. join(result, fiber._2._1, fiber._2._2);
  19405. };
  19406. };
  19407. } // Walks the applicative tree, substituting non-applicative nodes with
  19408. // `FORKED` nodes. In this tree, all applicative nodes use the `_3` slot
  19409. // as a mutable slot for memoization. In an unresolved state, the `_3`
  19410. // slot is `EMPTY`. In the cases of `ALT` and `APPLY`, we always walk
  19411. // the left side first, because both operations are left-associative. As
  19412. // we `RETURN` from those branches, we then walk the right side.
  19413. function run() {
  19414. var status = CONTINUE;
  19415. var step = par;
  19416. var head = null;
  19417. var tail = null;
  19418. var tmp, fid;
  19419. loop: while (true) {
  19420. tmp = null;
  19421. fid = null;
  19422. switch (status) {
  19423. case CONTINUE:
  19424. switch (step.tag) {
  19425. case MAP:
  19426. if (head) {
  19427. tail = new Aff(CONS, head, tail);
  19428. }
  19429. head = new Aff(MAP, step._1, EMPTY, EMPTY);
  19430. step = step._2;
  19431. break;
  19432. case APPLY:
  19433. if (head) {
  19434. tail = new Aff(CONS, head, tail);
  19435. }
  19436. head = new Aff(APPLY, EMPTY, step._2, EMPTY);
  19437. step = step._1;
  19438. break;
  19439. case ALT:
  19440. if (head) {
  19441. tail = new Aff(CONS, head, tail);
  19442. }
  19443. head = new Aff(ALT, EMPTY, step._2, EMPTY);
  19444. step = step._1;
  19445. break;
  19446. default:
  19447. // When we hit a leaf value, we suspend the stack in the `FORKED`.
  19448. // When the fiber resolves, it can bubble back up the tree.
  19449. fid = fiberId++;
  19450. status = RETURN;
  19451. tmp = step;
  19452. step = new Aff(FORKED, fid, new Aff(CONS, head, tail), EMPTY);
  19453. tmp = Fiber(util, supervisor, tmp);
  19454. tmp.onComplete({
  19455. rethrow: false,
  19456. handler: resolve(step)
  19457. })();
  19458. fibers[fid] = tmp;
  19459. if (supervisor) {
  19460. supervisor.register(tmp);
  19461. }
  19462. }
  19463. break;
  19464. case RETURN:
  19465. // Terminal case, we are back at the root.
  19466. if (head === null) {
  19467. break loop;
  19468. } // If we are done with the right side, we need to continue down the
  19469. // left. Otherwise we should continue up the stack.
  19470. if (head._1 === EMPTY) {
  19471. head._1 = step;
  19472. status = CONTINUE;
  19473. step = head._2;
  19474. head._2 = EMPTY;
  19475. } else {
  19476. head._2 = step;
  19477. step = head;
  19478. if (tail === null) {
  19479. head = null;
  19480. } else {
  19481. head = tail._1;
  19482. tail = tail._2;
  19483. }
  19484. }
  19485. }
  19486. } // Keep a reference to the tree root so it can be cancelled.
  19487. root = step;
  19488. for (fid = 0; fid < fiberId; fid++) {
  19489. fibers[fid].run();
  19490. }
  19491. } // Cancels the entire tree. If there are already subtrees being canceled,
  19492. // we need to first cancel those joins. We will then add fresh joins for
  19493. // all pending branches including those that were in the process of being
  19494. // canceled.
  19495. function cancel(error, cb) {
  19496. interrupt = util.left(error);
  19497. var innerKills;
  19498. for (var kid in kills) {
  19499. if (kills.hasOwnProperty(kid)) {
  19500. innerKills = kills[kid];
  19501. for (kid in innerKills) {
  19502. if (innerKills.hasOwnProperty(kid)) {
  19503. innerKills[kid]();
  19504. }
  19505. }
  19506. }
  19507. }
  19508. kills = null;
  19509. var newKills = kill(error, root, cb);
  19510. return function (killError) {
  19511. return new Aff(ASYNC, function (killCb) {
  19512. return function () {
  19513. for (var kid in newKills) {
  19514. if (newKills.hasOwnProperty(kid)) {
  19515. newKills[kid]();
  19516. }
  19517. }
  19518. return nonCanceler;
  19519. };
  19520. });
  19521. };
  19522. }
  19523. run();
  19524. return function (killError) {
  19525. return new Aff(ASYNC, function (killCb) {
  19526. return function () {
  19527. return cancel(killError, killCb);
  19528. };
  19529. });
  19530. };
  19531. }
  19532. function sequential(util, supervisor, par) {
  19533. return new Aff(ASYNC, function (cb) {
  19534. return function () {
  19535. return runPar(util, supervisor, par, cb);
  19536. };
  19537. });
  19538. }
  19539. Aff.EMPTY = EMPTY;
  19540. Aff.Pure = AffCtr(PURE);
  19541. Aff.Throw = AffCtr(THROW);
  19542. Aff.Catch = AffCtr(CATCH);
  19543. Aff.Sync = AffCtr(SYNC);
  19544. Aff.Async = AffCtr(ASYNC);
  19545. Aff.Bind = AffCtr(BIND);
  19546. Aff.Bracket = AffCtr(BRACKET);
  19547. Aff.Fork = AffCtr(FORK);
  19548. Aff.Seq = AffCtr(SEQ);
  19549. Aff.ParMap = AffCtr(MAP);
  19550. Aff.ParApply = AffCtr(APPLY);
  19551. Aff.ParAlt = AffCtr(ALT);
  19552. Aff.Fiber = Fiber;
  19553. Aff.Supervisor = Supervisor;
  19554. Aff.Scheduler = Scheduler;
  19555. Aff.nonCanceler = nonCanceler;
  19556. return Aff;
  19557. }();
  19558. exports._pure = Aff.Pure;
  19559. exports._throwError = Aff.Throw;
  19560. exports._catchError = function (aff) {
  19561. return function (k) {
  19562. return Aff.Catch(aff, k);
  19563. };
  19564. };
  19565. exports._map = function (f) {
  19566. return function (aff) {
  19567. if (aff.tag === Aff.Pure.tag) {
  19568. return Aff.Pure(f(aff._1));
  19569. } else {
  19570. return Aff.Bind(aff, function (value) {
  19571. return Aff.Pure(f(value));
  19572. });
  19573. }
  19574. };
  19575. };
  19576. exports._bind = function (aff) {
  19577. return function (k) {
  19578. return Aff.Bind(aff, k);
  19579. };
  19580. };
  19581. exports._fork = function (immediate) {
  19582. return function (aff) {
  19583. return Aff.Fork(immediate, aff);
  19584. };
  19585. };
  19586. exports._liftEffect = Aff.Sync;
  19587. exports._parAffMap = function (f) {
  19588. return function (aff) {
  19589. return Aff.ParMap(f, aff);
  19590. };
  19591. };
  19592. exports._parAffApply = function (aff1) {
  19593. return function (aff2) {
  19594. return Aff.ParApply(aff1, aff2);
  19595. };
  19596. };
  19597. exports._parAffAlt = function (aff1) {
  19598. return function (aff2) {
  19599. return Aff.ParAlt(aff1, aff2);
  19600. };
  19601. };
  19602. exports.makeAff = Aff.Async;
  19603. exports.generalBracket = function (acquire) {
  19604. return function (options) {
  19605. return function (k) {
  19606. return Aff.Bracket(acquire, options, k);
  19607. };
  19608. };
  19609. };
  19610. exports._makeFiber = function (util, aff) {
  19611. return function () {
  19612. return Aff.Fiber(util, null, aff);
  19613. };
  19614. };
  19615. exports._makeSupervisedFiber = function (util, aff) {
  19616. return function () {
  19617. var supervisor = Aff.Supervisor(util);
  19618. return {
  19619. fiber: Aff.Fiber(util, supervisor, aff),
  19620. supervisor: supervisor
  19621. };
  19622. };
  19623. };
  19624. exports._killAll = function (error, supervisor, cb) {
  19625. return supervisor.killAll(error, cb);
  19626. };
  19627. exports._delay = function () {
  19628. function setDelay(n, k) {
  19629. if (n === 0 && typeof setImmediate !== "undefined") {
  19630. return setImmediate(k);
  19631. } else {
  19632. return setTimeout(k, n);
  19633. }
  19634. }
  19635. function clearDelay(n, t) {
  19636. if (n === 0 && typeof clearImmediate !== "undefined") {
  19637. return clearImmediate(t);
  19638. } else {
  19639. return clearTimeout(t);
  19640. }
  19641. }
  19642. return function (right, ms) {
  19643. return Aff.Async(function (cb) {
  19644. return function () {
  19645. var timer = setDelay(ms, cb(right()));
  19646. return function () {
  19647. return Aff.Sync(function () {
  19648. return right(clearDelay(ms, timer));
  19649. });
  19650. };
  19651. };
  19652. });
  19653. };
  19654. }();
  19655. exports._sequential = Aff.Seq;
  19656. },{}],"../output/Control.Monad.Cont.Trans/index.js":[function(require,module,exports) {
  19657. // Generated by purs version 0.13.6
  19658. "use strict";
  19659. var Control_Applicative = require("../Control.Applicative/index.js");
  19660. var Control_Apply = require("../Control.Apply/index.js");
  19661. var Control_Bind = require("../Control.Bind/index.js");
  19662. var Control_Monad = require("../Control.Monad/index.js");
  19663. var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js");
  19664. var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js");
  19665. var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
  19666. var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js");
  19667. var Data_Function = require("../Data.Function/index.js");
  19668. var Data_Functor = require("../Data.Functor/index.js");
  19669. var Data_Newtype = require("../Data.Newtype/index.js");
  19670. var Effect_Class = require("../Effect.Class/index.js");
  19671. var ContT = function ContT(x) {
  19672. return x;
  19673. };
  19674. var withContT = function withContT(f) {
  19675. return function (v) {
  19676. return function (k) {
  19677. return v(f(k));
  19678. };
  19679. };
  19680. };
  19681. var runContT = function runContT(v) {
  19682. return function (k) {
  19683. return v(k);
  19684. };
  19685. };
  19686. var newtypeContT = new Data_Newtype.Newtype(function (n) {
  19687. return n;
  19688. }, ContT);
  19689. var monadTransContT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) {
  19690. return function (m) {
  19691. return function (k) {
  19692. return Control_Bind.bind(dictMonad.Bind1())(m)(k);
  19693. };
  19694. };
  19695. });
  19696. var mapContT = function mapContT(f) {
  19697. return function (v) {
  19698. return function (k) {
  19699. return f(v(k));
  19700. };
  19701. };
  19702. };
  19703. var functorContT = function functorContT(dictFunctor) {
  19704. return new Data_Functor.Functor(function (f) {
  19705. return function (v) {
  19706. return function (k) {
  19707. return v(function (a) {
  19708. return k(f(a));
  19709. });
  19710. };
  19711. };
  19712. });
  19713. };
  19714. var applyContT = function applyContT(dictApply) {
  19715. return new Control_Apply.Apply(function () {
  19716. return functorContT(dictApply.Functor0());
  19717. }, function (v) {
  19718. return function (v1) {
  19719. return function (k) {
  19720. return v(function (g) {
  19721. return v1(function (a) {
  19722. return k(g(a));
  19723. });
  19724. });
  19725. };
  19726. };
  19727. });
  19728. };
  19729. var bindContT = function bindContT(dictBind) {
  19730. return new Control_Bind.Bind(function () {
  19731. return applyContT(dictBind.Apply0());
  19732. }, function (v) {
  19733. return function (k) {
  19734. return function (k$prime) {
  19735. return v(function (a) {
  19736. var v1 = k(a);
  19737. return v1(k$prime);
  19738. });
  19739. };
  19740. };
  19741. });
  19742. };
  19743. var applicativeContT = function applicativeContT(dictApplicative) {
  19744. return new Control_Applicative.Applicative(function () {
  19745. return applyContT(dictApplicative.Apply0());
  19746. }, function (a) {
  19747. return function (k) {
  19748. return k(a);
  19749. };
  19750. });
  19751. };
  19752. var monadContT = function monadContT(dictMonad) {
  19753. return new Control_Monad.Monad(function () {
  19754. return applicativeContT(dictMonad.Applicative0());
  19755. }, function () {
  19756. return bindContT(dictMonad.Bind1());
  19757. });
  19758. };
  19759. var monadAskContT = function monadAskContT(dictMonadAsk) {
  19760. return new Control_Monad_Reader_Class.MonadAsk(function () {
  19761. return monadContT(dictMonadAsk.Monad0());
  19762. }, Control_Monad_Trans_Class.lift(monadTransContT)(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk)));
  19763. };
  19764. var monadReaderContT = function monadReaderContT(dictMonadReader) {
  19765. return new Control_Monad_Reader_Class.MonadReader(function () {
  19766. return monadAskContT(dictMonadReader.MonadAsk0());
  19767. }, function (f) {
  19768. return function (v) {
  19769. return function (k) {
  19770. return Control_Bind.bind(dictMonadReader.MonadAsk0().Monad0().Bind1())(Control_Monad_Reader_Class.ask(dictMonadReader.MonadAsk0()))(function (r) {
  19771. return Control_Monad_Reader_Class.local(dictMonadReader)(f)(v(function () {
  19772. var $43 = Control_Monad_Reader_Class.local(dictMonadReader)(Data_Function["const"](r));
  19773. return function ($44) {
  19774. return $43(k($44));
  19775. };
  19776. }()));
  19777. });
  19778. };
  19779. };
  19780. });
  19781. };
  19782. var monadContContT = function monadContContT(dictMonad) {
  19783. return new Control_Monad_Cont_Class.MonadCont(function () {
  19784. return monadContT(dictMonad);
  19785. }, function (f) {
  19786. return function (k) {
  19787. var v = f(function (a) {
  19788. return function (v1) {
  19789. return k(a);
  19790. };
  19791. });
  19792. return v(k);
  19793. };
  19794. });
  19795. };
  19796. var monadEffectContT = function monadEffectContT(dictMonadEffect) {
  19797. return new Effect_Class.MonadEffect(function () {
  19798. return monadContT(dictMonadEffect.Monad0());
  19799. }, function () {
  19800. var $45 = Control_Monad_Trans_Class.lift(monadTransContT)(dictMonadEffect.Monad0());
  19801. var $46 = Effect_Class.liftEffect(dictMonadEffect);
  19802. return function ($47) {
  19803. return $45($46($47));
  19804. };
  19805. }());
  19806. };
  19807. var monadStateContT = function monadStateContT(dictMonadState) {
  19808. return new Control_Monad_State_Class.MonadState(function () {
  19809. return monadContT(dictMonadState.Monad0());
  19810. }, function () {
  19811. var $48 = Control_Monad_Trans_Class.lift(monadTransContT)(dictMonadState.Monad0());
  19812. var $49 = Control_Monad_State_Class.state(dictMonadState);
  19813. return function ($50) {
  19814. return $48($49($50));
  19815. };
  19816. }());
  19817. };
  19818. module.exports = {
  19819. ContT: ContT,
  19820. runContT: runContT,
  19821. mapContT: mapContT,
  19822. withContT: withContT,
  19823. newtypeContT: newtypeContT,
  19824. monadContContT: monadContContT,
  19825. functorContT: functorContT,
  19826. applyContT: applyContT,
  19827. applicativeContT: applicativeContT,
  19828. bindContT: bindContT,
  19829. monadContT: monadContT,
  19830. monadTransContT: monadTransContT,
  19831. monadEffectContT: monadEffectContT,
  19832. monadAskContT: monadAskContT,
  19833. monadReaderContT: monadReaderContT,
  19834. monadStateContT: monadStateContT
  19835. };
  19836. },{"../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.Cont.Class/index.js":"../output/Control.Monad.Cont.Class/index.js","../Control.Monad.Reader.Class/index.js":"../output/Control.Monad.Reader.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","../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","../Effect.Class/index.js":"../output/Effect.Class/index.js"}],"../output/Control.Monad.Maybe.Trans/index.js":[function(require,module,exports) {
  19837. // Generated by purs version 0.13.6
  19838. "use strict";
  19839. var Control_Alt = require("../Control.Alt/index.js");
  19840. var Control_Alternative = require("../Control.Alternative/index.js");
  19841. var Control_Applicative = require("../Control.Applicative/index.js");
  19842. var Control_Apply = require("../Control.Apply/index.js");
  19843. var Control_Bind = require("../Control.Bind/index.js");
  19844. var Control_Category = require("../Control.Category/index.js");
  19845. var Control_Monad = require("../Control.Monad/index.js");
  19846. var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js");
  19847. var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
  19848. var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js");
  19849. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  19850. var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
  19851. var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js");
  19852. var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js");
  19853. var Control_MonadPlus = require("../Control.MonadPlus/index.js");
  19854. var Control_MonadZero = require("../Control.MonadZero/index.js");
  19855. var Control_Plus = require("../Control.Plus/index.js");
  19856. var Data_Functor = require("../Data.Functor/index.js");
  19857. var Data_Maybe = require("../Data.Maybe/index.js");
  19858. var Data_Newtype = require("../Data.Newtype/index.js");
  19859. var Data_Tuple = require("../Data.Tuple/index.js");
  19860. var Effect_Class = require("../Effect.Class/index.js");
  19861. var MaybeT = function MaybeT(x) {
  19862. return x;
  19863. };
  19864. var runMaybeT = function runMaybeT(v) {
  19865. return v;
  19866. };
  19867. var newtypeMaybeT = new Data_Newtype.Newtype(function (n) {
  19868. return n;
  19869. }, MaybeT);
  19870. var monadTransMaybeT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) {
  19871. var $71 = Control_Monad.liftM1(dictMonad)(Data_Maybe.Just.create);
  19872. return function ($72) {
  19873. return MaybeT($71($72));
  19874. };
  19875. });
  19876. var mapMaybeT = function mapMaybeT(f) {
  19877. return function (v) {
  19878. return f(v);
  19879. };
  19880. };
  19881. var functorMaybeT = function functorMaybeT(dictFunctor) {
  19882. return new Data_Functor.Functor(function (f) {
  19883. return function (v) {
  19884. return Data_Functor.map(dictFunctor)(Data_Functor.map(Data_Maybe.functorMaybe)(f))(v);
  19885. };
  19886. });
  19887. };
  19888. var monadMaybeT = function monadMaybeT(dictMonad) {
  19889. return new Control_Monad.Monad(function () {
  19890. return applicativeMaybeT(dictMonad);
  19891. }, function () {
  19892. return bindMaybeT(dictMonad);
  19893. });
  19894. };
  19895. var bindMaybeT = function bindMaybeT(dictMonad) {
  19896. return new Control_Bind.Bind(function () {
  19897. return applyMaybeT(dictMonad);
  19898. }, function (v) {
  19899. return function (f) {
  19900. return Control_Bind.bind(dictMonad.Bind1())(v)(function (v1) {
  19901. if (v1 instanceof Data_Maybe.Nothing) {
  19902. return Control_Applicative.pure(dictMonad.Applicative0())(Data_Maybe.Nothing.value);
  19903. }
  19904. ;
  19905. if (v1 instanceof Data_Maybe.Just) {
  19906. var v2 = f(v1.value0);
  19907. return v2;
  19908. }
  19909. ;
  19910. throw new Error("Failed pattern match at Control.Monad.Maybe.Trans (line 54, column 11 - line 56, column 42): " + [v1.constructor.name]);
  19911. });
  19912. };
  19913. });
  19914. };
  19915. var applyMaybeT = function applyMaybeT(dictMonad) {
  19916. return new Control_Apply.Apply(function () {
  19917. return functorMaybeT(dictMonad.Bind1().Apply0().Functor0());
  19918. }, Control_Monad.ap(monadMaybeT(dictMonad)));
  19919. };
  19920. var applicativeMaybeT = function applicativeMaybeT(dictMonad) {
  19921. return new Control_Applicative.Applicative(function () {
  19922. return applyMaybeT(dictMonad);
  19923. }, function () {
  19924. var $73 = Control_Applicative.pure(dictMonad.Applicative0());
  19925. return function ($74) {
  19926. return MaybeT($73(Data_Maybe.Just.create($74)));
  19927. };
  19928. }());
  19929. };
  19930. var monadAskMaybeT = function monadAskMaybeT(dictMonadAsk) {
  19931. return new Control_Monad_Reader_Class.MonadAsk(function () {
  19932. return monadMaybeT(dictMonadAsk.Monad0());
  19933. }, Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk)));
  19934. };
  19935. var monadReaderMaybeT = function monadReaderMaybeT(dictMonadReader) {
  19936. return new Control_Monad_Reader_Class.MonadReader(function () {
  19937. return monadAskMaybeT(dictMonadReader.MonadAsk0());
  19938. }, function (f) {
  19939. return mapMaybeT(Control_Monad_Reader_Class.local(dictMonadReader)(f));
  19940. });
  19941. };
  19942. var monadContMaybeT = function monadContMaybeT(dictMonadCont) {
  19943. return new Control_Monad_Cont_Class.MonadCont(function () {
  19944. return monadMaybeT(dictMonadCont.Monad0());
  19945. }, function (f) {
  19946. return MaybeT(Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) {
  19947. var v = f(function (a) {
  19948. return MaybeT(c(new Data_Maybe.Just(a)));
  19949. });
  19950. return v;
  19951. }));
  19952. });
  19953. };
  19954. var monadEffectMaybe = function monadEffectMaybe(dictMonadEffect) {
  19955. return new Effect_Class.MonadEffect(function () {
  19956. return monadMaybeT(dictMonadEffect.Monad0());
  19957. }, function () {
  19958. var $75 = Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadEffect.Monad0());
  19959. var $76 = Effect_Class.liftEffect(dictMonadEffect);
  19960. return function ($77) {
  19961. return $75($76($77));
  19962. };
  19963. }());
  19964. };
  19965. var monadRecMaybeT = function monadRecMaybeT(dictMonadRec) {
  19966. return new Control_Monad_Rec_Class.MonadRec(function () {
  19967. return monadMaybeT(dictMonadRec.Monad0());
  19968. }, function (f) {
  19969. var $78 = Control_Monad_Rec_Class.tailRecM(dictMonadRec)(function (a) {
  19970. var v = f(a);
  19971. return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(v)(function (m$prime) {
  19972. return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(function () {
  19973. if (m$prime instanceof Data_Maybe.Nothing) {
  19974. return new Control_Monad_Rec_Class.Done(Data_Maybe.Nothing.value);
  19975. }
  19976. ;
  19977. if (m$prime instanceof Data_Maybe.Just && m$prime.value0 instanceof Control_Monad_Rec_Class.Loop) {
  19978. return new Control_Monad_Rec_Class.Loop(m$prime.value0.value0);
  19979. }
  19980. ;
  19981. if (m$prime instanceof Data_Maybe.Just && m$prime.value0 instanceof Control_Monad_Rec_Class.Done) {
  19982. return new Control_Monad_Rec_Class.Done(new Data_Maybe.Just(m$prime.value0.value0));
  19983. }
  19984. ;
  19985. throw new Error("Failed pattern match at Control.Monad.Maybe.Trans (line 84, column 16 - line 87, column 43): " + [m$prime.constructor.name]);
  19986. }());
  19987. });
  19988. });
  19989. return function ($79) {
  19990. return MaybeT($78($79));
  19991. };
  19992. });
  19993. };
  19994. var monadStateMaybeT = function monadStateMaybeT(dictMonadState) {
  19995. return new Control_Monad_State_Class.MonadState(function () {
  19996. return monadMaybeT(dictMonadState.Monad0());
  19997. }, function (f) {
  19998. return Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadState.Monad0())(Control_Monad_State_Class.state(dictMonadState)(f));
  19999. });
  20000. };
  20001. var monadTellMaybeT = function monadTellMaybeT(dictMonadTell) {
  20002. return new Control_Monad_Writer_Class.MonadTell(function () {
  20003. return monadMaybeT(dictMonadTell.Monad0());
  20004. }, function () {
  20005. var $80 = Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadTell.Monad0());
  20006. var $81 = Control_Monad_Writer_Class.tell(dictMonadTell);
  20007. return function ($82) {
  20008. return $80($81($82));
  20009. };
  20010. }());
  20011. };
  20012. var monadWriterMaybeT = function monadWriterMaybeT(dictMonadWriter) {
  20013. return new Control_Monad_Writer_Class.MonadWriter(function () {
  20014. return monadTellMaybeT(dictMonadWriter.MonadTell0());
  20015. }, mapMaybeT(function (m) {
  20016. return Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(Control_Monad_Writer_Class.listen(dictMonadWriter)(m))(function (v) {
  20017. return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(Data_Functor.map(Data_Maybe.functorMaybe)(function (r) {
  20018. return new Data_Tuple.Tuple(r, v.value1);
  20019. })(v.value0));
  20020. });
  20021. }), mapMaybeT(function (m) {
  20022. return Control_Monad_Writer_Class.pass(dictMonadWriter)(Control_Bind.bind(dictMonadWriter.MonadTell0().Monad0().Bind1())(m)(function (a) {
  20023. return Control_Applicative.pure(dictMonadWriter.MonadTell0().Monad0().Applicative0())(function () {
  20024. if (a instanceof Data_Maybe.Nothing) {
  20025. return new Data_Tuple.Tuple(Data_Maybe.Nothing.value, Control_Category.identity(Control_Category.categoryFn));
  20026. }
  20027. ;
  20028. if (a instanceof Data_Maybe.Just) {
  20029. return new Data_Tuple.Tuple(new Data_Maybe.Just(a.value0.value0), a.value0.value1);
  20030. }
  20031. ;
  20032. throw new Error("Failed pattern match at Control.Monad.Maybe.Trans (line 121, column 10 - line 123, column 43): " + [a.constructor.name]);
  20033. }());
  20034. }));
  20035. }));
  20036. };
  20037. var monadThrowMaybeT = function monadThrowMaybeT(dictMonadThrow) {
  20038. return new Control_Monad_Error_Class.MonadThrow(function () {
  20039. return monadMaybeT(dictMonadThrow.Monad0());
  20040. }, function (e) {
  20041. return Control_Monad_Trans_Class.lift(monadTransMaybeT)(dictMonadThrow.Monad0())(Control_Monad_Error_Class.throwError(dictMonadThrow)(e));
  20042. });
  20043. };
  20044. var monadErrorMaybeT = function monadErrorMaybeT(dictMonadError) {
  20045. return new Control_Monad_Error_Class.MonadError(function () {
  20046. return monadThrowMaybeT(dictMonadError.MonadThrow0());
  20047. }, function (v) {
  20048. return function (h) {
  20049. return MaybeT(Control_Monad_Error_Class.catchError(dictMonadError)(v)(function (a) {
  20050. var v1 = h(a);
  20051. return v1;
  20052. }));
  20053. };
  20054. });
  20055. };
  20056. var altMaybeT = function altMaybeT(dictMonad) {
  20057. return new Control_Alt.Alt(function () {
  20058. return functorMaybeT(dictMonad.Bind1().Apply0().Functor0());
  20059. }, function (v) {
  20060. return function (v1) {
  20061. return Control_Bind.bind(dictMonad.Bind1())(v)(function (m) {
  20062. if (m instanceof Data_Maybe.Nothing) {
  20063. return v1;
  20064. }
  20065. ;
  20066. return Control_Applicative.pure(dictMonad.Applicative0())(m);
  20067. });
  20068. };
  20069. });
  20070. };
  20071. var plusMaybeT = function plusMaybeT(dictMonad) {
  20072. return new Control_Plus.Plus(function () {
  20073. return altMaybeT(dictMonad);
  20074. }, Control_Applicative.pure(dictMonad.Applicative0())(Data_Maybe.Nothing.value));
  20075. };
  20076. var alternativeMaybeT = function alternativeMaybeT(dictMonad) {
  20077. return new Control_Alternative.Alternative(function () {
  20078. return applicativeMaybeT(dictMonad);
  20079. }, function () {
  20080. return plusMaybeT(dictMonad);
  20081. });
  20082. };
  20083. var monadZeroMaybeT = function monadZeroMaybeT(dictMonad) {
  20084. return new Control_MonadZero.MonadZero(function () {
  20085. return alternativeMaybeT(dictMonad);
  20086. }, function () {
  20087. return monadMaybeT(dictMonad);
  20088. });
  20089. };
  20090. var monadPlusMaybeT = function monadPlusMaybeT(dictMonad) {
  20091. return new Control_MonadPlus.MonadPlus(function () {
  20092. return monadZeroMaybeT(dictMonad);
  20093. });
  20094. };
  20095. module.exports = {
  20096. MaybeT: MaybeT,
  20097. runMaybeT: runMaybeT,
  20098. mapMaybeT: mapMaybeT,
  20099. newtypeMaybeT: newtypeMaybeT,
  20100. functorMaybeT: functorMaybeT,
  20101. applyMaybeT: applyMaybeT,
  20102. applicativeMaybeT: applicativeMaybeT,
  20103. bindMaybeT: bindMaybeT,
  20104. monadMaybeT: monadMaybeT,
  20105. monadTransMaybeT: monadTransMaybeT,
  20106. altMaybeT: altMaybeT,
  20107. plusMaybeT: plusMaybeT,
  20108. alternativeMaybeT: alternativeMaybeT,
  20109. monadPlusMaybeT: monadPlusMaybeT,
  20110. monadZeroMaybeT: monadZeroMaybeT,
  20111. monadRecMaybeT: monadRecMaybeT,
  20112. monadEffectMaybe: monadEffectMaybe,
  20113. monadContMaybeT: monadContMaybeT,
  20114. monadThrowMaybeT: monadThrowMaybeT,
  20115. monadErrorMaybeT: monadErrorMaybeT,
  20116. monadAskMaybeT: monadAskMaybeT,
  20117. monadReaderMaybeT: monadReaderMaybeT,
  20118. monadStateMaybeT: monadStateMaybeT,
  20119. monadTellMaybeT: monadTellMaybeT,
  20120. monadWriterMaybeT: monadWriterMaybeT
  20121. };
  20122. },{"../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.Functor/index.js":"../output/Data.Functor/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Tuple/index.js":"../output/Data.Tuple/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js"}],"../output/Control.Monad.Reader.Trans/index.js":[function(require,module,exports) {
  20123. // Generated by purs version 0.13.6
  20124. "use strict";
  20125. var Control_Alt = require("../Control.Alt/index.js");
  20126. var Control_Alternative = require("../Control.Alternative/index.js");
  20127. var Control_Applicative = require("../Control.Applicative/index.js");
  20128. var Control_Apply = require("../Control.Apply/index.js");
  20129. var Control_Bind = require("../Control.Bind/index.js");
  20130. var Control_Monad = require("../Control.Monad/index.js");
  20131. var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js");
  20132. var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
  20133. var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js");
  20134. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  20135. var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
  20136. var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js");
  20137. var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js");
  20138. var Control_MonadPlus = require("../Control.MonadPlus/index.js");
  20139. var Control_MonadZero = require("../Control.MonadZero/index.js");
  20140. var Control_Plus = require("../Control.Plus/index.js");
  20141. var Data_Distributive = require("../Data.Distributive/index.js");
  20142. var Data_Function = require("../Data.Function/index.js");
  20143. var Data_Functor = require("../Data.Functor/index.js");
  20144. var Data_Monoid = require("../Data.Monoid/index.js");
  20145. var Data_Newtype = require("../Data.Newtype/index.js");
  20146. var Data_Semigroup = require("../Data.Semigroup/index.js");
  20147. var Effect_Class = require("../Effect.Class/index.js");
  20148. var ReaderT = function ReaderT(x) {
  20149. return x;
  20150. };
  20151. var withReaderT = function withReaderT(f) {
  20152. return function (v) {
  20153. return function ($66) {
  20154. return v(f($66));
  20155. };
  20156. };
  20157. };
  20158. var runReaderT = function runReaderT(v) {
  20159. return v;
  20160. };
  20161. var newtypeReaderT = new Data_Newtype.Newtype(function (n) {
  20162. return n;
  20163. }, ReaderT);
  20164. var monadTransReaderT = new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) {
  20165. return function ($67) {
  20166. return ReaderT(Data_Function["const"]($67));
  20167. };
  20168. });
  20169. var mapReaderT = function mapReaderT(f) {
  20170. return function (v) {
  20171. return function ($68) {
  20172. return f(v($68));
  20173. };
  20174. };
  20175. };
  20176. var functorReaderT = function functorReaderT(dictFunctor) {
  20177. return new Data_Functor.Functor(function () {
  20178. var $69 = Data_Functor.map(dictFunctor);
  20179. return function ($70) {
  20180. return mapReaderT($69($70));
  20181. };
  20182. }());
  20183. };
  20184. var distributiveReaderT = function distributiveReaderT(dictDistributive) {
  20185. return new Data_Distributive.Distributive(function () {
  20186. return functorReaderT(dictDistributive.Functor0());
  20187. }, function (dictFunctor) {
  20188. return function (f) {
  20189. var $71 = Data_Distributive.distribute(distributiveReaderT(dictDistributive))(dictFunctor);
  20190. var $72 = Data_Functor.map(dictFunctor)(f);
  20191. return function ($73) {
  20192. return $71($72($73));
  20193. };
  20194. };
  20195. }, function (dictFunctor) {
  20196. return function (a) {
  20197. return function (e) {
  20198. return Data_Distributive.collect(dictDistributive)(dictFunctor)(function (r) {
  20199. return r(e);
  20200. })(a);
  20201. };
  20202. };
  20203. });
  20204. };
  20205. var applyReaderT = function applyReaderT(dictApply) {
  20206. return new Control_Apply.Apply(function () {
  20207. return functorReaderT(dictApply.Functor0());
  20208. }, function (v) {
  20209. return function (v1) {
  20210. return function (r) {
  20211. return Control_Apply.apply(dictApply)(v(r))(v1(r));
  20212. };
  20213. };
  20214. });
  20215. };
  20216. var bindReaderT = function bindReaderT(dictBind) {
  20217. return new Control_Bind.Bind(function () {
  20218. return applyReaderT(dictBind.Apply0());
  20219. }, function (v) {
  20220. return function (k) {
  20221. return function (r) {
  20222. return Control_Bind.bind(dictBind)(v(r))(function (a) {
  20223. var v1 = k(a);
  20224. return v1(r);
  20225. });
  20226. };
  20227. };
  20228. });
  20229. };
  20230. var semigroupReaderT = function semigroupReaderT(dictApply) {
  20231. return function (dictSemigroup) {
  20232. return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyReaderT(dictApply))(Data_Semigroup.append(dictSemigroup)));
  20233. };
  20234. };
  20235. var applicativeReaderT = function applicativeReaderT(dictApplicative) {
  20236. return new Control_Applicative.Applicative(function () {
  20237. return applyReaderT(dictApplicative.Apply0());
  20238. }, function () {
  20239. var $74 = Control_Applicative.pure(dictApplicative);
  20240. return function ($75) {
  20241. return ReaderT(Data_Function["const"]($74($75)));
  20242. };
  20243. }());
  20244. };
  20245. var monadReaderT = function monadReaderT(dictMonad) {
  20246. return new Control_Monad.Monad(function () {
  20247. return applicativeReaderT(dictMonad.Applicative0());
  20248. }, function () {
  20249. return bindReaderT(dictMonad.Bind1());
  20250. });
  20251. };
  20252. var monadAskReaderT = function monadAskReaderT(dictMonad) {
  20253. return new Control_Monad_Reader_Class.MonadAsk(function () {
  20254. return monadReaderT(dictMonad);
  20255. }, Control_Applicative.pure(dictMonad.Applicative0()));
  20256. };
  20257. var monadReaderReaderT = function monadReaderReaderT(dictMonad) {
  20258. return new Control_Monad_Reader_Class.MonadReader(function () {
  20259. return monadAskReaderT(dictMonad);
  20260. }, withReaderT);
  20261. };
  20262. var monadContReaderT = function monadContReaderT(dictMonadCont) {
  20263. return new Control_Monad_Cont_Class.MonadCont(function () {
  20264. return monadReaderT(dictMonadCont.Monad0());
  20265. }, function (f) {
  20266. return function (r) {
  20267. return Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) {
  20268. var v = f(function ($76) {
  20269. return ReaderT(Data_Function["const"](c($76)));
  20270. });
  20271. return v(r);
  20272. });
  20273. };
  20274. });
  20275. };
  20276. var monadEffectReader = function monadEffectReader(dictMonadEffect) {
  20277. return new Effect_Class.MonadEffect(function () {
  20278. return monadReaderT(dictMonadEffect.Monad0());
  20279. }, function () {
  20280. var $77 = Control_Monad_Trans_Class.lift(monadTransReaderT)(dictMonadEffect.Monad0());
  20281. var $78 = Effect_Class.liftEffect(dictMonadEffect);
  20282. return function ($79) {
  20283. return $77($78($79));
  20284. };
  20285. }());
  20286. };
  20287. var monadRecReaderT = function monadRecReaderT(dictMonadRec) {
  20288. return new Control_Monad_Rec_Class.MonadRec(function () {
  20289. return monadReaderT(dictMonadRec.Monad0());
  20290. }, function (k) {
  20291. return function (a) {
  20292. var k$prime = function k$prime(r) {
  20293. return function (a$prime) {
  20294. var v = k(a$prime);
  20295. return Control_Bind.bindFlipped(dictMonadRec.Monad0().Bind1())(Control_Applicative.pure(dictMonadRec.Monad0().Applicative0()))(v(r));
  20296. };
  20297. };
  20298. return function (r) {
  20299. return Control_Monad_Rec_Class.tailRecM(dictMonadRec)(k$prime(r))(a);
  20300. };
  20301. };
  20302. });
  20303. };
  20304. var monadStateReaderT = function monadStateReaderT(dictMonadState) {
  20305. return new Control_Monad_State_Class.MonadState(function () {
  20306. return monadReaderT(dictMonadState.Monad0());
  20307. }, function () {
  20308. var $80 = Control_Monad_Trans_Class.lift(monadTransReaderT)(dictMonadState.Monad0());
  20309. var $81 = Control_Monad_State_Class.state(dictMonadState);
  20310. return function ($82) {
  20311. return $80($81($82));
  20312. };
  20313. }());
  20314. };
  20315. var monadTellReaderT = function monadTellReaderT(dictMonadTell) {
  20316. return new Control_Monad_Writer_Class.MonadTell(function () {
  20317. return monadReaderT(dictMonadTell.Monad0());
  20318. }, function () {
  20319. var $83 = Control_Monad_Trans_Class.lift(monadTransReaderT)(dictMonadTell.Monad0());
  20320. var $84 = Control_Monad_Writer_Class.tell(dictMonadTell);
  20321. return function ($85) {
  20322. return $83($84($85));
  20323. };
  20324. }());
  20325. };
  20326. var monadWriterReaderT = function monadWriterReaderT(dictMonadWriter) {
  20327. return new Control_Monad_Writer_Class.MonadWriter(function () {
  20328. return monadTellReaderT(dictMonadWriter.MonadTell0());
  20329. }, mapReaderT(Control_Monad_Writer_Class.listen(dictMonadWriter)), mapReaderT(Control_Monad_Writer_Class.pass(dictMonadWriter)));
  20330. };
  20331. var monadThrowReaderT = function monadThrowReaderT(dictMonadThrow) {
  20332. return new Control_Monad_Error_Class.MonadThrow(function () {
  20333. return monadReaderT(dictMonadThrow.Monad0());
  20334. }, function () {
  20335. var $86 = Control_Monad_Trans_Class.lift(monadTransReaderT)(dictMonadThrow.Monad0());
  20336. var $87 = Control_Monad_Error_Class.throwError(dictMonadThrow);
  20337. return function ($88) {
  20338. return $86($87($88));
  20339. };
  20340. }());
  20341. };
  20342. var monadErrorReaderT = function monadErrorReaderT(dictMonadError) {
  20343. return new Control_Monad_Error_Class.MonadError(function () {
  20344. return monadThrowReaderT(dictMonadError.MonadThrow0());
  20345. }, function (v) {
  20346. return function (h) {
  20347. return function (r) {
  20348. return Control_Monad_Error_Class.catchError(dictMonadError)(v(r))(function (e) {
  20349. var v1 = h(e);
  20350. return v1(r);
  20351. });
  20352. };
  20353. };
  20354. });
  20355. };
  20356. var monoidReaderT = function monoidReaderT(dictApplicative) {
  20357. return function (dictMonoid) {
  20358. return new Data_Monoid.Monoid(function () {
  20359. return semigroupReaderT(dictApplicative.Apply0())(dictMonoid.Semigroup0());
  20360. }, Control_Applicative.pure(applicativeReaderT(dictApplicative))(Data_Monoid.mempty(dictMonoid)));
  20361. };
  20362. };
  20363. var altReaderT = function altReaderT(dictAlt) {
  20364. return new Control_Alt.Alt(function () {
  20365. return functorReaderT(dictAlt.Functor0());
  20366. }, function (v) {
  20367. return function (v1) {
  20368. return function (r) {
  20369. return Control_Alt.alt(dictAlt)(v(r))(v1(r));
  20370. };
  20371. };
  20372. });
  20373. };
  20374. var plusReaderT = function plusReaderT(dictPlus) {
  20375. return new Control_Plus.Plus(function () {
  20376. return altReaderT(dictPlus.Alt0());
  20377. }, Data_Function["const"](Control_Plus.empty(dictPlus)));
  20378. };
  20379. var alternativeReaderT = function alternativeReaderT(dictAlternative) {
  20380. return new Control_Alternative.Alternative(function () {
  20381. return applicativeReaderT(dictAlternative.Applicative0());
  20382. }, function () {
  20383. return plusReaderT(dictAlternative.Plus1());
  20384. });
  20385. };
  20386. var monadZeroReaderT = function monadZeroReaderT(dictMonadZero) {
  20387. return new Control_MonadZero.MonadZero(function () {
  20388. return alternativeReaderT(dictMonadZero.Alternative1());
  20389. }, function () {
  20390. return monadReaderT(dictMonadZero.Monad0());
  20391. });
  20392. };
  20393. var monadPlusReaderT = function monadPlusReaderT(dictMonadPlus) {
  20394. return new Control_MonadPlus.MonadPlus(function () {
  20395. return monadZeroReaderT(dictMonadPlus.MonadZero0());
  20396. });
  20397. };
  20398. module.exports = {
  20399. ReaderT: ReaderT,
  20400. runReaderT: runReaderT,
  20401. withReaderT: withReaderT,
  20402. mapReaderT: mapReaderT,
  20403. newtypeReaderT: newtypeReaderT,
  20404. functorReaderT: functorReaderT,
  20405. applyReaderT: applyReaderT,
  20406. applicativeReaderT: applicativeReaderT,
  20407. altReaderT: altReaderT,
  20408. plusReaderT: plusReaderT,
  20409. alternativeReaderT: alternativeReaderT,
  20410. bindReaderT: bindReaderT,
  20411. monadReaderT: monadReaderT,
  20412. monadZeroReaderT: monadZeroReaderT,
  20413. semigroupReaderT: semigroupReaderT,
  20414. monoidReaderT: monoidReaderT,
  20415. monadPlusReaderT: monadPlusReaderT,
  20416. monadTransReaderT: monadTransReaderT,
  20417. monadEffectReader: monadEffectReader,
  20418. monadContReaderT: monadContReaderT,
  20419. monadThrowReaderT: monadThrowReaderT,
  20420. monadErrorReaderT: monadErrorReaderT,
  20421. monadAskReaderT: monadAskReaderT,
  20422. monadReaderReaderT: monadReaderReaderT,
  20423. monadStateReaderT: monadStateReaderT,
  20424. monadTellReaderT: monadTellReaderT,
  20425. monadWriterReaderT: monadWriterReaderT,
  20426. distributiveReaderT: distributiveReaderT,
  20427. monadRecReaderT: monadRecReaderT
  20428. };
  20429. },{"../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.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.Distributive/index.js":"../output/Data.Distributive/index.js","../Data.Function/index.js":"../output/Data.Function/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","../Effect.Class/index.js":"../output/Effect.Class/index.js"}],"../output/Control.Monad.Writer.Trans/index.js":[function(require,module,exports) {
  20430. // Generated by purs version 0.13.6
  20431. "use strict";
  20432. var Control_Alt = require("../Control.Alt/index.js");
  20433. var Control_Alternative = require("../Control.Alternative/index.js");
  20434. var Control_Applicative = require("../Control.Applicative/index.js");
  20435. var Control_Apply = require("../Control.Apply/index.js");
  20436. var Control_Bind = require("../Control.Bind/index.js");
  20437. var Control_Monad = require("../Control.Monad/index.js");
  20438. var Control_Monad_Cont_Class = require("../Control.Monad.Cont.Class/index.js");
  20439. var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
  20440. var Control_Monad_Reader_Class = require("../Control.Monad.Reader.Class/index.js");
  20441. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  20442. var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
  20443. var Control_Monad_Trans_Class = require("../Control.Monad.Trans.Class/index.js");
  20444. var Control_Monad_Writer_Class = require("../Control.Monad.Writer.Class/index.js");
  20445. var Control_MonadPlus = require("../Control.MonadPlus/index.js");
  20446. var Control_MonadZero = require("../Control.MonadZero/index.js");
  20447. var Control_Plus = require("../Control.Plus/index.js");
  20448. var Data_Functor = require("../Data.Functor/index.js");
  20449. var Data_Monoid = require("../Data.Monoid/index.js");
  20450. var Data_Newtype = require("../Data.Newtype/index.js");
  20451. var Data_Semigroup = require("../Data.Semigroup/index.js");
  20452. var Data_Tuple = require("../Data.Tuple/index.js");
  20453. var Data_Unit = require("../Data.Unit/index.js");
  20454. var Effect_Class = require("../Effect.Class/index.js");
  20455. var WriterT = function WriterT(x) {
  20456. return x;
  20457. };
  20458. var runWriterT = function runWriterT(v) {
  20459. return v;
  20460. };
  20461. var newtypeWriterT = new Data_Newtype.Newtype(function (n) {
  20462. return n;
  20463. }, WriterT);
  20464. var monadTransWriterT = function monadTransWriterT(dictMonoid) {
  20465. return new Control_Monad_Trans_Class.MonadTrans(function (dictMonad) {
  20466. return function (m) {
  20467. return Control_Bind.bind(dictMonad.Bind1())(m)(function (a) {
  20468. return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Tuple.Tuple(a, Data_Monoid.mempty(dictMonoid)));
  20469. });
  20470. };
  20471. });
  20472. };
  20473. var mapWriterT = function mapWriterT(f) {
  20474. return function (v) {
  20475. return f(v);
  20476. };
  20477. };
  20478. var functorWriterT = function functorWriterT(dictFunctor) {
  20479. return new Data_Functor.Functor(function (f) {
  20480. return mapWriterT(Data_Functor.map(dictFunctor)(function (v) {
  20481. return new Data_Tuple.Tuple(f(v.value0), v.value1);
  20482. }));
  20483. });
  20484. };
  20485. var execWriterT = function execWriterT(dictFunctor) {
  20486. return function (v) {
  20487. return Data_Functor.map(dictFunctor)(Data_Tuple.snd)(v);
  20488. };
  20489. };
  20490. var applyWriterT = function applyWriterT(dictSemigroup) {
  20491. return function (dictApply) {
  20492. return new Control_Apply.Apply(function () {
  20493. return functorWriterT(dictApply.Functor0());
  20494. }, function (v) {
  20495. return function (v1) {
  20496. var k = function k(v3) {
  20497. return function (v4) {
  20498. return new Data_Tuple.Tuple(v3.value0(v4.value0), Data_Semigroup.append(dictSemigroup)(v3.value1)(v4.value1));
  20499. };
  20500. };
  20501. return Control_Apply.apply(dictApply)(Data_Functor.map(dictApply.Functor0())(k)(v))(v1);
  20502. };
  20503. });
  20504. };
  20505. };
  20506. var bindWriterT = function bindWriterT(dictSemigroup) {
  20507. return function (dictBind) {
  20508. return new Control_Bind.Bind(function () {
  20509. return applyWriterT(dictSemigroup)(dictBind.Apply0());
  20510. }, function (v) {
  20511. return function (k) {
  20512. return WriterT(Control_Bind.bind(dictBind)(v)(function (v1) {
  20513. var v2 = k(v1.value0);
  20514. return Data_Functor.map(dictBind.Apply0().Functor0())(function (v3) {
  20515. return new Data_Tuple.Tuple(v3.value0, Data_Semigroup.append(dictSemigroup)(v1.value1)(v3.value1));
  20516. })(v2);
  20517. }));
  20518. };
  20519. });
  20520. };
  20521. };
  20522. var applicativeWriterT = function applicativeWriterT(dictMonoid) {
  20523. return function (dictApplicative) {
  20524. return new Control_Applicative.Applicative(function () {
  20525. return applyWriterT(dictMonoid.Semigroup0())(dictApplicative.Apply0());
  20526. }, function (a) {
  20527. return WriterT(Control_Applicative.pure(dictApplicative)(new Data_Tuple.Tuple(a, Data_Monoid.mempty(dictMonoid))));
  20528. });
  20529. };
  20530. };
  20531. var monadWriterT = function monadWriterT(dictMonoid) {
  20532. return function (dictMonad) {
  20533. return new Control_Monad.Monad(function () {
  20534. return applicativeWriterT(dictMonoid)(dictMonad.Applicative0());
  20535. }, function () {
  20536. return bindWriterT(dictMonoid.Semigroup0())(dictMonad.Bind1());
  20537. });
  20538. };
  20539. };
  20540. var monadAskWriterT = function monadAskWriterT(dictMonoid) {
  20541. return function (dictMonadAsk) {
  20542. return new Control_Monad_Reader_Class.MonadAsk(function () {
  20543. return monadWriterT(dictMonoid)(dictMonadAsk.Monad0());
  20544. }, Control_Monad_Trans_Class.lift(monadTransWriterT(dictMonoid))(dictMonadAsk.Monad0())(Control_Monad_Reader_Class.ask(dictMonadAsk)));
  20545. };
  20546. };
  20547. var monadReaderWriterT = function monadReaderWriterT(dictMonoid) {
  20548. return function (dictMonadReader) {
  20549. return new Control_Monad_Reader_Class.MonadReader(function () {
  20550. return monadAskWriterT(dictMonoid)(dictMonadReader.MonadAsk0());
  20551. }, function (f) {
  20552. return mapWriterT(Control_Monad_Reader_Class.local(dictMonadReader)(f));
  20553. });
  20554. };
  20555. };
  20556. var monadContWriterT = function monadContWriterT(dictMonoid) {
  20557. return function (dictMonadCont) {
  20558. return new Control_Monad_Cont_Class.MonadCont(function () {
  20559. return monadWriterT(dictMonoid)(dictMonadCont.Monad0());
  20560. }, function (f) {
  20561. return WriterT(Control_Monad_Cont_Class.callCC(dictMonadCont)(function (c) {
  20562. var v = f(function (a) {
  20563. return WriterT(c(new Data_Tuple.Tuple(a, Data_Monoid.mempty(dictMonoid))));
  20564. });
  20565. return v;
  20566. }));
  20567. });
  20568. };
  20569. };
  20570. var monadEffectWriter = function monadEffectWriter(dictMonoid) {
  20571. return function (dictMonadEffect) {
  20572. return new Effect_Class.MonadEffect(function () {
  20573. return monadWriterT(dictMonoid)(dictMonadEffect.Monad0());
  20574. }, function () {
  20575. var $121 = Control_Monad_Trans_Class.lift(monadTransWriterT(dictMonoid))(dictMonadEffect.Monad0());
  20576. var $122 = Effect_Class.liftEffect(dictMonadEffect);
  20577. return function ($123) {
  20578. return $121($122($123));
  20579. };
  20580. }());
  20581. };
  20582. };
  20583. var monadRecWriterT = function monadRecWriterT(dictMonoid) {
  20584. return function (dictMonadRec) {
  20585. return new Control_Monad_Rec_Class.MonadRec(function () {
  20586. return monadWriterT(dictMonoid)(dictMonadRec.Monad0());
  20587. }, function (f) {
  20588. return function (a) {
  20589. var f$prime = function f$prime(v) {
  20590. var v1 = f(v.value0);
  20591. return Control_Bind.bind(dictMonadRec.Monad0().Bind1())(v1)(function (v2) {
  20592. return Control_Applicative.pure(dictMonadRec.Monad0().Applicative0())(function () {
  20593. if (v2.value0 instanceof Control_Monad_Rec_Class.Loop) {
  20594. return new Control_Monad_Rec_Class.Loop(new Data_Tuple.Tuple(v2.value0.value0, Data_Semigroup.append(dictMonoid.Semigroup0())(v.value1)(v2.value1)));
  20595. }
  20596. ;
  20597. if (v2.value0 instanceof Control_Monad_Rec_Class.Done) {
  20598. return new Control_Monad_Rec_Class.Done(new Data_Tuple.Tuple(v2.value0.value0, Data_Semigroup.append(dictMonoid.Semigroup0())(v.value1)(v2.value1)));
  20599. }
  20600. ;
  20601. throw new Error("Failed pattern match at Control.Monad.Writer.Trans (line 83, column 16 - line 85, column 47): " + [v2.value0.constructor.name]);
  20602. }());
  20603. });
  20604. };
  20605. return WriterT(Control_Monad_Rec_Class.tailRecM(dictMonadRec)(f$prime)(new Data_Tuple.Tuple(a, Data_Monoid.mempty(dictMonoid))));
  20606. };
  20607. });
  20608. };
  20609. };
  20610. var monadStateWriterT = function monadStateWriterT(dictMonoid) {
  20611. return function (dictMonadState) {
  20612. return new Control_Monad_State_Class.MonadState(function () {
  20613. return monadWriterT(dictMonoid)(dictMonadState.Monad0());
  20614. }, function (f) {
  20615. return Control_Monad_Trans_Class.lift(monadTransWriterT(dictMonoid))(dictMonadState.Monad0())(Control_Monad_State_Class.state(dictMonadState)(f));
  20616. });
  20617. };
  20618. };
  20619. var monadTellWriterT = function monadTellWriterT(dictMonoid) {
  20620. return function (dictMonad) {
  20621. return new Control_Monad_Writer_Class.MonadTell(function () {
  20622. return monadWriterT(dictMonoid)(dictMonad);
  20623. }, function () {
  20624. var $124 = Control_Applicative.pure(dictMonad.Applicative0());
  20625. var $125 = Data_Tuple.Tuple.create(Data_Unit.unit);
  20626. return function ($126) {
  20627. return WriterT($124($125($126)));
  20628. };
  20629. }());
  20630. };
  20631. };
  20632. var monadWriterWriterT = function monadWriterWriterT(dictMonoid) {
  20633. return function (dictMonad) {
  20634. return new Control_Monad_Writer_Class.MonadWriter(function () {
  20635. return monadTellWriterT(dictMonoid)(dictMonad);
  20636. }, function (v) {
  20637. return Control_Bind.bind(dictMonad.Bind1())(v)(function (v1) {
  20638. return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v1.value0, v1.value1), v1.value1));
  20639. });
  20640. }, function (v) {
  20641. return Control_Bind.bind(dictMonad.Bind1())(v)(function (v1) {
  20642. return Control_Applicative.pure(dictMonad.Applicative0())(new Data_Tuple.Tuple(v1.value0.value0, v1.value0.value1(v1.value1)));
  20643. });
  20644. });
  20645. };
  20646. };
  20647. var monadThrowWriterT = function monadThrowWriterT(dictMonoid) {
  20648. return function (dictMonadThrow) {
  20649. return new Control_Monad_Error_Class.MonadThrow(function () {
  20650. return monadWriterT(dictMonoid)(dictMonadThrow.Monad0());
  20651. }, function (e) {
  20652. return Control_Monad_Trans_Class.lift(monadTransWriterT(dictMonoid))(dictMonadThrow.Monad0())(Control_Monad_Error_Class.throwError(dictMonadThrow)(e));
  20653. });
  20654. };
  20655. };
  20656. var monadErrorWriterT = function monadErrorWriterT(dictMonoid) {
  20657. return function (dictMonadError) {
  20658. return new Control_Monad_Error_Class.MonadError(function () {
  20659. return monadThrowWriterT(dictMonoid)(dictMonadError.MonadThrow0());
  20660. }, function (v) {
  20661. return function (h) {
  20662. return WriterT(Control_Monad_Error_Class.catchError(dictMonadError)(v)(function (e) {
  20663. var v1 = h(e);
  20664. return v1;
  20665. }));
  20666. };
  20667. });
  20668. };
  20669. };
  20670. var altWriterT = function altWriterT(dictAlt) {
  20671. return new Control_Alt.Alt(function () {
  20672. return functorWriterT(dictAlt.Functor0());
  20673. }, function (v) {
  20674. return function (v1) {
  20675. return Control_Alt.alt(dictAlt)(v)(v1);
  20676. };
  20677. });
  20678. };
  20679. var plusWriterT = function plusWriterT(dictPlus) {
  20680. return new Control_Plus.Plus(function () {
  20681. return altWriterT(dictPlus.Alt0());
  20682. }, Control_Plus.empty(dictPlus));
  20683. };
  20684. var alternativeWriterT = function alternativeWriterT(dictMonoid) {
  20685. return function (dictAlternative) {
  20686. return new Control_Alternative.Alternative(function () {
  20687. return applicativeWriterT(dictMonoid)(dictAlternative.Applicative0());
  20688. }, function () {
  20689. return plusWriterT(dictAlternative.Plus1());
  20690. });
  20691. };
  20692. };
  20693. var monadZeroWriterT = function monadZeroWriterT(dictMonoid) {
  20694. return function (dictMonadZero) {
  20695. return new Control_MonadZero.MonadZero(function () {
  20696. return alternativeWriterT(dictMonoid)(dictMonadZero.Alternative1());
  20697. }, function () {
  20698. return monadWriterT(dictMonoid)(dictMonadZero.Monad0());
  20699. });
  20700. };
  20701. };
  20702. var monadPlusWriterT = function monadPlusWriterT(dictMonoid) {
  20703. return function (dictMonadPlus) {
  20704. return new Control_MonadPlus.MonadPlus(function () {
  20705. return monadZeroWriterT(dictMonoid)(dictMonadPlus.MonadZero0());
  20706. });
  20707. };
  20708. };
  20709. module.exports = {
  20710. WriterT: WriterT,
  20711. runWriterT: runWriterT,
  20712. execWriterT: execWriterT,
  20713. mapWriterT: mapWriterT,
  20714. newtypeWriterT: newtypeWriterT,
  20715. functorWriterT: functorWriterT,
  20716. applyWriterT: applyWriterT,
  20717. applicativeWriterT: applicativeWriterT,
  20718. altWriterT: altWriterT,
  20719. plusWriterT: plusWriterT,
  20720. alternativeWriterT: alternativeWriterT,
  20721. bindWriterT: bindWriterT,
  20722. monadWriterT: monadWriterT,
  20723. monadRecWriterT: monadRecWriterT,
  20724. monadZeroWriterT: monadZeroWriterT,
  20725. monadPlusWriterT: monadPlusWriterT,
  20726. monadTransWriterT: monadTransWriterT,
  20727. monadEffectWriter: monadEffectWriter,
  20728. monadContWriterT: monadContWriterT,
  20729. monadThrowWriterT: monadThrowWriterT,
  20730. monadErrorWriterT: monadErrorWriterT,
  20731. monadAskWriterT: monadAskWriterT,
  20732. monadReaderWriterT: monadReaderWriterT,
  20733. monadStateWriterT: monadStateWriterT,
  20734. monadTellWriterT: monadTellWriterT,
  20735. monadWriterWriterT: monadWriterWriterT
  20736. };
  20737. },{"../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.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.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","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js"}],"../output/Data.Functor.App/index.js":[function(require,module,exports) {
  20738. // Generated by purs version 0.13.6
  20739. "use strict";
  20740. var Control_Applicative = require("../Control.Applicative/index.js");
  20741. var Control_Apply = require("../Control.Apply/index.js");
  20742. var Data_Eq = require("../Data.Eq/index.js");
  20743. var Data_Monoid = require("../Data.Monoid/index.js");
  20744. var Data_Newtype = require("../Data.Newtype/index.js");
  20745. var Data_Ord = require("../Data.Ord/index.js");
  20746. var Data_Semigroup = require("../Data.Semigroup/index.js");
  20747. var Data_Show = require("../Data.Show/index.js");
  20748. var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
  20749. var App = function App(x) {
  20750. return x;
  20751. };
  20752. var traversableWithIndexApp = function traversableWithIndexApp(dictTraversableWithIndex) {
  20753. return dictTraversableWithIndex;
  20754. };
  20755. var traversableApp = function traversableApp(dictTraversable) {
  20756. return dictTraversable;
  20757. };
  20758. var showApp = function showApp(dictShow) {
  20759. return new Data_Show.Show(function (v) {
  20760. return "(App " + (Data_Show.show(dictShow)(v) + ")");
  20761. });
  20762. };
  20763. var semigroupApp = function semigroupApp(dictApply) {
  20764. return function (dictSemigroup) {
  20765. return new Data_Semigroup.Semigroup(function (v) {
  20766. return function (v1) {
  20767. return Control_Apply.lift2(dictApply)(Data_Semigroup.append(dictSemigroup))(v)(v1);
  20768. };
  20769. });
  20770. };
  20771. };
  20772. var plusApp = function plusApp(dictPlus) {
  20773. return dictPlus;
  20774. };
  20775. var newtypeApp = new Data_Newtype.Newtype(function (n) {
  20776. return n;
  20777. }, App);
  20778. var monoidApp = function monoidApp(dictApplicative) {
  20779. return function (dictMonoid) {
  20780. return new Data_Monoid.Monoid(function () {
  20781. return semigroupApp(dictApplicative.Apply0())(dictMonoid.Semigroup0());
  20782. }, Control_Applicative.pure(dictApplicative)(Data_Monoid.mempty(dictMonoid)));
  20783. };
  20784. };
  20785. var monadZeroApp = function monadZeroApp(dictMonadZero) {
  20786. return dictMonadZero;
  20787. };
  20788. var monadPlusApp = function monadPlusApp(dictMonadPlus) {
  20789. return dictMonadPlus;
  20790. };
  20791. var monadApp = function monadApp(dictMonad) {
  20792. return dictMonad;
  20793. };
  20794. var lazyApp = function lazyApp(dictLazy) {
  20795. return dictLazy;
  20796. };
  20797. var hoistLowerApp = Unsafe_Coerce.unsafeCoerce;
  20798. var hoistLiftApp = Unsafe_Coerce.unsafeCoerce;
  20799. var hoistApp = function hoistApp(f) {
  20800. return function (v) {
  20801. return f(v);
  20802. };
  20803. };
  20804. var functorWithIndexApp = function functorWithIndexApp(dictFunctorWithIndex) {
  20805. return dictFunctorWithIndex;
  20806. };
  20807. var functorApp = function functorApp(dictFunctor) {
  20808. return dictFunctor;
  20809. };
  20810. var foldableWithIndexApp = function foldableWithIndexApp(dictFoldableWithIndex) {
  20811. return dictFoldableWithIndex;
  20812. };
  20813. var foldableApp = function foldableApp(dictFoldable) {
  20814. return dictFoldable;
  20815. };
  20816. var extendApp = function extendApp(dictExtend) {
  20817. return dictExtend;
  20818. };
  20819. var eqApp = function eqApp(dictEq1) {
  20820. return function (dictEq) {
  20821. return new Data_Eq.Eq(function (x) {
  20822. return function (y) {
  20823. return Data_Eq.eq1(dictEq1)(dictEq)(x)(y);
  20824. };
  20825. });
  20826. };
  20827. };
  20828. var ordApp = function ordApp(dictOrd1) {
  20829. return function (dictOrd) {
  20830. return new Data_Ord.Ord(function () {
  20831. return eqApp(dictOrd1.Eq10())(dictOrd.Eq0());
  20832. }, function (x) {
  20833. return function (y) {
  20834. return Data_Ord.compare1(dictOrd1)(dictOrd)(x)(y);
  20835. };
  20836. });
  20837. };
  20838. };
  20839. var eq1App = function eq1App(dictEq1) {
  20840. return new Data_Eq.Eq1(function (dictEq) {
  20841. return Data_Eq.eq(eqApp(dictEq1)(dictEq));
  20842. });
  20843. };
  20844. var ord1App = function ord1App(dictOrd1) {
  20845. return new Data_Ord.Ord1(function () {
  20846. return eq1App(dictOrd1.Eq10());
  20847. }, function (dictOrd) {
  20848. return Data_Ord.compare(ordApp(dictOrd1)(dictOrd));
  20849. });
  20850. };
  20851. var comonadApp = function comonadApp(dictComonad) {
  20852. return dictComonad;
  20853. };
  20854. var bindApp = function bindApp(dictBind) {
  20855. return dictBind;
  20856. };
  20857. var applyApp = function applyApp(dictApply) {
  20858. return dictApply;
  20859. };
  20860. var applicativeApp = function applicativeApp(dictApplicative) {
  20861. return dictApplicative;
  20862. };
  20863. var alternativeApp = function alternativeApp(dictAlternative) {
  20864. return dictAlternative;
  20865. };
  20866. var altApp = function altApp(dictAlt) {
  20867. return dictAlt;
  20868. };
  20869. module.exports = {
  20870. App: App,
  20871. hoistApp: hoistApp,
  20872. hoistLiftApp: hoistLiftApp,
  20873. hoistLowerApp: hoistLowerApp,
  20874. newtypeApp: newtypeApp,
  20875. eqApp: eqApp,
  20876. eq1App: eq1App,
  20877. ordApp: ordApp,
  20878. ord1App: ord1App,
  20879. showApp: showApp,
  20880. semigroupApp: semigroupApp,
  20881. monoidApp: monoidApp,
  20882. functorApp: functorApp,
  20883. functorWithIndexApp: functorWithIndexApp,
  20884. applyApp: applyApp,
  20885. applicativeApp: applicativeApp,
  20886. bindApp: bindApp,
  20887. monadApp: monadApp,
  20888. altApp: altApp,
  20889. plusApp: plusApp,
  20890. alternativeApp: alternativeApp,
  20891. monadZeroApp: monadZeroApp,
  20892. monadPlusApp: monadPlusApp,
  20893. lazyApp: lazyApp,
  20894. foldableApp: foldableApp,
  20895. traversableApp: traversableApp,
  20896. foldableWithIndexApp: foldableWithIndexApp,
  20897. traversableWithIndexApp: traversableWithIndexApp,
  20898. extendApp: extendApp,
  20899. comonadApp: comonadApp
  20900. };
  20901. },{"../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Apply/index.js":"../output/Control.Apply/index.js","../Data.Eq/index.js":"../output/Data.Eq/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","../Unsafe.Coerce/index.js":"../output/Unsafe.Coerce/index.js"}],"../output/Data.Functor.Compose/index.js":[function(require,module,exports) {
  20902. // Generated by purs version 0.13.6
  20903. "use strict";
  20904. var Control_Alt = require("../Control.Alt/index.js");
  20905. var Control_Alternative = require("../Control.Alternative/index.js");
  20906. var Control_Applicative = require("../Control.Applicative/index.js");
  20907. var Control_Apply = require("../Control.Apply/index.js");
  20908. var Control_Category = require("../Control.Category/index.js");
  20909. var Control_Plus = require("../Control.Plus/index.js");
  20910. var Data_Eq = require("../Data.Eq/index.js");
  20911. var Data_Foldable = require("../Data.Foldable/index.js");
  20912. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  20913. var Data_Function = require("../Data.Function/index.js");
  20914. var Data_Functor = require("../Data.Functor/index.js");
  20915. var Data_Functor_App = require("../Data.Functor.App/index.js");
  20916. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  20917. var Data_Newtype = require("../Data.Newtype/index.js");
  20918. var Data_Ord = require("../Data.Ord/index.js");
  20919. var Data_Show = require("../Data.Show/index.js");
  20920. var Data_Traversable = require("../Data.Traversable/index.js");
  20921. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  20922. var Data_Tuple = require("../Data.Tuple/index.js");
  20923. var Compose = function Compose(x) {
  20924. return x;
  20925. };
  20926. var showCompose = function showCompose(dictShow) {
  20927. return new Data_Show.Show(function (v) {
  20928. return "(Compose " + (Data_Show.show(dictShow)(v) + ")");
  20929. });
  20930. };
  20931. var newtypeCompose = new Data_Newtype.Newtype(function (n) {
  20932. return n;
  20933. }, Compose);
  20934. var functorCompose = function functorCompose(dictFunctor) {
  20935. return function (dictFunctor1) {
  20936. return new Data_Functor.Functor(function (f) {
  20937. return function (v) {
  20938. return Compose(Data_Functor.map(dictFunctor)(Data_Functor.map(dictFunctor1)(f))(v));
  20939. };
  20940. });
  20941. };
  20942. };
  20943. var functorWithIndexCompose = function functorWithIndexCompose(dictFunctorWithIndex) {
  20944. return function (dictFunctorWithIndex1) {
  20945. return new Data_FunctorWithIndex.FunctorWithIndex(function () {
  20946. return functorCompose(dictFunctorWithIndex.Functor0())(dictFunctorWithIndex1.Functor0());
  20947. }, function (f) {
  20948. return function (v) {
  20949. return Compose(Data_FunctorWithIndex.mapWithIndex(dictFunctorWithIndex)(function () {
  20950. var $100 = Data_FunctorWithIndex.mapWithIndex(dictFunctorWithIndex1);
  20951. var $101 = Data_Tuple.curry(f);
  20952. return function ($102) {
  20953. return $100($101($102));
  20954. };
  20955. }())(v));
  20956. };
  20957. });
  20958. };
  20959. };
  20960. var foldableCompose = function foldableCompose(dictFoldable) {
  20961. return function (dictFoldable1) {
  20962. return new Data_Foldable.Foldable(function (dictMonoid) {
  20963. return function (f) {
  20964. return function (v) {
  20965. return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(Data_Foldable.foldMap(dictFoldable1)(dictMonoid)(f))(v);
  20966. };
  20967. };
  20968. }, function (f) {
  20969. return function (i) {
  20970. return function (v) {
  20971. return Data_Foldable.foldl(dictFoldable)(Data_Foldable.foldl(dictFoldable1)(f))(i)(v);
  20972. };
  20973. };
  20974. }, function (f) {
  20975. return function (i) {
  20976. return function (v) {
  20977. return Data_Foldable.foldr(dictFoldable)(Data_Function.flip(Data_Foldable.foldr(dictFoldable1)(f)))(i)(v);
  20978. };
  20979. };
  20980. });
  20981. };
  20982. };
  20983. var foldableWithIndexCompose = function foldableWithIndexCompose(dictFoldableWithIndex) {
  20984. return function (dictFoldableWithIndex1) {
  20985. return new Data_FoldableWithIndex.FoldableWithIndex(function () {
  20986. return foldableCompose(dictFoldableWithIndex.Foldable0())(dictFoldableWithIndex1.Foldable0());
  20987. }, function (dictMonoid) {
  20988. return function (f) {
  20989. return function (v) {
  20990. return Data_FoldableWithIndex.foldMapWithIndex(dictFoldableWithIndex)(dictMonoid)(function () {
  20991. var $103 = Data_FoldableWithIndex.foldMapWithIndex(dictFoldableWithIndex1)(dictMonoid);
  20992. var $104 = Data_Tuple.curry(f);
  20993. return function ($105) {
  20994. return $103($104($105));
  20995. };
  20996. }())(v);
  20997. };
  20998. };
  20999. }, function (f) {
  21000. return function (i) {
  21001. return function (v) {
  21002. return Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex)(function () {
  21003. var $106 = Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex1);
  21004. var $107 = Data_Tuple.curry(f);
  21005. return function ($108) {
  21006. return $106($107($108));
  21007. };
  21008. }())(i)(v);
  21009. };
  21010. };
  21011. }, function (f) {
  21012. return function (i) {
  21013. return function (v) {
  21014. return Data_FoldableWithIndex.foldrWithIndex(dictFoldableWithIndex)(function (a) {
  21015. return Data_Function.flip(Data_FoldableWithIndex.foldrWithIndex(dictFoldableWithIndex1)(Data_Tuple.curry(f)(a)));
  21016. })(i)(v);
  21017. };
  21018. };
  21019. });
  21020. };
  21021. };
  21022. var traversableCompose = function traversableCompose(dictTraversable) {
  21023. return function (dictTraversable1) {
  21024. return new Data_Traversable.Traversable(function () {
  21025. return foldableCompose(dictTraversable.Foldable1())(dictTraversable1.Foldable1());
  21026. }, function () {
  21027. return functorCompose(dictTraversable.Functor0())(dictTraversable1.Functor0());
  21028. }, function (dictApplicative) {
  21029. return Data_Traversable.traverse(traversableCompose(dictTraversable)(dictTraversable1))(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
  21030. }, function (dictApplicative) {
  21031. return function (f) {
  21032. return function (v) {
  21033. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Compose)(Data_Traversable.traverse(dictTraversable)(dictApplicative)(Data_Traversable.traverse(dictTraversable1)(dictApplicative)(f))(v));
  21034. };
  21035. };
  21036. });
  21037. };
  21038. };
  21039. var traversableWithIndexCompose = function traversableWithIndexCompose(dictTraversableWithIndex) {
  21040. return function (dictTraversableWithIndex1) {
  21041. return new Data_TraversableWithIndex.TraversableWithIndex(function () {
  21042. return foldableWithIndexCompose(dictTraversableWithIndex.FoldableWithIndex1())(dictTraversableWithIndex1.FoldableWithIndex1());
  21043. }, function () {
  21044. return functorWithIndexCompose(dictTraversableWithIndex.FunctorWithIndex0())(dictTraversableWithIndex1.FunctorWithIndex0());
  21045. }, function () {
  21046. return traversableCompose(dictTraversableWithIndex.Traversable2())(dictTraversableWithIndex1.Traversable2());
  21047. }, function (dictApplicative) {
  21048. return function (f) {
  21049. return function (v) {
  21050. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Compose)(Data_TraversableWithIndex.traverseWithIndex(dictTraversableWithIndex)(dictApplicative)(function () {
  21051. var $109 = Data_TraversableWithIndex.traverseWithIndex(dictTraversableWithIndex1)(dictApplicative);
  21052. var $110 = Data_Tuple.curry(f);
  21053. return function ($111) {
  21054. return $109($110($111));
  21055. };
  21056. }())(v));
  21057. };
  21058. };
  21059. });
  21060. };
  21061. };
  21062. var eqCompose = function eqCompose(dictEq1) {
  21063. return function (dictEq11) {
  21064. return function (dictEq) {
  21065. return new Data_Eq.Eq(function (v) {
  21066. return function (v1) {
  21067. return Data_Eq.eq1(dictEq1)(Data_Functor_App.eqApp(dictEq11)(dictEq))(Data_Functor_App.hoistLiftApp(v))(Data_Functor_App.hoistLiftApp(v1));
  21068. };
  21069. });
  21070. };
  21071. };
  21072. };
  21073. var ordCompose = function ordCompose(dictOrd1) {
  21074. return function (dictOrd11) {
  21075. return function (dictOrd) {
  21076. return new Data_Ord.Ord(function () {
  21077. return eqCompose(dictOrd1.Eq10())(dictOrd11.Eq10())(dictOrd.Eq0());
  21078. }, function (v) {
  21079. return function (v1) {
  21080. return Data_Ord.compare1(dictOrd1)(Data_Functor_App.ordApp(dictOrd11)(dictOrd))(Data_Functor_App.hoistLiftApp(v))(Data_Functor_App.hoistLiftApp(v1));
  21081. };
  21082. });
  21083. };
  21084. };
  21085. };
  21086. var eq1Compose = function eq1Compose(dictEq1) {
  21087. return function (dictEq11) {
  21088. return new Data_Eq.Eq1(function (dictEq) {
  21089. return Data_Eq.eq(eqCompose(dictEq1)(dictEq11)(dictEq));
  21090. });
  21091. };
  21092. };
  21093. var ord1Compose = function ord1Compose(dictOrd1) {
  21094. return function (dictOrd11) {
  21095. return new Data_Ord.Ord1(function () {
  21096. return eq1Compose(dictOrd1.Eq10())(dictOrd11.Eq10());
  21097. }, function (dictOrd) {
  21098. return Data_Ord.compare(ordCompose(dictOrd1)(dictOrd11)(dictOrd));
  21099. });
  21100. };
  21101. };
  21102. var bihoistCompose = function bihoistCompose(dictFunctor) {
  21103. return function (natF) {
  21104. return function (natG) {
  21105. return function (v) {
  21106. return natF(Data_Functor.map(dictFunctor)(natG)(v));
  21107. };
  21108. };
  21109. };
  21110. };
  21111. var applyCompose = function applyCompose(dictApply) {
  21112. return function (dictApply1) {
  21113. return new Control_Apply.Apply(function () {
  21114. return functorCompose(dictApply.Functor0())(dictApply1.Functor0());
  21115. }, function (v) {
  21116. return function (v1) {
  21117. return Compose(Control_Apply.apply(dictApply)(Data_Functor.map(dictApply.Functor0())(Control_Apply.apply(dictApply1))(v))(v1));
  21118. };
  21119. });
  21120. };
  21121. };
  21122. var applicativeCompose = function applicativeCompose(dictApplicative) {
  21123. return function (dictApplicative1) {
  21124. return new Control_Applicative.Applicative(function () {
  21125. return applyCompose(dictApplicative.Apply0())(dictApplicative1.Apply0());
  21126. }, function () {
  21127. var $112 = Control_Applicative.pure(dictApplicative);
  21128. var $113 = Control_Applicative.pure(dictApplicative1);
  21129. return function ($114) {
  21130. return Compose($112($113($114)));
  21131. };
  21132. }());
  21133. };
  21134. };
  21135. var altCompose = function altCompose(dictAlt) {
  21136. return function (dictFunctor) {
  21137. return new Control_Alt.Alt(function () {
  21138. return functorCompose(dictAlt.Functor0())(dictFunctor);
  21139. }, function (v) {
  21140. return function (v1) {
  21141. return Compose(Control_Alt.alt(dictAlt)(v)(v1));
  21142. };
  21143. });
  21144. };
  21145. };
  21146. var plusCompose = function plusCompose(dictPlus) {
  21147. return function (dictFunctor) {
  21148. return new Control_Plus.Plus(function () {
  21149. return altCompose(dictPlus.Alt0())(dictFunctor);
  21150. }, Control_Plus.empty(dictPlus));
  21151. };
  21152. };
  21153. var alternativeCompose = function alternativeCompose(dictAlternative) {
  21154. return function (dictApplicative) {
  21155. return new Control_Alternative.Alternative(function () {
  21156. return applicativeCompose(dictAlternative.Applicative0())(dictApplicative);
  21157. }, function () {
  21158. return plusCompose(dictAlternative.Plus1())(dictApplicative.Apply0().Functor0());
  21159. });
  21160. };
  21161. };
  21162. module.exports = {
  21163. Compose: Compose,
  21164. bihoistCompose: bihoistCompose,
  21165. newtypeCompose: newtypeCompose,
  21166. eqCompose: eqCompose,
  21167. eq1Compose: eq1Compose,
  21168. ordCompose: ordCompose,
  21169. ord1Compose: ord1Compose,
  21170. showCompose: showCompose,
  21171. functorCompose: functorCompose,
  21172. functorWithIndexCompose: functorWithIndexCompose,
  21173. applyCompose: applyCompose,
  21174. applicativeCompose: applicativeCompose,
  21175. foldableCompose: foldableCompose,
  21176. foldableWithIndexCompose: foldableWithIndexCompose,
  21177. traversableCompose: traversableCompose,
  21178. traversableWithIndexCompose: traversableWithIndexCompose,
  21179. altCompose: altCompose,
  21180. plusCompose: plusCompose,
  21181. alternativeCompose: alternativeCompose
  21182. };
  21183. },{"../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.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.Function/index.js":"../output/Data.Function/index.js","../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Functor.App/index.js":"../output/Data.Functor.App/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.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"}],"../output/Control.Parallel.Class/index.js":[function(require,module,exports) {
  21184. // Generated by purs version 0.13.6
  21185. "use strict";
  21186. var Control_Alt = require("../Control.Alt/index.js");
  21187. var Control_Alternative = require("../Control.Alternative/index.js");
  21188. var Control_Applicative = require("../Control.Applicative/index.js");
  21189. var Control_Apply = require("../Control.Apply/index.js");
  21190. var Control_Bind = require("../Control.Bind/index.js");
  21191. var Control_Monad_Cont_Trans = require("../Control.Monad.Cont.Trans/index.js");
  21192. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  21193. var Control_Monad_Maybe_Trans = require("../Control.Monad.Maybe.Trans/index.js");
  21194. var Control_Monad_Reader_Trans = require("../Control.Monad.Reader.Trans/index.js");
  21195. var Control_Monad_Writer_Trans = require("../Control.Monad.Writer.Trans/index.js");
  21196. var Control_Plus = require("../Control.Plus/index.js");
  21197. var Data_Either = require("../Data.Either/index.js");
  21198. var Data_Functor = require("../Data.Functor/index.js");
  21199. var Data_Functor_Compose = require("../Data.Functor.Compose/index.js");
  21200. var Data_Maybe = require("../Data.Maybe/index.js");
  21201. var Data_Newtype = require("../Data.Newtype/index.js");
  21202. var Data_Unit = require("../Data.Unit/index.js");
  21203. var Effect_Class = require("../Effect.Class/index.js");
  21204. var Effect_Ref = require("../Effect.Ref/index.js");
  21205. var ParCont = function ParCont(x) {
  21206. return x;
  21207. };
  21208. var Parallel = function Parallel(Applicative1, Monad0, parallel, sequential) {
  21209. this.Applicative1 = Applicative1;
  21210. this.Monad0 = Monad0;
  21211. this.parallel = parallel;
  21212. this.sequential = sequential;
  21213. };
  21214. var sequential = function sequential(dict) {
  21215. return dict.sequential;
  21216. };
  21217. var parallel = function parallel(dict) {
  21218. return dict.parallel;
  21219. };
  21220. var newtypeParCont = new Data_Newtype.Newtype(function (n) {
  21221. return n;
  21222. }, ParCont);
  21223. var monadParWriterT = function monadParWriterT(dictMonoid) {
  21224. return function (dictParallel) {
  21225. return new Parallel(function () {
  21226. return Control_Monad_Writer_Trans.applicativeWriterT(dictMonoid)(dictParallel.Applicative1());
  21227. }, function () {
  21228. return Control_Monad_Writer_Trans.monadWriterT(dictMonoid)(dictParallel.Monad0());
  21229. }, Control_Monad_Writer_Trans.mapWriterT(parallel(dictParallel)), Control_Monad_Writer_Trans.mapWriterT(sequential(dictParallel)));
  21230. };
  21231. };
  21232. var monadParReaderT = function monadParReaderT(dictParallel) {
  21233. return new Parallel(function () {
  21234. return Control_Monad_Reader_Trans.applicativeReaderT(dictParallel.Applicative1());
  21235. }, function () {
  21236. return Control_Monad_Reader_Trans.monadReaderT(dictParallel.Monad0());
  21237. }, Control_Monad_Reader_Trans.mapReaderT(parallel(dictParallel)), Control_Monad_Reader_Trans.mapReaderT(sequential(dictParallel)));
  21238. };
  21239. var monadParMaybeT = function monadParMaybeT(dictParallel) {
  21240. return new Parallel(function () {
  21241. return Data_Functor_Compose.applicativeCompose(dictParallel.Applicative1())(Data_Maybe.applicativeMaybe);
  21242. }, function () {
  21243. return Control_Monad_Maybe_Trans.monadMaybeT(dictParallel.Monad0());
  21244. }, function (v) {
  21245. return parallel(dictParallel)(v);
  21246. }, function (v) {
  21247. return sequential(dictParallel)(v);
  21248. });
  21249. };
  21250. var monadParExceptT = function monadParExceptT(dictParallel) {
  21251. return new Parallel(function () {
  21252. return Data_Functor_Compose.applicativeCompose(dictParallel.Applicative1())(Data_Either.applicativeEither);
  21253. }, function () {
  21254. return Control_Monad_Except_Trans.monadExceptT(dictParallel.Monad0());
  21255. }, function (v) {
  21256. return parallel(dictParallel)(v);
  21257. }, function (v) {
  21258. return sequential(dictParallel)(v);
  21259. });
  21260. };
  21261. var monadParParCont = function monadParParCont(dictMonadEffect) {
  21262. return new Parallel(function () {
  21263. return applicativeParCont(dictMonadEffect);
  21264. }, function () {
  21265. return Control_Monad_Cont_Trans.monadContT(dictMonadEffect.Monad0());
  21266. }, ParCont, function (v) {
  21267. return v;
  21268. });
  21269. };
  21270. var functorParCont = function functorParCont(dictMonadEffect) {
  21271. return new Data_Functor.Functor(function (f) {
  21272. var $40 = parallel(monadParParCont(dictMonadEffect));
  21273. var $41 = Data_Functor.map(Control_Monad_Cont_Trans.functorContT(dictMonadEffect.Monad0().Bind1().Apply0().Functor0()))(f);
  21274. var $42 = sequential(monadParParCont(dictMonadEffect));
  21275. return function ($43) {
  21276. return $40($41($42($43)));
  21277. };
  21278. });
  21279. };
  21280. var applyParCont = function applyParCont(dictMonadEffect) {
  21281. return new Control_Apply.Apply(function () {
  21282. return functorParCont(dictMonadEffect);
  21283. }, function (v) {
  21284. return function (v1) {
  21285. return ParCont(function (k) {
  21286. return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref["new"](Data_Maybe.Nothing.value)))(function (ra) {
  21287. return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref["new"](Data_Maybe.Nothing.value)))(function (rb) {
  21288. return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Control_Monad_Cont_Trans.runContT(v)(function (a) {
  21289. return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(rb)))(function (mb) {
  21290. if (mb instanceof Data_Maybe.Nothing) {
  21291. return Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.write(new Data_Maybe.Just(a))(ra));
  21292. }
  21293. ;
  21294. if (mb instanceof Data_Maybe.Just) {
  21295. return k(a(mb.value0));
  21296. }
  21297. ;
  21298. throw new Error("Failed pattern match at Control.Parallel.Class (line 71, column 7 - line 73, column 26): " + [mb.constructor.name]);
  21299. });
  21300. }))(function () {
  21301. return Control_Monad_Cont_Trans.runContT(v1)(function (b) {
  21302. return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(ra)))(function (ma) {
  21303. if (ma instanceof Data_Maybe.Nothing) {
  21304. return Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.write(new Data_Maybe.Just(b))(rb));
  21305. }
  21306. ;
  21307. if (ma instanceof Data_Maybe.Just) {
  21308. return k(ma.value0(b));
  21309. }
  21310. ;
  21311. throw new Error("Failed pattern match at Control.Parallel.Class (line 77, column 7 - line 79, column 26): " + [ma.constructor.name]);
  21312. });
  21313. });
  21314. });
  21315. });
  21316. });
  21317. });
  21318. };
  21319. });
  21320. };
  21321. var applicativeParCont = function applicativeParCont(dictMonadEffect) {
  21322. return new Control_Applicative.Applicative(function () {
  21323. return applyParCont(dictMonadEffect);
  21324. }, function () {
  21325. var $44 = parallel(monadParParCont(dictMonadEffect));
  21326. var $45 = Control_Applicative.pure(Control_Monad_Cont_Trans.applicativeContT(dictMonadEffect.Monad0().Applicative0()));
  21327. return function ($46) {
  21328. return $44($45($46));
  21329. };
  21330. }());
  21331. };
  21332. var altParCont = function altParCont(dictMonadEffect) {
  21333. return new Control_Alt.Alt(function () {
  21334. return functorParCont(dictMonadEffect);
  21335. }, function (v) {
  21336. return function (v1) {
  21337. return ParCont(function (k) {
  21338. return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref["new"](false)))(function (done) {
  21339. return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Control_Monad_Cont_Trans.runContT(v)(function (a) {
  21340. return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(done)))(function (b) {
  21341. if (b) {
  21342. return Control_Applicative.pure(dictMonadEffect.Monad0().Applicative0())(Data_Unit.unit);
  21343. }
  21344. ;
  21345. return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.write(true)(done)))(function () {
  21346. return k(a);
  21347. });
  21348. });
  21349. }))(function () {
  21350. return Control_Monad_Cont_Trans.runContT(v1)(function (a) {
  21351. return Control_Bind.bind(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.read(done)))(function (b) {
  21352. if (b) {
  21353. return Control_Applicative.pure(dictMonadEffect.Monad0().Applicative0())(Data_Unit.unit);
  21354. }
  21355. ;
  21356. return Control_Bind.discard(Control_Bind.discardUnit)(dictMonadEffect.Monad0().Bind1())(Effect_Class.liftEffect(dictMonadEffect)(Effect_Ref.write(true)(done)))(function () {
  21357. return k(a);
  21358. });
  21359. });
  21360. });
  21361. });
  21362. });
  21363. });
  21364. };
  21365. });
  21366. };
  21367. var plusParCont = function plusParCont(dictMonadEffect) {
  21368. return new Control_Plus.Plus(function () {
  21369. return altParCont(dictMonadEffect);
  21370. }, ParCont(function (v) {
  21371. return Control_Applicative.pure(dictMonadEffect.Monad0().Applicative0())(Data_Unit.unit);
  21372. }));
  21373. };
  21374. var alternativeParCont = function alternativeParCont(dictMonadEffect) {
  21375. return new Control_Alternative.Alternative(function () {
  21376. return applicativeParCont(dictMonadEffect);
  21377. }, function () {
  21378. return plusParCont(dictMonadEffect);
  21379. });
  21380. };
  21381. module.exports = {
  21382. parallel: parallel,
  21383. sequential: sequential,
  21384. Parallel: Parallel,
  21385. ParCont: ParCont,
  21386. monadParExceptT: monadParExceptT,
  21387. monadParReaderT: monadParReaderT,
  21388. monadParWriterT: monadParWriterT,
  21389. monadParMaybeT: monadParMaybeT,
  21390. newtypeParCont: newtypeParCont,
  21391. functorParCont: functorParCont,
  21392. applyParCont: applyParCont,
  21393. applicativeParCont: applicativeParCont,
  21394. altParCont: altParCont,
  21395. plusParCont: plusParCont,
  21396. alternativeParCont: alternativeParCont,
  21397. monadParParCont: monadParParCont
  21398. };
  21399. },{"../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.Monad.Cont.Trans/index.js":"../output/Control.Monad.Cont.Trans/index.js","../Control.Monad.Except.Trans/index.js":"../output/Control.Monad.Except.Trans/index.js","../Control.Monad.Maybe.Trans/index.js":"../output/Control.Monad.Maybe.Trans/index.js","../Control.Monad.Reader.Trans/index.js":"../output/Control.Monad.Reader.Trans/index.js","../Control.Monad.Writer.Trans/index.js":"../output/Control.Monad.Writer.Trans/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.Functor.Compose/index.js":"../output/Data.Functor.Compose/index.js","../Data.Maybe/index.js":"../output/Data.Maybe/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js","../Data.Unit/index.js":"../output/Data.Unit/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js","../Effect.Ref/index.js":"../output/Effect.Ref/index.js"}],"../output/Control.Parallel/index.js":[function(require,module,exports) {
  21400. // Generated by purs version 0.13.6
  21401. "use strict";
  21402. var Control_Apply = require("../Control.Apply/index.js");
  21403. var Control_Category = require("../Control.Category/index.js");
  21404. var Control_Parallel_Class = require("../Control.Parallel.Class/index.js");
  21405. var Data_Foldable = require("../Data.Foldable/index.js");
  21406. var Data_Traversable = require("../Data.Traversable/index.js");
  21407. var parTraverse_ = function parTraverse_(dictParallel) {
  21408. return function (dictFoldable) {
  21409. return function (f) {
  21410. var $17 = Control_Parallel_Class.sequential(dictParallel);
  21411. var $18 = Data_Foldable.traverse_(dictParallel.Applicative1())(dictFoldable)(function () {
  21412. var $20 = Control_Parallel_Class.parallel(dictParallel);
  21413. return function ($21) {
  21414. return $20(f($21));
  21415. };
  21416. }());
  21417. return function ($19) {
  21418. return $17($18($19));
  21419. };
  21420. };
  21421. };
  21422. };
  21423. var parTraverse = function parTraverse(dictParallel) {
  21424. return function (dictTraversable) {
  21425. return function (f) {
  21426. var $22 = Control_Parallel_Class.sequential(dictParallel);
  21427. var $23 = Data_Traversable.traverse(dictTraversable)(dictParallel.Applicative1())(function () {
  21428. var $25 = Control_Parallel_Class.parallel(dictParallel);
  21429. return function ($26) {
  21430. return $25(f($26));
  21431. };
  21432. }());
  21433. return function ($24) {
  21434. return $22($23($24));
  21435. };
  21436. };
  21437. };
  21438. };
  21439. var parSequence_ = function parSequence_(dictParallel) {
  21440. return function (dictFoldable) {
  21441. return parTraverse_(dictParallel)(dictFoldable)(Control_Category.identity(Control_Category.categoryFn));
  21442. };
  21443. };
  21444. var parSequence = function parSequence(dictParallel) {
  21445. return function (dictTraversable) {
  21446. return parTraverse(dictParallel)(dictTraversable)(Control_Category.identity(Control_Category.categoryFn));
  21447. };
  21448. };
  21449. var parOneOfMap = function parOneOfMap(dictParallel) {
  21450. return function (dictAlternative) {
  21451. return function (dictFoldable) {
  21452. return function (dictFunctor) {
  21453. return function (f) {
  21454. var $27 = Control_Parallel_Class.sequential(dictParallel);
  21455. var $28 = Data_Foldable.oneOfMap(dictFoldable)(dictAlternative.Plus1())(function () {
  21456. var $30 = Control_Parallel_Class.parallel(dictParallel);
  21457. return function ($31) {
  21458. return $30(f($31));
  21459. };
  21460. }());
  21461. return function ($29) {
  21462. return $27($28($29));
  21463. };
  21464. };
  21465. };
  21466. };
  21467. };
  21468. };
  21469. var parOneOf = function parOneOf(dictParallel) {
  21470. return function (dictAlternative) {
  21471. return function (dictFoldable) {
  21472. return function (dictFunctor) {
  21473. var $32 = Control_Parallel_Class.sequential(dictParallel);
  21474. var $33 = Data_Foldable.oneOfMap(dictFoldable)(dictAlternative.Plus1())(Control_Parallel_Class.parallel(dictParallel));
  21475. return function ($34) {
  21476. return $32($33($34));
  21477. };
  21478. };
  21479. };
  21480. };
  21481. };
  21482. var parApply = function parApply(dictParallel) {
  21483. return function (mf) {
  21484. return function (ma) {
  21485. return Control_Parallel_Class.sequential(dictParallel)(Control_Apply.apply(dictParallel.Applicative1().Apply0())(Control_Parallel_Class.parallel(dictParallel)(mf))(Control_Parallel_Class.parallel(dictParallel)(ma)));
  21486. };
  21487. };
  21488. };
  21489. module.exports = {
  21490. parApply: parApply,
  21491. parTraverse: parTraverse,
  21492. parTraverse_: parTraverse_,
  21493. parSequence: parSequence,
  21494. parSequence_: parSequence_,
  21495. parOneOf: parOneOf,
  21496. parOneOfMap: parOneOfMap
  21497. };
  21498. },{"../Control.Apply/index.js":"../output/Control.Apply/index.js","../Control.Category/index.js":"../output/Control.Category/index.js","../Control.Parallel.Class/index.js":"../output/Control.Parallel.Class/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/index.js","../Data.Traversable/index.js":"../output/Data.Traversable/index.js"}],"../output/Effect.Aff/index.js":[function(require,module,exports) {
  21499. // Generated by purs version 0.13.6
  21500. "use strict";
  21501. var $foreign = require("./foreign.js");
  21502. var Control_Alt = require("../Control.Alt/index.js");
  21503. var Control_Alternative = require("../Control.Alternative/index.js");
  21504. var Control_Applicative = require("../Control.Applicative/index.js");
  21505. var Control_Apply = require("../Control.Apply/index.js");
  21506. var Control_Bind = require("../Control.Bind/index.js");
  21507. var Control_Lazy = require("../Control.Lazy/index.js");
  21508. var Control_Monad = require("../Control.Monad/index.js");
  21509. var Control_Monad_Error_Class = require("../Control.Monad.Error.Class/index.js");
  21510. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  21511. var Control_Parallel = require("../Control.Parallel/index.js");
  21512. var Control_Parallel_Class = require("../Control.Parallel.Class/index.js");
  21513. var Control_Plus = require("../Control.Plus/index.js");
  21514. var Data_Either = require("../Data.Either/index.js");
  21515. var Data_Foldable = require("../Data.Foldable/index.js");
  21516. var Data_Function = require("../Data.Function/index.js");
  21517. var Data_Functor = require("../Data.Functor/index.js");
  21518. var Data_Monoid = require("../Data.Monoid/index.js");
  21519. var Data_Newtype = require("../Data.Newtype/index.js");
  21520. var Data_Semigroup = require("../Data.Semigroup/index.js");
  21521. var Data_Unit = require("../Data.Unit/index.js");
  21522. var Effect = require("../Effect/index.js");
  21523. var Effect_Class = require("../Effect.Class/index.js");
  21524. var Effect_Exception = require("../Effect.Exception/index.js");
  21525. var Effect_Unsafe = require("../Effect.Unsafe/index.js");
  21526. var Partial_Unsafe = require("../Partial.Unsafe/index.js");
  21527. var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
  21528. var Fiber = function Fiber(x) {
  21529. return x;
  21530. };
  21531. var FFIUtil = function FFIUtil(x) {
  21532. return x;
  21533. };
  21534. var Canceler = function Canceler(x) {
  21535. return x;
  21536. };
  21537. var suspendAff = $foreign["_fork"](false);
  21538. var newtypeCanceler = new Data_Newtype.Newtype(function (n) {
  21539. return n;
  21540. }, Canceler);
  21541. var functorParAff = new Data_Functor.Functor($foreign["_parAffMap"]);
  21542. var functorAff = new Data_Functor.Functor($foreign["_map"]);
  21543. var forkAff = $foreign["_fork"](true);
  21544. var ffiUtil = function () {
  21545. var unsafeFromRight = function unsafeFromRight(v) {
  21546. if (v instanceof Data_Either.Right) {
  21547. return v.value0;
  21548. }
  21549. ;
  21550. if (v instanceof Data_Either.Left) {
  21551. return Partial_Unsafe.unsafeCrashWith("unsafeFromRight: Left");
  21552. }
  21553. ;
  21554. throw new Error("Failed pattern match at Effect.Aff (line 400, column 21 - line 402, column 54): " + [v.constructor.name]);
  21555. };
  21556. var unsafeFromLeft = function unsafeFromLeft(v) {
  21557. if (v instanceof Data_Either.Left) {
  21558. return v.value0;
  21559. }
  21560. ;
  21561. if (v instanceof Data_Either.Right) {
  21562. return Partial_Unsafe.unsafeCrashWith("unsafeFromLeft: Right");
  21563. }
  21564. ;
  21565. throw new Error("Failed pattern match at Effect.Aff (line 395, column 20 - line 397, column 54): " + [v.constructor.name]);
  21566. };
  21567. var isLeft = function isLeft(v) {
  21568. if (v instanceof Data_Either.Left) {
  21569. return true;
  21570. }
  21571. ;
  21572. if (v instanceof Data_Either.Right) {
  21573. return false;
  21574. }
  21575. ;
  21576. throw new Error("Failed pattern match at Effect.Aff (line 390, column 12 - line 392, column 20): " + [v.constructor.name]);
  21577. };
  21578. return {
  21579. isLeft: isLeft,
  21580. fromLeft: unsafeFromLeft,
  21581. fromRight: unsafeFromRight,
  21582. left: Data_Either.Left.create,
  21583. right: Data_Either.Right.create
  21584. };
  21585. }();
  21586. var makeFiber = function makeFiber(aff) {
  21587. return $foreign["_makeFiber"](ffiUtil, aff);
  21588. };
  21589. var launchAff = function launchAff(aff) {
  21590. return function __do() {
  21591. var fiber = makeFiber(aff)();
  21592. fiber.run();
  21593. return fiber;
  21594. };
  21595. };
  21596. var launchAff_ = function () {
  21597. var $43 = Data_Functor["void"](Effect.functorEffect);
  21598. return function ($44) {
  21599. return $43(launchAff($44));
  21600. };
  21601. }();
  21602. var launchSuspendedAff = makeFiber;
  21603. var delay = function delay(v) {
  21604. return $foreign["_delay"](Data_Either.Right.create, v);
  21605. };
  21606. var bracket = function bracket(acquire) {
  21607. return function (completed) {
  21608. return $foreign.generalBracket(acquire)({
  21609. killed: Data_Function["const"](completed),
  21610. failed: Data_Function["const"](completed),
  21611. completed: Data_Function["const"](completed)
  21612. });
  21613. };
  21614. };
  21615. var applyParAff = new Control_Apply.Apply(function () {
  21616. return functorParAff;
  21617. }, $foreign["_parAffApply"]);
  21618. var semigroupParAff = function semigroupParAff(dictSemigroup) {
  21619. return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyParAff)(Data_Semigroup.append(dictSemigroup)));
  21620. };
  21621. var monadAff = new Control_Monad.Monad(function () {
  21622. return applicativeAff;
  21623. }, function () {
  21624. return bindAff;
  21625. });
  21626. var bindAff = new Control_Bind.Bind(function () {
  21627. return applyAff;
  21628. }, $foreign["_bind"]);
  21629. var applyAff = new Control_Apply.Apply(function () {
  21630. return functorAff;
  21631. }, Control_Monad.ap(monadAff));
  21632. var applicativeAff = new Control_Applicative.Applicative(function () {
  21633. return applyAff;
  21634. }, $foreign["_pure"]);
  21635. var cancelWith = function cancelWith(aff) {
  21636. return function (v) {
  21637. return $foreign.generalBracket(Control_Applicative.pure(applicativeAff)(Data_Unit.unit))({
  21638. killed: function killed(e) {
  21639. return function (v1) {
  21640. return v(e);
  21641. };
  21642. },
  21643. failed: Data_Function["const"](Control_Applicative.pure(applicativeAff)),
  21644. completed: Data_Function["const"](Control_Applicative.pure(applicativeAff))
  21645. })(Data_Function["const"](aff));
  21646. };
  21647. };
  21648. var $$finally = function $$finally(fin) {
  21649. return function (a) {
  21650. return bracket(Control_Applicative.pure(applicativeAff)(Data_Unit.unit))(Data_Function["const"](fin))(Data_Function["const"](a));
  21651. };
  21652. };
  21653. var invincible = function invincible(a) {
  21654. return bracket(a)(Data_Function["const"](Control_Applicative.pure(applicativeAff)(Data_Unit.unit)))(Control_Applicative.pure(applicativeAff));
  21655. };
  21656. var lazyAff = new Control_Lazy.Lazy(function (f) {
  21657. return Control_Bind.bind(bindAff)(Control_Applicative.pure(applicativeAff)(Data_Unit.unit))(f);
  21658. });
  21659. var semigroupAff = function semigroupAff(dictSemigroup) {
  21660. return new Data_Semigroup.Semigroup(Control_Apply.lift2(applyAff)(Data_Semigroup.append(dictSemigroup)));
  21661. };
  21662. var monadEffectAff = new Effect_Class.MonadEffect(function () {
  21663. return monadAff;
  21664. }, $foreign["_liftEffect"]);
  21665. var effectCanceler = function () {
  21666. var $45 = Effect_Class.liftEffect(monadEffectAff);
  21667. return function ($46) {
  21668. return Canceler(Data_Function["const"]($45($46)));
  21669. };
  21670. }();
  21671. var joinFiber = function joinFiber(v) {
  21672. return $foreign.makeAff(function (k) {
  21673. return Data_Functor.map(Effect.functorEffect)(effectCanceler)(v.join(k));
  21674. });
  21675. };
  21676. var functorFiber = new Data_Functor.Functor(function (f) {
  21677. return function (t) {
  21678. return Effect_Unsafe.unsafePerformEffect(makeFiber(Data_Functor.map(functorAff)(f)(joinFiber(t))));
  21679. };
  21680. });
  21681. var applyFiber = new Control_Apply.Apply(function () {
  21682. return functorFiber;
  21683. }, function (t1) {
  21684. return function (t2) {
  21685. return Effect_Unsafe.unsafePerformEffect(makeFiber(Control_Apply.apply(applyAff)(joinFiber(t1))(joinFiber(t2))));
  21686. };
  21687. });
  21688. var applicativeFiber = new Control_Applicative.Applicative(function () {
  21689. return applyFiber;
  21690. }, function (a) {
  21691. return Effect_Unsafe.unsafePerformEffect(makeFiber(Control_Applicative.pure(applicativeAff)(a)));
  21692. });
  21693. var killFiber = function killFiber(e) {
  21694. return function (v) {
  21695. return Control_Bind.bind(bindAff)(Effect_Class.liftEffect(monadEffectAff)(v.isSuspended))(function (v1) {
  21696. if (v1) {
  21697. return Effect_Class.liftEffect(monadEffectAff)(Data_Functor["void"](Effect.functorEffect)(v.kill(e, Data_Function["const"](Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit)))));
  21698. }
  21699. ;
  21700. return $foreign.makeAff(function (k) {
  21701. return Data_Functor.map(Effect.functorEffect)(effectCanceler)(v.kill(e, k));
  21702. });
  21703. });
  21704. };
  21705. };
  21706. var fiberCanceler = function () {
  21707. var $47 = Data_Function.flip(killFiber);
  21708. return function ($48) {
  21709. return Canceler($47($48));
  21710. };
  21711. }();
  21712. var monadThrowAff = new Control_Monad_Error_Class.MonadThrow(function () {
  21713. return monadAff;
  21714. }, $foreign["_throwError"]);
  21715. var monadErrorAff = new Control_Monad_Error_Class.MonadError(function () {
  21716. return monadThrowAff;
  21717. }, $foreign["_catchError"]);
  21718. var attempt = Control_Monad_Error_Class["try"](monadErrorAff);
  21719. var runAff = function runAff(k) {
  21720. return function (aff) {
  21721. return launchAff(Control_Bind.bindFlipped(bindAff)(function () {
  21722. var $49 = Effect_Class.liftEffect(monadEffectAff);
  21723. return function ($50) {
  21724. return $49(k($50));
  21725. };
  21726. }())(Control_Monad_Error_Class["try"](monadErrorAff)(aff)));
  21727. };
  21728. };
  21729. var runAff_ = function runAff_(k) {
  21730. return function (aff) {
  21731. return Data_Functor["void"](Effect.functorEffect)(runAff(k)(aff));
  21732. };
  21733. };
  21734. var runSuspendedAff = function runSuspendedAff(k) {
  21735. return function (aff) {
  21736. return launchSuspendedAff(Control_Bind.bindFlipped(bindAff)(function () {
  21737. var $51 = Effect_Class.liftEffect(monadEffectAff);
  21738. return function ($52) {
  21739. return $51(k($52));
  21740. };
  21741. }())(Control_Monad_Error_Class["try"](monadErrorAff)(aff)));
  21742. };
  21743. };
  21744. var parallelAff = new Control_Parallel_Class.Parallel(function () {
  21745. return applicativeParAff;
  21746. }, function () {
  21747. return monadAff;
  21748. }, Unsafe_Coerce.unsafeCoerce, $foreign["_sequential"]);
  21749. var applicativeParAff = new Control_Applicative.Applicative(function () {
  21750. return applyParAff;
  21751. }, function () {
  21752. var $53 = Control_Parallel_Class.parallel(parallelAff);
  21753. var $54 = Control_Applicative.pure(applicativeAff);
  21754. return function ($55) {
  21755. return $53($54($55));
  21756. };
  21757. }());
  21758. var monoidParAff = function monoidParAff(dictMonoid) {
  21759. return new Data_Monoid.Monoid(function () {
  21760. return semigroupParAff(dictMonoid.Semigroup0());
  21761. }, Control_Applicative.pure(applicativeParAff)(Data_Monoid.mempty(dictMonoid)));
  21762. };
  21763. var semigroupCanceler = new Data_Semigroup.Semigroup(function (v) {
  21764. return function (v1) {
  21765. return function (err) {
  21766. return Control_Parallel.parSequence_(parallelAff)(Data_Foldable.foldableArray)([v(err), v1(err)]);
  21767. };
  21768. };
  21769. });
  21770. var supervise = function supervise(aff) {
  21771. var killError = Effect_Exception.error("[Aff] Child fiber outlived parent");
  21772. var killAll = function killAll(err) {
  21773. return function (sup) {
  21774. return $foreign.makeAff(function (k) {
  21775. return $foreign["_killAll"](err, sup.supervisor, k(Control_Applicative.pure(Data_Either.applicativeEither)(Data_Unit.unit)));
  21776. });
  21777. };
  21778. };
  21779. var acquire = function __do() {
  21780. var sup = $foreign["_makeSupervisedFiber"](ffiUtil, aff)();
  21781. sup.fiber.run();
  21782. return sup;
  21783. };
  21784. return $foreign.generalBracket(Effect_Class.liftEffect(monadEffectAff)(acquire))({
  21785. killed: function killed(err) {
  21786. return function (sup) {
  21787. return Control_Parallel.parSequence_(parallelAff)(Data_Foldable.foldableArray)([killFiber(err)(sup.fiber), killAll(err)(sup)]);
  21788. };
  21789. },
  21790. failed: Data_Function["const"](killAll(killError)),
  21791. completed: Data_Function["const"](killAll(killError))
  21792. })(function ($56) {
  21793. return joinFiber(function (v) {
  21794. return v.fiber;
  21795. }($56));
  21796. });
  21797. };
  21798. var monadRecAff = new Control_Monad_Rec_Class.MonadRec(function () {
  21799. return monadAff;
  21800. }, function (k) {
  21801. var go = function go(a) {
  21802. return Control_Bind.bind(bindAff)(k(a))(function (res) {
  21803. if (res instanceof Control_Monad_Rec_Class.Done) {
  21804. return Control_Applicative.pure(applicativeAff)(res.value0);
  21805. }
  21806. ;
  21807. if (res instanceof Control_Monad_Rec_Class.Loop) {
  21808. return go(res.value0);
  21809. }
  21810. ;
  21811. throw new Error("Failed pattern match at Effect.Aff (line 100, column 7 - line 102, column 22): " + [res.constructor.name]);
  21812. });
  21813. };
  21814. return go;
  21815. });
  21816. var monoidAff = function monoidAff(dictMonoid) {
  21817. return new Data_Monoid.Monoid(function () {
  21818. return semigroupAff(dictMonoid.Semigroup0());
  21819. }, Control_Applicative.pure(applicativeAff)(Data_Monoid.mempty(dictMonoid)));
  21820. };
  21821. var nonCanceler = Data_Function["const"](Control_Applicative.pure(applicativeAff)(Data_Unit.unit));
  21822. var monoidCanceler = new Data_Monoid.Monoid(function () {
  21823. return semigroupCanceler;
  21824. }, nonCanceler);
  21825. var never = $foreign.makeAff(function (v) {
  21826. return Control_Applicative.pure(Effect.applicativeEffect)(Data_Monoid.mempty(monoidCanceler));
  21827. });
  21828. var apathize = function () {
  21829. var $57 = Data_Functor.map(functorAff)(Data_Function["const"](Data_Unit.unit));
  21830. return function ($58) {
  21831. return $57(attempt($58));
  21832. };
  21833. }();
  21834. var altParAff = new Control_Alt.Alt(function () {
  21835. return functorParAff;
  21836. }, $foreign["_parAffAlt"]);
  21837. var altAff = new Control_Alt.Alt(function () {
  21838. return functorAff;
  21839. }, function (a1) {
  21840. return function (a2) {
  21841. return Control_Monad_Error_Class.catchError(monadErrorAff)(a1)(Data_Function["const"](a2));
  21842. };
  21843. });
  21844. var plusAff = new Control_Plus.Plus(function () {
  21845. return altAff;
  21846. }, Control_Monad_Error_Class.throwError(monadThrowAff)(Effect_Exception.error("Always fails")));
  21847. var plusParAff = new Control_Plus.Plus(function () {
  21848. return altParAff;
  21849. }, Control_Parallel_Class.parallel(parallelAff)(Control_Plus.empty(plusAff)));
  21850. var alternativeParAff = new Control_Alternative.Alternative(function () {
  21851. return applicativeParAff;
  21852. }, function () {
  21853. return plusParAff;
  21854. });
  21855. module.exports = {
  21856. Canceler: Canceler,
  21857. launchAff: launchAff,
  21858. launchAff_: launchAff_,
  21859. launchSuspendedAff: launchSuspendedAff,
  21860. runAff: runAff,
  21861. runAff_: runAff_,
  21862. runSuspendedAff: runSuspendedAff,
  21863. forkAff: forkAff,
  21864. suspendAff: suspendAff,
  21865. supervise: supervise,
  21866. attempt: attempt,
  21867. apathize: apathize,
  21868. delay: delay,
  21869. never: never,
  21870. "finally": $$finally,
  21871. invincible: invincible,
  21872. killFiber: killFiber,
  21873. joinFiber: joinFiber,
  21874. cancelWith: cancelWith,
  21875. bracket: bracket,
  21876. nonCanceler: nonCanceler,
  21877. effectCanceler: effectCanceler,
  21878. fiberCanceler: fiberCanceler,
  21879. functorAff: functorAff,
  21880. applyAff: applyAff,
  21881. applicativeAff: applicativeAff,
  21882. bindAff: bindAff,
  21883. monadAff: monadAff,
  21884. semigroupAff: semigroupAff,
  21885. monoidAff: monoidAff,
  21886. altAff: altAff,
  21887. plusAff: plusAff,
  21888. monadRecAff: monadRecAff,
  21889. monadThrowAff: monadThrowAff,
  21890. monadErrorAff: monadErrorAff,
  21891. monadEffectAff: monadEffectAff,
  21892. lazyAff: lazyAff,
  21893. functorParAff: functorParAff,
  21894. applyParAff: applyParAff,
  21895. applicativeParAff: applicativeParAff,
  21896. semigroupParAff: semigroupParAff,
  21897. monoidParAff: monoidParAff,
  21898. altParAff: altParAff,
  21899. plusParAff: plusParAff,
  21900. alternativeParAff: alternativeParAff,
  21901. parallelAff: parallelAff,
  21902. functorFiber: functorFiber,
  21903. applyFiber: applyFiber,
  21904. applicativeFiber: applicativeFiber,
  21905. newtypeCanceler: newtypeCanceler,
  21906. semigroupCanceler: semigroupCanceler,
  21907. monoidCanceler: monoidCanceler,
  21908. makeAff: $foreign.makeAff,
  21909. generalBracket: $foreign.generalBracket
  21910. };
  21911. },{"./foreign.js":"../output/Effect.Aff/foreign.js","../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.Lazy/index.js":"../output/Control.Lazy/index.js","../Control.Monad/index.js":"../output/Control.Monad/index.js","../Control.Monad.Error.Class/index.js":"../output/Control.Monad.Error.Class/index.js","../Control.Monad.Rec.Class/index.js":"../output/Control.Monad.Rec.Class/index.js","../Control.Parallel/index.js":"../output/Control.Parallel/index.js","../Control.Parallel.Class/index.js":"../output/Control.Parallel.Class/index.js","../Control.Plus/index.js":"../output/Control.Plus/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.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.Unit/index.js":"../output/Data.Unit/index.js","../Effect/index.js":"../output/Effect/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js","../Effect.Exception/index.js":"../output/Effect.Exception/index.js","../Effect.Unsafe/index.js":"../output/Effect.Unsafe/index.js","../Partial.Unsafe/index.js":"../output/Partial.Unsafe/index.js","../Unsafe.Coerce/index.js":"../output/Unsafe.Coerce/index.js"}],"../output/Control.Promise/index.js":[function(require,module,exports) {
  21912. // Generated by purs version 0.13.6
  21913. "use strict";
  21914. var $foreign = require("./foreign.js");
  21915. var Control_Alt = require("../Control.Alt/index.js");
  21916. var Control_Bind = require("../Control.Bind/index.js");
  21917. var Control_Category = require("../Control.Category/index.js");
  21918. var Control_Monad_Except = require("../Control.Monad.Except/index.js");
  21919. var Control_Monad_Except_Trans = require("../Control.Monad.Except.Trans/index.js");
  21920. var Data_Either = require("../Data.Either/index.js");
  21921. var Data_Functor = require("../Data.Functor/index.js");
  21922. var Data_Identity = require("../Data.Identity/index.js");
  21923. var Data_List_Types = require("../Data.List.Types/index.js");
  21924. var Data_Monoid = require("../Data.Monoid/index.js");
  21925. var Effect = require("../Effect/index.js");
  21926. var Effect_Aff = require("../Effect.Aff/index.js");
  21927. var Effect_Class = require("../Effect.Class/index.js");
  21928. var Effect_Exception = require("../Effect.Exception/index.js");
  21929. var Foreign = require("../Foreign/index.js");
  21930. var toAff$prime = function toAff$prime(customCoerce) {
  21931. return function (p) {
  21932. return Effect_Aff.makeAff(function (cb) {
  21933. return Data_Functor.voidRight(Effect.functorEffect)(Data_Monoid.mempty(Effect_Aff.monoidCanceler))($foreign.thenImpl(p)(function ($1) {
  21934. return cb(Data_Either.Left.create(customCoerce($1)))();
  21935. })(function ($2) {
  21936. return cb(Data_Either.Right.create($2))();
  21937. }));
  21938. });
  21939. };
  21940. };
  21941. var fromAff = function fromAff(aff) {
  21942. return $foreign.promise(function (succ) {
  21943. return function (err) {
  21944. return Effect_Aff.runAff_(Data_Either.either(err)(succ))(aff);
  21945. };
  21946. });
  21947. };
  21948. var coerce = function coerce(fn) {
  21949. return Data_Either.either(function (v) {
  21950. return Effect_Exception.error("Promise failed, couldn't extract JS Error or String");
  21951. })(Control_Category.identity(Control_Category.categoryFn))(Control_Monad_Except.runExcept(Control_Alt.alt(Control_Monad_Except_Trans.altExceptT(Data_List_Types.semigroupNonEmptyList)(Data_Identity.monadIdentity))(Foreign.unsafeReadTagged("Error")(fn))(Data_Functor.map(Control_Monad_Except_Trans.functorExceptT(Data_Identity.functorIdentity))(Effect_Exception.error)(Foreign.readString(fn)))));
  21952. };
  21953. var toAff = toAff$prime(coerce);
  21954. var toAffE = function toAffE(f) {
  21955. return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(f))(toAff);
  21956. };
  21957. module.exports = {
  21958. fromAff: fromAff,
  21959. toAff: toAff,
  21960. "toAff'": toAff$prime,
  21961. toAffE: toAffE
  21962. };
  21963. },{"./foreign.js":"../output/Control.Promise/foreign.js","../Control.Alt/index.js":"../output/Control.Alt/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","../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.List.Types/index.js":"../output/Data.List.Types/index.js","../Data.Monoid/index.js":"../output/Data.Monoid/index.js","../Effect/index.js":"../output/Effect/index.js","../Effect.Aff/index.js":"../output/Effect.Aff/index.js","../Effect.Class/index.js":"../output/Effect.Class/index.js","../Effect.Exception/index.js":"../output/Effect.Exception/index.js","../Foreign/index.js":"../output/Foreign/index.js"}],"../output/Data.Generic.Rep.Show/index.js":[function(require,module,exports) {
  21964. // Generated by purs version 0.13.6
  21965. "use strict";
  21966. var Data_Foldable = require("../Data.Foldable/index.js");
  21967. var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
  21968. var Data_Monoid = require("../Data.Monoid/index.js");
  21969. var Data_Semigroup = require("../Data.Semigroup/index.js");
  21970. var Data_Show = require("../Data.Show/index.js");
  21971. var Data_Symbol = require("../Data.Symbol/index.js");
  21972. var GenericShowArgs = function GenericShowArgs(genericShowArgs) {
  21973. this.genericShowArgs = genericShowArgs;
  21974. };
  21975. var GenericShow = function GenericShow(genericShow$prime) {
  21976. this["genericShow'"] = genericShow$prime;
  21977. };
  21978. var genericShowArgsNoArguments = new GenericShowArgs(function (v) {
  21979. return [];
  21980. });
  21981. var genericShowArgsArgument = function genericShowArgsArgument(dictShow) {
  21982. return new GenericShowArgs(function (v) {
  21983. return [Data_Show.show(dictShow)(v)];
  21984. });
  21985. };
  21986. var genericShowArgs = function genericShowArgs(dict) {
  21987. return dict.genericShowArgs;
  21988. };
  21989. var genericShowArgsProduct = function genericShowArgsProduct(dictGenericShowArgs) {
  21990. return function (dictGenericShowArgs1) {
  21991. return new GenericShowArgs(function (v) {
  21992. return Data_Semigroup.append(Data_Semigroup.semigroupArray)(genericShowArgs(dictGenericShowArgs)(v.value0))(genericShowArgs(dictGenericShowArgs1)(v.value1));
  21993. });
  21994. };
  21995. };
  21996. var genericShowConstructor = function genericShowConstructor(dictGenericShowArgs) {
  21997. return function (dictIsSymbol) {
  21998. return new GenericShow(function (v) {
  21999. var ctor = Data_Symbol.reflectSymbol(dictIsSymbol)(Data_Symbol.SProxy.value);
  22000. var v1 = genericShowArgs(dictGenericShowArgs)(v);
  22001. if (v1.length === 0) {
  22002. return ctor;
  22003. }
  22004. ;
  22005. return "(" + (Data_Foldable.intercalate(Data_Foldable.foldableArray)(Data_Monoid.monoidString)(" ")(Data_Semigroup.append(Data_Semigroup.semigroupArray)([ctor])(v1)) + ")");
  22006. });
  22007. };
  22008. };
  22009. var genericShow$prime = function genericShow$prime(dict) {
  22010. return dict["genericShow'"];
  22011. };
  22012. var genericShowNoConstructors = new GenericShow(function (a) {
  22013. return genericShow$prime(genericShowNoConstructors)(a);
  22014. });
  22015. var genericShowSum = function genericShowSum(dictGenericShow) {
  22016. return function (dictGenericShow1) {
  22017. return new GenericShow(function (v) {
  22018. if (v instanceof Data_Generic_Rep.Inl) {
  22019. return genericShow$prime(dictGenericShow)(v.value0);
  22020. }
  22021. ;
  22022. if (v instanceof Data_Generic_Rep.Inr) {
  22023. return genericShow$prime(dictGenericShow1)(v.value0);
  22024. }
  22025. ;
  22026. throw new Error("Failed pattern match at Data.Generic.Rep.Show (line 26, column 1 - line 28, column 40): " + [v.constructor.name]);
  22027. });
  22028. };
  22029. };
  22030. var genericShow = function genericShow(dictGeneric) {
  22031. return function (dictGenericShow) {
  22032. return function (x) {
  22033. return genericShow$prime(dictGenericShow)(Data_Generic_Rep.from(dictGeneric)(x));
  22034. };
  22035. };
  22036. };
  22037. module.exports = {
  22038. GenericShow: GenericShow,
  22039. "genericShow'": genericShow$prime,
  22040. genericShow: genericShow,
  22041. GenericShowArgs: GenericShowArgs,
  22042. genericShowArgs: genericShowArgs,
  22043. genericShowNoConstructors: genericShowNoConstructors,
  22044. genericShowArgsNoArguments: genericShowArgsNoArguments,
  22045. genericShowSum: genericShowSum,
  22046. genericShowArgsProduct: genericShowArgsProduct,
  22047. genericShowConstructor: genericShowConstructor,
  22048. genericShowArgsArgument: genericShowArgsArgument
  22049. };
  22050. },{"../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) {
  22051. function wrap(method) {
  22052. return function (d) {
  22053. return function (num) {
  22054. return method.apply(num, [d]);
  22055. };
  22056. };
  22057. }
  22058. exports.toPrecisionNative = wrap(Number.prototype.toPrecision);
  22059. exports.toFixedNative = wrap(Number.prototype.toFixed);
  22060. exports.toExponentialNative = wrap(Number.prototype.toExponential);
  22061. exports.toString = function (num) {
  22062. return num.toString();
  22063. };
  22064. },{}],"../output/Data.Number.Format/index.js":[function(require,module,exports) {
  22065. // Generated by purs version 0.13.6
  22066. "use strict";
  22067. var $foreign = require("./foreign.js");
  22068. var Data_Ord = require("../Data.Ord/index.js");
  22069. var Precision = function () {
  22070. function Precision(value0) {
  22071. this.value0 = value0;
  22072. }
  22073. ;
  22074. Precision.create = function (value0) {
  22075. return new Precision(value0);
  22076. };
  22077. return Precision;
  22078. }();
  22079. var Fixed = function () {
  22080. function Fixed(value0) {
  22081. this.value0 = value0;
  22082. }
  22083. ;
  22084. Fixed.create = function (value0) {
  22085. return new Fixed(value0);
  22086. };
  22087. return Fixed;
  22088. }();
  22089. var Exponential = function () {
  22090. function Exponential(value0) {
  22091. this.value0 = value0;
  22092. }
  22093. ;
  22094. Exponential.create = function (value0) {
  22095. return new Exponential(value0);
  22096. };
  22097. return Exponential;
  22098. }();
  22099. var toStringWith = function toStringWith(v) {
  22100. if (v instanceof Precision) {
  22101. return $foreign.toPrecisionNative(v.value0);
  22102. }
  22103. ;
  22104. if (v instanceof Fixed) {
  22105. return $foreign.toFixedNative(v.value0);
  22106. }
  22107. ;
  22108. if (v instanceof Exponential) {
  22109. return $foreign.toExponentialNative(v.value0);
  22110. }
  22111. ;
  22112. throw new Error("Failed pattern match at Data.Number.Format (line 59, column 1 - line 59, column 40): " + [v.constructor.name]);
  22113. };
  22114. var precision = function () {
  22115. var $5 = Data_Ord.clamp(Data_Ord.ordInt)(1)(21);
  22116. return function ($6) {
  22117. return Precision.create($5($6));
  22118. };
  22119. }();
  22120. var fixed = function () {
  22121. var $7 = Data_Ord.clamp(Data_Ord.ordInt)(0)(20);
  22122. return function ($8) {
  22123. return Fixed.create($7($8));
  22124. };
  22125. }();
  22126. var exponential = function () {
  22127. var $9 = Data_Ord.clamp(Data_Ord.ordInt)(0)(20);
  22128. return function ($10) {
  22129. return Exponential.create($9($10));
  22130. };
  22131. }();
  22132. module.exports = {
  22133. precision: precision,
  22134. fixed: fixed,
  22135. exponential: exponential,
  22136. toStringWith: toStringWith,
  22137. toString: $foreign.toString
  22138. };
  22139. },{"./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) {
  22140. // Generated by purs version 0.13.6
  22141. "use strict";
  22142. var $foreign = require("./foreign.js");
  22143. var Browser_Utils = require("../Browser.Utils/index.js");
  22144. var Control_Applicative = require("../Control.Applicative/index.js");
  22145. var Control_Bind = require("../Control.Bind/index.js");
  22146. var Control_Promise = require("../Control.Promise/index.js");
  22147. var Data_Eq = require("../Data.Eq/index.js");
  22148. var Data_Foldable = require("../Data.Foldable/index.js");
  22149. var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
  22150. var Data_Generic_Rep_Show = require("../Data.Generic.Rep.Show/index.js");
  22151. var Data_List = require("../Data.List/index.js");
  22152. var Data_List_Types = require("../Data.List.Types/index.js");
  22153. var Data_Maybe = require("../Data.Maybe/index.js");
  22154. var Data_Newtype = require("../Data.Newtype/index.js");
  22155. var Data_Number_Format = require("../Data.Number.Format/index.js");
  22156. var Data_Ord = require("../Data.Ord/index.js");
  22157. var Data_Show = require("../Data.Show/index.js");
  22158. var Data_Symbol = require("../Data.Symbol/index.js");
  22159. var Data_Traversable = require("../Data.Traversable/index.js");
  22160. var Effect = require("../Effect/index.js");
  22161. var Effect_Aff = require("../Effect.Aff/index.js");
  22162. var Effect_Class = require("../Effect.Class/index.js");
  22163. var Foreign_Generic = require("../Foreign.Generic/index.js");
  22164. var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
  22165. var WindowId = function WindowId(x) {
  22166. return x;
  22167. };
  22168. var TabId = function TabId(x) {
  22169. return x;
  22170. };
  22171. var Tab = function Tab(x) {
  22172. return x;
  22173. };
  22174. var showWindowId = new Data_Show.Show(function (v) {
  22175. return Data_Number_Format.toString(v);
  22176. });
  22177. var showTabId = new Data_Show.Show(function (v) {
  22178. return Data_Number_Format.toString(v);
  22179. });
  22180. var newtypeTab = new Data_Newtype.Newtype(function (n) {
  22181. return n;
  22182. }, Tab);
  22183. var genWindowId = new Data_Generic_Rep.Generic(function (x) {
  22184. return x;
  22185. }, function (x) {
  22186. return x;
  22187. });
  22188. var genTabId = new Data_Generic_Rep.Generic(function (x) {
  22189. return x;
  22190. }, function (x) {
  22191. return x;
  22192. });
  22193. var genTab = new Data_Generic_Rep.Generic(function (x) {
  22194. return x;
  22195. }, function (x) {
  22196. return x;
  22197. });
  22198. 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 () {
  22199. return "active";
  22200. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22201. return "attention";
  22202. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22203. return "audible";
  22204. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22205. return "autoDiscardable";
  22206. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22207. return "cookieStoreId";
  22208. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22209. return "discarded";
  22210. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22211. return "favIconUrl";
  22212. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22213. return "height";
  22214. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22215. return "hidden";
  22216. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22217. return "highlighted";
  22218. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22219. return "id";
  22220. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22221. return "incognito";
  22222. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22223. return "index";
  22224. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22225. return "isArticle";
  22226. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22227. return "isInReaderMode";
  22228. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22229. return "lastAccessed";
  22230. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22231. return "openerTabId";
  22232. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22233. return "pinned";
  22234. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22235. return "sessionId";
  22236. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22237. return "status";
  22238. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22239. return "title";
  22240. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22241. return "url";
  22242. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22243. return "width";
  22244. }))(Data_Show.showRecordFieldsCons(new Data_Symbol.IsSymbol(function () {
  22245. return "windowId";
  22246. }))(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_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 () {
  22247. return "Tab";
  22248. }))));
  22249. var eqWindowId = new Data_Eq.Eq(function (x) {
  22250. return function (y) {
  22251. return x === y;
  22252. };
  22253. });
  22254. var ordWindowId = new Data_Ord.Ord(function () {
  22255. return eqWindowId;
  22256. }, function (x) {
  22257. return function (y) {
  22258. return Data_Ord.compare(Data_Ord.ordNumber)(x)(y);
  22259. };
  22260. });
  22261. var eqTabId = new Data_Eq.Eq(function (x) {
  22262. return function (y) {
  22263. return x === y;
  22264. };
  22265. });
  22266. var ordTabId = new Data_Ord.Ord(function () {
  22267. return eqTabId;
  22268. }, function (x) {
  22269. return function (y) {
  22270. return Data_Ord.compare(Data_Ord.ordNumber)(x)(y);
  22271. };
  22272. });
  22273. var encodeWindowId = new Foreign_Generic_Class.Encode(function (x) {
  22274. return Foreign_Generic.genericEncode(genWindowId)(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  22275. return "WindowId";
  22276. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.numberEncode))))({
  22277. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  22278. unwrapSingleConstructors: true,
  22279. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  22280. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  22281. })(x);
  22282. });
  22283. var encodeTabId = new Foreign_Generic_Class.Encode(function (x) {
  22284. return Foreign_Generic.genericEncode(genTabId)(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  22285. return "TabId";
  22286. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.numberEncode))))({
  22287. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  22288. unwrapSingleConstructors: true,
  22289. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  22290. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  22291. })(x);
  22292. });
  22293. var encodeTab = new Foreign_Generic_Class.Encode(function (x) {
  22294. return Foreign_Generic.genericEncode(genTab)(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  22295. return "Tab";
  22296. }))(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.encodeRecordCons()(Foreign_Generic_Class.encodeRecordNil)(new Data_Symbol.IsSymbol(function () {
  22297. return "windowId";
  22298. }))(Foreign_Generic_Class.encodeWithOptionsOther(encodeWindowId)))(new Data_Symbol.IsSymbol(function () {
  22299. return "width";
  22300. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.numberEncode))))(new Data_Symbol.IsSymbol(function () {
  22301. return "url";
  22302. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
  22303. return "title";
  22304. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.stringEncode)))(new Data_Symbol.IsSymbol(function () {
  22305. return "status";
  22306. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
  22307. return "sessionId";
  22308. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
  22309. return "pinned";
  22310. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
  22311. return "openerTabId";
  22312. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(encodeTabId))))(new Data_Symbol.IsSymbol(function () {
  22313. return "lastAccessed";
  22314. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.numberEncode)))(new Data_Symbol.IsSymbol(function () {
  22315. return "isInReaderMode";
  22316. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
  22317. return "isArticle";
  22318. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
  22319. return "index";
  22320. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.numberEncode)))(new Data_Symbol.IsSymbol(function () {
  22321. return "incognito";
  22322. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
  22323. return "id";
  22324. }))(Foreign_Generic_Class.encodeWithOptionsOther(encodeTabId)))(new Data_Symbol.IsSymbol(function () {
  22325. return "highlighted";
  22326. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
  22327. return "hidden";
  22328. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode)))(new Data_Symbol.IsSymbol(function () {
  22329. return "height";
  22330. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.numberEncode))))(new Data_Symbol.IsSymbol(function () {
  22331. return "favIconUrl";
  22332. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
  22333. return "discarded";
  22334. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
  22335. return "cookieStoreId";
  22336. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.stringEncode))))(new Data_Symbol.IsSymbol(function () {
  22337. return "autoDiscardable";
  22338. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
  22339. return "audible";
  22340. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
  22341. return "attention";
  22342. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.maybeEncode(Foreign_Generic_Class.booleanEncode))))(new Data_Symbol.IsSymbol(function () {
  22343. return "active";
  22344. }))(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.booleanEncode))))))({
  22345. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  22346. unwrapSingleConstructors: true,
  22347. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  22348. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  22349. })(x);
  22350. });
  22351. var decodeWindowId = new Foreign_Generic_Class.Decode(function (x) {
  22352. return Foreign_Generic.genericDecode(genWindowId)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  22353. return "WindowId";
  22354. }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode)))(Foreign_Generic_Class.genericCountArgsArgument))({
  22355. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  22356. unwrapSingleConstructors: true,
  22357. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  22358. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  22359. })(x);
  22360. });
  22361. var decodeTabId = new Foreign_Generic_Class.Decode(function (x) {
  22362. return Foreign_Generic.genericDecode(genTabId)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  22363. return "TabId";
  22364. }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode)))(Foreign_Generic_Class.genericCountArgsArgument))({
  22365. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  22366. unwrapSingleConstructors: true,
  22367. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  22368. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  22369. })(x);
  22370. });
  22371. var query = Control_Bind.bind(Effect_Aff.bindAff)(Control_Promise.toAffE($foreign.queryImpl))(function (tabsArray) {
  22372. var tabsList = Data_List.fromFoldable(Data_Foldable.foldableArray)(tabsArray);
  22373. return Control_Bind.bind(Effect_Aff.bindAff)(Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(Data_Traversable.traverse(Data_List_Types.traversableList)(Effect.applicativeEffect)(Browser_Utils.unwrapForeign(genTab)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  22374. return "Tab";
  22375. }))(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.decodeRecordCons()(Foreign_Generic_Class.decodeRecordNil)(new Data_Symbol.IsSymbol(function () {
  22376. return "windowId";
  22377. }))(Foreign_Generic_Class.decodeWithOptionsOther(decodeWindowId))())(new Data_Symbol.IsSymbol(function () {
  22378. return "width";
  22379. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
  22380. return "url";
  22381. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22382. return "title";
  22383. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.stringDecode))())(new Data_Symbol.IsSymbol(function () {
  22384. return "status";
  22385. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22386. return "sessionId";
  22387. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22388. return "pinned";
  22389. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22390. return "openerTabId";
  22391. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(decodeTabId)))())(new Data_Symbol.IsSymbol(function () {
  22392. return "lastAccessed";
  22393. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
  22394. return "isInReaderMode";
  22395. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22396. return "isArticle";
  22397. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22398. return "index";
  22399. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
  22400. return "incognito";
  22401. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22402. return "id";
  22403. }))(Foreign_Generic_Class.decodeWithOptionsOther(decodeTabId))())(new Data_Symbol.IsSymbol(function () {
  22404. return "highlighted";
  22405. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22406. return "hidden";
  22407. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22408. return "height";
  22409. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
  22410. return "favIconUrl";
  22411. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22412. return "discarded";
  22413. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22414. return "cookieStoreId";
  22415. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22416. return "autoDiscardable";
  22417. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22418. return "audible";
  22419. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22420. return "attention";
  22421. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22422. return "active";
  22423. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())))(Foreign_Generic_Class.genericCountArgsArgument)))(tabsList)))(function (parsed) {
  22424. return Control_Applicative.pure(Effect_Aff.applicativeAff)(parsed);
  22425. });
  22426. });
  22427. var decodeTab = new Foreign_Generic_Class.Decode(function (x) {
  22428. return Foreign_Generic.genericDecode(genTab)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  22429. return "Tab";
  22430. }))(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.decodeRecordCons()(Foreign_Generic_Class.decodeRecordNil)(new Data_Symbol.IsSymbol(function () {
  22431. return "windowId";
  22432. }))(Foreign_Generic_Class.decodeWithOptionsOther(decodeWindowId))())(new Data_Symbol.IsSymbol(function () {
  22433. return "width";
  22434. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
  22435. return "url";
  22436. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22437. return "title";
  22438. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.stringDecode))())(new Data_Symbol.IsSymbol(function () {
  22439. return "status";
  22440. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22441. return "sessionId";
  22442. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22443. return "pinned";
  22444. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22445. return "openerTabId";
  22446. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(decodeTabId)))())(new Data_Symbol.IsSymbol(function () {
  22447. return "lastAccessed";
  22448. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
  22449. return "isInReaderMode";
  22450. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22451. return "isArticle";
  22452. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22453. return "index";
  22454. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
  22455. return "incognito";
  22456. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22457. return "id";
  22458. }))(Foreign_Generic_Class.decodeWithOptionsOther(decodeTabId))())(new Data_Symbol.IsSymbol(function () {
  22459. return "highlighted";
  22460. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22461. return "hidden";
  22462. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22463. return "height";
  22464. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
  22465. return "favIconUrl";
  22466. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22467. return "discarded";
  22468. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22469. return "cookieStoreId";
  22470. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22471. return "autoDiscardable";
  22472. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22473. return "audible";
  22474. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22475. return "attention";
  22476. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22477. return "active";
  22478. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())))(Foreign_Generic_Class.genericCountArgsArgument))({
  22479. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  22480. unwrapSingleConstructors: true,
  22481. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  22482. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  22483. })(x);
  22484. });
  22485. module.exports = {
  22486. TabId: TabId,
  22487. Tab: Tab,
  22488. query: query,
  22489. eqWindowId: eqWindowId,
  22490. ordWindowId: ordWindowId,
  22491. showWindowId: showWindowId,
  22492. genWindowId: genWindowId,
  22493. encodeWindowId: encodeWindowId,
  22494. decodeWindowId: decodeWindowId,
  22495. eqTabId: eqTabId,
  22496. ordTabId: ordTabId,
  22497. showTabId: showTabId,
  22498. genTabId: genTabId,
  22499. encodeTabId: encodeTabId,
  22500. decodeTabId: decodeTabId,
  22501. newtypeTab: newtypeTab,
  22502. genTab: genTab,
  22503. showTab: showTab,
  22504. encodeTab: encodeTab,
  22505. decodeTab: decodeTab
  22506. };
  22507. },{"./foreign.js":"../output/Browser.Tabs/foreign.js","../Browser.Utils/index.js":"../output/Browser.Utils/index.js","../Control.Applicative/index.js":"../output/Control.Applicative/index.js","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Control.Promise/index.js":"../output/Control.Promise/index.js","../Data.Eq/index.js":"../output/Data.Eq/index.js","../Data.Foldable/index.js":"../output/Data.Foldable/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.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.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","../Data.Traversable/index.js":"../output/Data.Traversable/index.js","../Effect/index.js":"../output/Effect/index.js","../Effect.Aff/index.js":"../output/Effect.Aff/index.js","../Effect.Class/index.js":"../output/Effect.Class/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) {
  22508. "use stricts";
  22509. exports.addListenerImpl = function (listener) {
  22510. return function () {
  22511. browser.tabs.onCreated.addListener(listener);
  22512. };
  22513. };
  22514. exports.removeListener = function (listener) {
  22515. return function () {
  22516. return browser.tabs.onCreated.removeListener(listener);
  22517. };
  22518. };
  22519. },{}],"../output/Browser.Tabs.OnCreated/index.js":[function(require,module,exports) {
  22520. // Generated by purs version 0.13.6
  22521. "use strict";
  22522. var $foreign = require("./foreign.js");
  22523. var Browser_Tabs = require("../Browser.Tabs/index.js");
  22524. var Browser_Utils = require("../Browser.Utils/index.js");
  22525. var Control_Monad_Except = require("../Control.Monad.Except/index.js");
  22526. var Data_Either = require("../Data.Either/index.js");
  22527. var Data_Foldable = require("../Data.Foldable/index.js");
  22528. var Data_Functor = require("../Data.Functor/index.js");
  22529. var Data_List_Types = require("../Data.List.Types/index.js");
  22530. var Data_Monoid = require("../Data.Monoid/index.js");
  22531. var Data_Symbol = require("../Data.Symbol/index.js");
  22532. var Effect_Exception = require("../Effect.Exception/index.js");
  22533. var Foreign = require("../Foreign/index.js");
  22534. var Foreign_Generic = require("../Foreign.Generic/index.js");
  22535. var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
  22536. var addListener = function addListener(listener) {
  22537. var foreignListener = function foreignListener(f) {
  22538. var v = Control_Monad_Except.runExcept(Foreign_Generic.genericDecode(Browser_Tabs.genTab)(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  22539. return "Tab";
  22540. }))(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.decodeRecordCons()(Foreign_Generic_Class.decodeRecordNil)(new Data_Symbol.IsSymbol(function () {
  22541. return "windowId";
  22542. }))(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeWindowId))())(new Data_Symbol.IsSymbol(function () {
  22543. return "width";
  22544. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
  22545. return "url";
  22546. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22547. return "title";
  22548. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.stringDecode))())(new Data_Symbol.IsSymbol(function () {
  22549. return "status";
  22550. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22551. return "sessionId";
  22552. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22553. return "pinned";
  22554. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22555. return "openerTabId";
  22556. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Browser_Tabs.decodeTabId)))())(new Data_Symbol.IsSymbol(function () {
  22557. return "lastAccessed";
  22558. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
  22559. return "isInReaderMode";
  22560. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22561. return "isArticle";
  22562. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22563. return "index";
  22564. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.numberDecode))())(new Data_Symbol.IsSymbol(function () {
  22565. return "incognito";
  22566. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22567. return "id";
  22568. }))(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeTabId))())(new Data_Symbol.IsSymbol(function () {
  22569. return "highlighted";
  22570. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22571. return "hidden";
  22572. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())(new Data_Symbol.IsSymbol(function () {
  22573. return "height";
  22574. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.numberDecode)))())(new Data_Symbol.IsSymbol(function () {
  22575. return "favIconUrl";
  22576. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22577. return "discarded";
  22578. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22579. return "cookieStoreId";
  22580. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.stringDecode)))())(new Data_Symbol.IsSymbol(function () {
  22581. return "autoDiscardable";
  22582. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22583. return "audible";
  22584. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22585. return "attention";
  22586. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.maybeDecode(Foreign_Generic_Class.booleanDecode)))())(new Data_Symbol.IsSymbol(function () {
  22587. return "active";
  22588. }))(Foreign_Generic_Class.decodeWithOptionsOther(Foreign_Generic_Class.booleanDecode))())))(Foreign_Generic_Class.genericCountArgsArgument))({
  22589. sumEncoding: Foreign_Generic_Class.defaultOptions.sumEncoding,
  22590. unwrapSingleConstructors: true,
  22591. unwrapSingleArguments: Foreign_Generic_Class.defaultOptions.unwrapSingleArguments,
  22592. fieldTransform: Foreign_Generic_Class.defaultOptions.fieldTransform
  22593. })(f));
  22594. if (v instanceof Data_Either.Left) {
  22595. 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)));
  22596. }
  22597. ;
  22598. if (v instanceof Data_Either.Right) {
  22599. return listener(v.value0);
  22600. }
  22601. ;
  22602. throw new Error("Failed pattern match at Browser.Tabs.OnCreated (line 24, column 23 - line 26, column 30): " + [v.constructor.name]);
  22603. };
  22604. return function __do() {
  22605. var lst = Browser_Utils.mkListenerOne(foreignListener)();
  22606. return $foreign.addListenerImpl(lst)();
  22607. };
  22608. };
  22609. module.exports = {
  22610. addListener: addListener,
  22611. removeListener: $foreign.removeListener
  22612. };
  22613. },{"./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) {
  22614. "use stricts";
  22615. exports.addListener = function (listener) {
  22616. return function () {
  22617. browser.tabs.onRemoved.addListener(listener);
  22618. };
  22619. };
  22620. exports.removeListener = function (listener) {
  22621. return function () {
  22622. return browser.tabs.onRemoved.removeListener(listener);
  22623. };
  22624. };
  22625. },{}],"../output/Browser.Tabs.OnRemoved/index.js":[function(require,module,exports) {
  22626. // Generated by purs version 0.13.6
  22627. "use strict";
  22628. var $foreign = require("./foreign.js");
  22629. module.exports = {
  22630. addListener: $foreign.addListener,
  22631. removeListener: $foreign.removeListener
  22632. };
  22633. },{"./foreign.js":"../output/Browser.Tabs.OnRemoved/foreign.js"}],"../output/Data.Array.NonEmpty.Internal/foreign.js":[function(require,module,exports) {
  22634. "use strict";
  22635. exports.fold1Impl = function (f) {
  22636. return function (xs) {
  22637. var acc = xs[0];
  22638. var len = xs.length;
  22639. for (var i = 1; i < len; i++) {
  22640. acc = f(acc)(xs[i]);
  22641. }
  22642. return acc;
  22643. };
  22644. };
  22645. exports.traverse1Impl = function () {
  22646. function Cont(fn) {
  22647. this.fn = fn;
  22648. }
  22649. var emptyList = {};
  22650. var ConsCell = function ConsCell(head, tail) {
  22651. this.head = head;
  22652. this.tail = tail;
  22653. };
  22654. function finalCell(head) {
  22655. return new ConsCell(head, emptyList);
  22656. }
  22657. function consList(x) {
  22658. return function (xs) {
  22659. return new ConsCell(x, xs);
  22660. };
  22661. }
  22662. function listToArray(list) {
  22663. var arr = [];
  22664. var xs = list;
  22665. while (xs !== emptyList) {
  22666. arr.push(xs.head);
  22667. xs = xs.tail;
  22668. }
  22669. return arr;
  22670. }
  22671. return function (apply) {
  22672. return function (map) {
  22673. return function (f) {
  22674. var buildFrom = function buildFrom(x, ys) {
  22675. return apply(map(consList)(f(x)))(ys);
  22676. };
  22677. var go = function go(acc, currentLen, xs) {
  22678. if (currentLen === 0) {
  22679. return acc;
  22680. } else {
  22681. var last = xs[currentLen - 1];
  22682. return new Cont(function () {
  22683. var built = go(buildFrom(last, acc), currentLen - 1, xs);
  22684. return built;
  22685. });
  22686. }
  22687. };
  22688. return function (array) {
  22689. var acc = map(finalCell)(f(array[array.length - 1]));
  22690. var result = go(acc, array.length - 1, array);
  22691. while (result instanceof Cont) {
  22692. result = result.fn();
  22693. }
  22694. return map(listToArray)(result);
  22695. };
  22696. };
  22697. };
  22698. };
  22699. }();
  22700. },{}],"../output/Data.Array.NonEmpty.Internal/index.js":[function(require,module,exports) {
  22701. // Generated by purs version 0.13.6
  22702. "use strict";
  22703. var $foreign = require("./foreign.js");
  22704. var Control_Alt = require("../Control.Alt/index.js");
  22705. var Control_Applicative = require("../Control.Applicative/index.js");
  22706. var Control_Apply = require("../Control.Apply/index.js");
  22707. var Control_Bind = require("../Control.Bind/index.js");
  22708. var Control_Monad = require("../Control.Monad/index.js");
  22709. var Data_Eq = require("../Data.Eq/index.js");
  22710. var Data_Foldable = require("../Data.Foldable/index.js");
  22711. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  22712. var Data_Functor = require("../Data.Functor/index.js");
  22713. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  22714. var Data_Ord = require("../Data.Ord/index.js");
  22715. var Data_Semigroup = require("../Data.Semigroup/index.js");
  22716. var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
  22717. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  22718. var Data_Show = require("../Data.Show/index.js");
  22719. var Data_Traversable = require("../Data.Traversable/index.js");
  22720. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  22721. var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
  22722. var NonEmptyArray = function NonEmptyArray(x) {
  22723. return x;
  22724. };
  22725. var unfoldable1NonEmptyArray = Data_Unfoldable1.unfoldable1Array;
  22726. var traversableWithIndexNonEmptyArray = Data_TraversableWithIndex.traversableWithIndexArray;
  22727. var traversableNonEmptyArray = Data_Traversable.traversableArray;
  22728. var showNonEmptyArray = function showNonEmptyArray(dictShow) {
  22729. return new Data_Show.Show(function (v) {
  22730. return "(NonEmptyArray " + (Data_Show.show(Data_Show.showArray(dictShow))(v) + ")");
  22731. });
  22732. };
  22733. var semigroupNonEmptyArray = Data_Semigroup.semigroupArray;
  22734. var ordNonEmptyArray = function ordNonEmptyArray(dictOrd) {
  22735. return Data_Ord.ordArray(dictOrd);
  22736. };
  22737. var ord1NonEmptyArray = Data_Ord.ord1Array;
  22738. var monadNonEmptyArray = Control_Monad.monadArray;
  22739. var functorWithIndexNonEmptyArray = Data_FunctorWithIndex.functorWithIndexArray;
  22740. var functorNonEmptyArray = Data_Functor.functorArray;
  22741. var foldableWithIndexNonEmptyArray = Data_FoldableWithIndex.foldableWithIndexArray;
  22742. var foldableNonEmptyArray = Data_Foldable.foldableArray;
  22743. var foldable1NonEmptyArray = new Data_Semigroup_Foldable.Foldable1(function () {
  22744. return foldableNonEmptyArray;
  22745. }, function (dictSemigroup) {
  22746. return $foreign.fold1Impl(Data_Semigroup.append(dictSemigroup));
  22747. }, function (dictSemigroup) {
  22748. return Data_Semigroup_Foldable.foldMap1Default(foldable1NonEmptyArray)(functorNonEmptyArray)(dictSemigroup);
  22749. });
  22750. var traversable1NonEmptyArray = new Data_Semigroup_Traversable.Traversable1(function () {
  22751. return foldable1NonEmptyArray;
  22752. }, function () {
  22753. return traversableNonEmptyArray;
  22754. }, function (dictApply) {
  22755. return Data_Semigroup_Traversable.sequence1Default(traversable1NonEmptyArray)(dictApply);
  22756. }, function (dictApply) {
  22757. return $foreign.traverse1Impl(Control_Apply.apply(dictApply))(Data_Functor.map(dictApply.Functor0()));
  22758. });
  22759. var eqNonEmptyArray = function eqNonEmptyArray(dictEq) {
  22760. return Data_Eq.eqArray(dictEq);
  22761. };
  22762. var eq1NonEmptyArray = Data_Eq.eq1Array;
  22763. var bindNonEmptyArray = Control_Bind.bindArray;
  22764. var applyNonEmptyArray = Control_Apply.applyArray;
  22765. var applicativeNonEmptyArray = Control_Applicative.applicativeArray;
  22766. var altNonEmptyArray = Control_Alt.altArray;
  22767. module.exports = {
  22768. showNonEmptyArray: showNonEmptyArray,
  22769. eqNonEmptyArray: eqNonEmptyArray,
  22770. eq1NonEmptyArray: eq1NonEmptyArray,
  22771. ordNonEmptyArray: ordNonEmptyArray,
  22772. ord1NonEmptyArray: ord1NonEmptyArray,
  22773. semigroupNonEmptyArray: semigroupNonEmptyArray,
  22774. functorNonEmptyArray: functorNonEmptyArray,
  22775. functorWithIndexNonEmptyArray: functorWithIndexNonEmptyArray,
  22776. foldableNonEmptyArray: foldableNonEmptyArray,
  22777. foldableWithIndexNonEmptyArray: foldableWithIndexNonEmptyArray,
  22778. foldable1NonEmptyArray: foldable1NonEmptyArray,
  22779. unfoldable1NonEmptyArray: unfoldable1NonEmptyArray,
  22780. traversableNonEmptyArray: traversableNonEmptyArray,
  22781. traversableWithIndexNonEmptyArray: traversableWithIndexNonEmptyArray,
  22782. traversable1NonEmptyArray: traversable1NonEmptyArray,
  22783. applyNonEmptyArray: applyNonEmptyArray,
  22784. applicativeNonEmptyArray: applicativeNonEmptyArray,
  22785. bindNonEmptyArray: bindNonEmptyArray,
  22786. monadNonEmptyArray: monadNonEmptyArray,
  22787. altNonEmptyArray: altNonEmptyArray
  22788. };
  22789. },{"./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) {
  22790. // Generated by purs version 0.13.6
  22791. "use strict";
  22792. var Control_Bind = require("../Control.Bind/index.js");
  22793. var Data_Array = require("../Data.Array/index.js");
  22794. var Data_Array_NonEmpty_Internal = require("../Data.Array.NonEmpty.Internal/index.js");
  22795. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  22796. var Data_Boolean = require("../Data.Boolean/index.js");
  22797. var Data_Eq = require("../Data.Eq/index.js");
  22798. var Data_Function = require("../Data.Function/index.js");
  22799. var Data_Functor = require("../Data.Functor/index.js");
  22800. var Data_Maybe = require("../Data.Maybe/index.js");
  22801. var Data_NonEmpty = require("../Data.NonEmpty/index.js");
  22802. var Data_Ord = require("../Data.Ord/index.js");
  22803. var Data_Semigroup = require("../Data.Semigroup/index.js");
  22804. var Data_Tuple = require("../Data.Tuple/index.js");
  22805. var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
  22806. var Unsafe_Coerce = require("../Unsafe.Coerce/index.js");
  22807. var unsafeFromArrayF = Unsafe_Coerce.unsafeCoerce;
  22808. var unsafeFromArray = Unsafe_Coerce.unsafeCoerce;
  22809. var toArray = Unsafe_Coerce.unsafeCoerce;
  22810. var unionBy$prime = function unionBy$prime(eq) {
  22811. return function (xs) {
  22812. var $39 = Data_Array.unionBy(eq)(toArray(xs));
  22813. return function ($40) {
  22814. return unsafeFromArray($39($40));
  22815. };
  22816. };
  22817. };
  22818. var union$prime = function union$prime(dictEq) {
  22819. return unionBy$prime(Data_Eq.eq(dictEq));
  22820. };
  22821. var unionBy = function unionBy(eq) {
  22822. return function (xs) {
  22823. var $41 = unionBy$prime(eq)(xs);
  22824. return function ($42) {
  22825. return $41(toArray($42));
  22826. };
  22827. };
  22828. };
  22829. var union = function union(dictEq) {
  22830. return unionBy(Data_Eq.eq(dictEq));
  22831. };
  22832. var unzip = function () {
  22833. var $43 = Data_Bifunctor.bimap(Data_Tuple.bifunctorTuple)(unsafeFromArray)(unsafeFromArray);
  22834. return function ($44) {
  22835. return $43(Data_Array.unzip(toArray($44)));
  22836. };
  22837. }();
  22838. var updateAt = function updateAt(i) {
  22839. return function (x) {
  22840. var $45 = Data_Array.updateAt(i)(x);
  22841. return function ($46) {
  22842. return unsafeFromArrayF($45(toArray($46)));
  22843. };
  22844. };
  22845. };
  22846. var zip = function zip(xs) {
  22847. return function (ys) {
  22848. return unsafeFromArray(Data_Array.zip(toArray(xs))(toArray(ys)));
  22849. };
  22850. };
  22851. var zipWith = function zipWith(f) {
  22852. return function (xs) {
  22853. return function (ys) {
  22854. return unsafeFromArray(Data_Array.zipWith(f)(toArray(xs))(toArray(ys)));
  22855. };
  22856. };
  22857. };
  22858. var zipWithA = function zipWithA(dictApplicative) {
  22859. return function (f) {
  22860. return function (xs) {
  22861. return function (ys) {
  22862. return unsafeFromArrayF(Data_Array.zipWithA(dictApplicative)(f)(toArray(xs))(toArray(ys)));
  22863. };
  22864. };
  22865. };
  22866. };
  22867. var some = function some(dictAlternative) {
  22868. return function (dictLazy) {
  22869. var $47 = Data_Array.some(dictAlternative)(dictLazy);
  22870. return function ($48) {
  22871. return unsafeFromArrayF($47($48));
  22872. };
  22873. };
  22874. };
  22875. var snoc$prime = function snoc$prime(xs) {
  22876. return function (x) {
  22877. return unsafeFromArray(Data_Array.snoc(xs)(x));
  22878. };
  22879. };
  22880. var snoc = function snoc(xs) {
  22881. return function (x) {
  22882. return unsafeFromArray(Data_Array.snoc(toArray(xs))(x));
  22883. };
  22884. };
  22885. var singleton = function singleton($49) {
  22886. return unsafeFromArray(Data_Array.singleton($49));
  22887. };
  22888. var replicate = function replicate(i) {
  22889. return function (x) {
  22890. return unsafeFromArray(Data_Array.replicate(Data_Ord.max(Data_Ord.ordInt)(1)(i))(x));
  22891. };
  22892. };
  22893. var range = function range(x) {
  22894. return function (y) {
  22895. return unsafeFromArray(Data_Array.range(x)(y));
  22896. };
  22897. };
  22898. var modifyAt = function modifyAt(i) {
  22899. return function (f) {
  22900. var $50 = Data_Array.modifyAt(i)(f);
  22901. return function ($51) {
  22902. return unsafeFromArrayF($50(toArray($51)));
  22903. };
  22904. };
  22905. };
  22906. var intersectBy$prime = function intersectBy$prime(eq) {
  22907. return function (xs) {
  22908. return Data_Array.intersectBy(eq)(toArray(xs));
  22909. };
  22910. };
  22911. var intersectBy = function intersectBy(eq) {
  22912. return function (xs) {
  22913. var $52 = intersectBy$prime(eq)(xs);
  22914. return function ($53) {
  22915. return $52(toArray($53));
  22916. };
  22917. };
  22918. };
  22919. var intersect$prime = function intersect$prime(dictEq) {
  22920. return intersectBy$prime(Data_Eq.eq(dictEq));
  22921. };
  22922. var intersect = function intersect(dictEq) {
  22923. return intersectBy(Data_Eq.eq(dictEq));
  22924. };
  22925. var insertAt = function insertAt(i) {
  22926. return function (x) {
  22927. var $54 = Data_Array.insertAt(i)(x);
  22928. return function ($55) {
  22929. return unsafeFromArrayF($54(toArray($55)));
  22930. };
  22931. };
  22932. };
  22933. var fromFoldable1 = function fromFoldable1(dictFoldable1) {
  22934. var $56 = Data_Array.fromFoldable(dictFoldable1.Foldable0());
  22935. return function ($57) {
  22936. return unsafeFromArray($56($57));
  22937. };
  22938. };
  22939. var fromArray = function fromArray(xs) {
  22940. if (Data_Array.length(xs) > 0) {
  22941. return new Data_Maybe.Just(unsafeFromArray(xs));
  22942. }
  22943. ;
  22944. if (Data_Boolean.otherwise) {
  22945. return Data_Maybe.Nothing.value;
  22946. }
  22947. ;
  22948. throw new Error("Failed pattern match at Data.Array.NonEmpty (line 134, column 1 - line 134, column 58): " + [xs.constructor.name]);
  22949. };
  22950. var fromFoldable = function fromFoldable(dictFoldable) {
  22951. var $58 = Data_Array.fromFoldable(dictFoldable);
  22952. return function ($59) {
  22953. return fromArray($58($59));
  22954. };
  22955. };
  22956. var difference$prime = function difference$prime(dictEq) {
  22957. return function (xs) {
  22958. return Data_Array.difference(dictEq)(toArray(xs));
  22959. };
  22960. };
  22961. var cons$prime = function cons$prime(x) {
  22962. return function (xs) {
  22963. return unsafeFromArray(Data_Array.cons(x)(xs));
  22964. };
  22965. };
  22966. var fromNonEmpty = function fromNonEmpty(v) {
  22967. return cons$prime(v.value0)(v.value1);
  22968. };
  22969. var concatMap = Data_Function.flip(Control_Bind.bind(Data_Array_NonEmpty_Internal.bindNonEmptyArray));
  22970. var concat = function () {
  22971. var $60 = Data_Functor.map(Data_Array_NonEmpty_Internal.functorNonEmptyArray)(toArray);
  22972. return function ($61) {
  22973. return unsafeFromArray(Data_Array.concat(toArray($60($61))));
  22974. };
  22975. }();
  22976. var appendArray = function appendArray(xs) {
  22977. return function (ys) {
  22978. return unsafeFromArray(Data_Semigroup.append(Data_Semigroup.semigroupArray)(toArray(xs))(ys));
  22979. };
  22980. };
  22981. var alterAt = function alterAt(i) {
  22982. return function (f) {
  22983. var $62 = Data_Array.alterAt(i)(f);
  22984. return function ($63) {
  22985. return $62(toArray($63));
  22986. };
  22987. };
  22988. };
  22989. var adaptMaybe = function adaptMaybe(f) {
  22990. var $64 = Data_Maybe.fromJust();
  22991. return function ($65) {
  22992. return $64(f(toArray($65)));
  22993. };
  22994. };
  22995. var head = adaptMaybe(Data_Array.head);
  22996. var init = adaptMaybe(Data_Array.init);
  22997. var last = adaptMaybe(Data_Array.last);
  22998. var tail = adaptMaybe(Data_Array.tail);
  22999. var uncons = adaptMaybe(Data_Array.uncons);
  23000. var toNonEmpty = function toNonEmpty($66) {
  23001. return function (v) {
  23002. return new Data_NonEmpty.NonEmpty(v.head, v.tail);
  23003. }(uncons($66));
  23004. };
  23005. var unsnoc = adaptMaybe(Data_Array.unsnoc);
  23006. var adaptAny = function adaptAny(f) {
  23007. return function ($67) {
  23008. return f(toArray($67));
  23009. };
  23010. };
  23011. var catMaybes = adaptAny(Data_Array.catMaybes);
  23012. var $$delete = function $$delete(dictEq) {
  23013. return function (x) {
  23014. return adaptAny(Data_Array["delete"](dictEq)(x));
  23015. };
  23016. };
  23017. var deleteAt = function deleteAt(i) {
  23018. return adaptAny(Data_Array.deleteAt(i));
  23019. };
  23020. var deleteBy = function deleteBy(f) {
  23021. return function (x) {
  23022. return adaptAny(Data_Array.deleteBy(f)(x));
  23023. };
  23024. };
  23025. var difference = function difference(dictEq) {
  23026. return function (xs) {
  23027. return adaptAny(difference$prime(dictEq)(xs));
  23028. };
  23029. };
  23030. var drop = function drop(i) {
  23031. return adaptAny(Data_Array.drop(i));
  23032. };
  23033. var dropEnd = function dropEnd(i) {
  23034. return adaptAny(Data_Array.dropEnd(i));
  23035. };
  23036. var dropWhile = function dropWhile(f) {
  23037. return adaptAny(Data_Array.dropWhile(f));
  23038. };
  23039. var elemIndex = function elemIndex(dictEq) {
  23040. return function (x) {
  23041. return adaptAny(Data_Array.elemIndex(dictEq)(x));
  23042. };
  23043. };
  23044. var elemLastIndex = function elemLastIndex(dictEq) {
  23045. return function (x) {
  23046. return adaptAny(Data_Array.elemLastIndex(dictEq)(x));
  23047. };
  23048. };
  23049. var filter = function filter(f) {
  23050. return adaptAny(Data_Array.filter(f));
  23051. };
  23052. var filterA = function filterA(dictApplicative) {
  23053. return function (f) {
  23054. return adaptAny(Data_Array.filterA(dictApplicative)(f));
  23055. };
  23056. };
  23057. var findIndex = function findIndex(x) {
  23058. return adaptAny(Data_Array.findIndex(x));
  23059. };
  23060. var findLastIndex = function findLastIndex(x) {
  23061. return adaptAny(Data_Array.findLastIndex(x));
  23062. };
  23063. var foldM = function foldM(dictMonad) {
  23064. return function (f) {
  23065. return function (acc) {
  23066. return adaptAny(Data_Array.foldM(dictMonad)(f)(acc));
  23067. };
  23068. };
  23069. };
  23070. var foldRecM = function foldRecM(dictMonadRec) {
  23071. return function (f) {
  23072. return function (acc) {
  23073. return adaptAny(Data_Array.foldRecM(dictMonadRec)(f)(acc));
  23074. };
  23075. };
  23076. };
  23077. var index = adaptAny(Data_Array.index);
  23078. var length = adaptAny(Data_Array.length);
  23079. var mapMaybe = function mapMaybe(f) {
  23080. return adaptAny(Data_Array.mapMaybe(f));
  23081. };
  23082. var partition = function partition(f) {
  23083. return adaptAny(Data_Array.partition(f));
  23084. };
  23085. var slice = function slice(start) {
  23086. return function (end) {
  23087. return adaptAny(Data_Array.slice(start)(end));
  23088. };
  23089. };
  23090. var span = function span(f) {
  23091. return adaptAny(Data_Array.span(f));
  23092. };
  23093. var take = function take(i) {
  23094. return adaptAny(Data_Array.take(i));
  23095. };
  23096. var takeEnd = function takeEnd(i) {
  23097. return adaptAny(Data_Array.takeEnd(i));
  23098. };
  23099. var takeWhile = function takeWhile(f) {
  23100. return adaptAny(Data_Array.takeWhile(f));
  23101. };
  23102. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  23103. return adaptAny(Data_Array.toUnfoldable(dictUnfoldable));
  23104. };
  23105. var unsafeAdapt = function unsafeAdapt(f) {
  23106. var $68 = adaptAny(f);
  23107. return function ($69) {
  23108. return unsafeFromArray($68($69));
  23109. };
  23110. };
  23111. var cons = function cons(x) {
  23112. return unsafeAdapt(Data_Array.cons(x));
  23113. };
  23114. var insert = function insert(dictOrd) {
  23115. return function (x) {
  23116. return unsafeAdapt(Data_Array.insert(dictOrd)(x));
  23117. };
  23118. };
  23119. var insertBy = function insertBy(f) {
  23120. return function (x) {
  23121. return unsafeAdapt(Data_Array.insertBy(f)(x));
  23122. };
  23123. };
  23124. var modifyAtIndices = function modifyAtIndices(dictFoldable) {
  23125. return function (is) {
  23126. return function (f) {
  23127. return unsafeAdapt(Data_Array.modifyAtIndices(dictFoldable)(is)(f));
  23128. };
  23129. };
  23130. };
  23131. var nub = function nub(dictOrd) {
  23132. return unsafeAdapt(Data_Array.nub(dictOrd));
  23133. };
  23134. var nubBy = function nubBy(f) {
  23135. return unsafeAdapt(Data_Array.nubBy(f));
  23136. };
  23137. var nubByEq = function nubByEq(f) {
  23138. return unsafeAdapt(Data_Array.nubByEq(f));
  23139. };
  23140. var nubEq = function nubEq(dictEq) {
  23141. return unsafeAdapt(Data_Array.nubEq(dictEq));
  23142. };
  23143. var reverse = unsafeAdapt(Data_Array.reverse);
  23144. var sort = function sort(dictOrd) {
  23145. return unsafeAdapt(Data_Array.sort(dictOrd));
  23146. };
  23147. var sortBy = function sortBy(f) {
  23148. return unsafeAdapt(Data_Array.sortBy(f));
  23149. };
  23150. var sortWith = function sortWith(dictOrd) {
  23151. return function (f) {
  23152. return unsafeAdapt(Data_Array.sortWith(dictOrd)(f));
  23153. };
  23154. };
  23155. var updateAtIndices = function updateAtIndices(dictFoldable) {
  23156. return function (pairs) {
  23157. return unsafeAdapt(Data_Array.updateAtIndices(dictFoldable)(pairs));
  23158. };
  23159. };
  23160. var unsafeIndex = function unsafeIndex(dictPartial) {
  23161. return adaptAny(Data_Array.unsafeIndex());
  23162. };
  23163. var toUnfoldable1 = function toUnfoldable1(dictUnfoldable1) {
  23164. return function (xs) {
  23165. var len = length(xs);
  23166. var f = function f(i) {
  23167. return Data_Tuple.Tuple.create(unsafeIndex()(xs)(i))(function () {
  23168. var $38 = i < (len - 1 | 0);
  23169. if ($38) {
  23170. return new Data_Maybe.Just(i + 1 | 0);
  23171. }
  23172. ;
  23173. return Data_Maybe.Nothing.value;
  23174. }());
  23175. };
  23176. return Data_Unfoldable1.unfoldr1(dictUnfoldable1)(f)(0);
  23177. };
  23178. };
  23179. module.exports = {
  23180. fromArray: fromArray,
  23181. fromNonEmpty: fromNonEmpty,
  23182. toArray: toArray,
  23183. toNonEmpty: toNonEmpty,
  23184. fromFoldable: fromFoldable,
  23185. fromFoldable1: fromFoldable1,
  23186. toUnfoldable: toUnfoldable,
  23187. toUnfoldable1: toUnfoldable1,
  23188. singleton: singleton,
  23189. range: range,
  23190. replicate: replicate,
  23191. some: some,
  23192. length: length,
  23193. cons: cons,
  23194. "cons'": cons$prime,
  23195. snoc: snoc,
  23196. "snoc'": snoc$prime,
  23197. appendArray: appendArray,
  23198. insert: insert,
  23199. insertBy: insertBy,
  23200. head: head,
  23201. last: last,
  23202. tail: tail,
  23203. init: init,
  23204. uncons: uncons,
  23205. unsnoc: unsnoc,
  23206. index: index,
  23207. elemIndex: elemIndex,
  23208. elemLastIndex: elemLastIndex,
  23209. findIndex: findIndex,
  23210. findLastIndex: findLastIndex,
  23211. insertAt: insertAt,
  23212. deleteAt: deleteAt,
  23213. updateAt: updateAt,
  23214. updateAtIndices: updateAtIndices,
  23215. modifyAt: modifyAt,
  23216. modifyAtIndices: modifyAtIndices,
  23217. alterAt: alterAt,
  23218. reverse: reverse,
  23219. concat: concat,
  23220. concatMap: concatMap,
  23221. filter: filter,
  23222. partition: partition,
  23223. filterA: filterA,
  23224. mapMaybe: mapMaybe,
  23225. catMaybes: catMaybes,
  23226. sort: sort,
  23227. sortBy: sortBy,
  23228. sortWith: sortWith,
  23229. slice: slice,
  23230. take: take,
  23231. takeEnd: takeEnd,
  23232. takeWhile: takeWhile,
  23233. drop: drop,
  23234. dropEnd: dropEnd,
  23235. dropWhile: dropWhile,
  23236. span: span,
  23237. nub: nub,
  23238. nubBy: nubBy,
  23239. nubEq: nubEq,
  23240. nubByEq: nubByEq,
  23241. union: union,
  23242. "union'": union$prime,
  23243. unionBy: unionBy,
  23244. "unionBy'": unionBy$prime,
  23245. "delete": $$delete,
  23246. deleteBy: deleteBy,
  23247. difference: difference,
  23248. "difference'": difference$prime,
  23249. intersect: intersect,
  23250. "intersect'": intersect$prime,
  23251. intersectBy: intersectBy,
  23252. "intersectBy'": intersectBy$prime,
  23253. zipWith: zipWith,
  23254. zipWithA: zipWithA,
  23255. zip: zip,
  23256. unzip: unzip,
  23257. foldM: foldM,
  23258. foldRecM: foldRecM,
  23259. unsafeIndex: unsafeIndex
  23260. };
  23261. },{"../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) {
  23262. // Generated by purs version 0.13.6
  23263. "use strict";
  23264. var Control_Category = require("../Control.Category/index.js");
  23265. var Data_Newtype = require("../Data.Newtype/index.js");
  23266. var Profunctor = function Profunctor(dimap) {
  23267. this.dimap = dimap;
  23268. };
  23269. var profunctorFn = new Profunctor(function (a2b) {
  23270. return function (c2d) {
  23271. return function (b2c) {
  23272. return function ($9) {
  23273. return c2d(b2c(a2b($9)));
  23274. };
  23275. };
  23276. };
  23277. });
  23278. var dimap = function dimap(dict) {
  23279. return dict.dimap;
  23280. };
  23281. var lcmap = function lcmap(dictProfunctor) {
  23282. return function (a2b) {
  23283. return dimap(dictProfunctor)(a2b)(Control_Category.identity(Control_Category.categoryFn));
  23284. };
  23285. };
  23286. var rmap = function rmap(dictProfunctor) {
  23287. return function (b2c) {
  23288. return dimap(dictProfunctor)(Control_Category.identity(Control_Category.categoryFn))(b2c);
  23289. };
  23290. };
  23291. var unwrapIso = function unwrapIso(dictProfunctor) {
  23292. return function (dictNewtype) {
  23293. return dimap(dictProfunctor)(Data_Newtype.wrap(dictNewtype))(Data_Newtype.unwrap(dictNewtype));
  23294. };
  23295. };
  23296. var wrapIso = function wrapIso(dictProfunctor) {
  23297. return function (dictNewtype) {
  23298. return function (v) {
  23299. return dimap(dictProfunctor)(Data_Newtype.unwrap(dictNewtype))(Data_Newtype.wrap(dictNewtype));
  23300. };
  23301. };
  23302. };
  23303. var arr = function arr(dictCategory) {
  23304. return function (dictProfunctor) {
  23305. return function (f) {
  23306. return rmap(dictProfunctor)(f)(Control_Category.identity(dictCategory));
  23307. };
  23308. };
  23309. };
  23310. module.exports = {
  23311. dimap: dimap,
  23312. Profunctor: Profunctor,
  23313. lcmap: lcmap,
  23314. rmap: rmap,
  23315. arr: arr,
  23316. unwrapIso: unwrapIso,
  23317. wrapIso: wrapIso,
  23318. profunctorFn: profunctorFn
  23319. };
  23320. },{"../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) {
  23321. // Generated by purs version 0.13.6
  23322. "use strict";
  23323. var Control_Category = require("../Control.Category/index.js");
  23324. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  23325. var Data_Either = require("../Data.Either/index.js");
  23326. var Data_Functor = require("../Data.Functor/index.js");
  23327. var Data_Profunctor = require("../Data.Profunctor/index.js");
  23328. var Choice = function Choice(Profunctor0, left, right) {
  23329. this.Profunctor0 = Profunctor0;
  23330. this.left = left;
  23331. this.right = right;
  23332. };
  23333. var right = function right(dict) {
  23334. return dict.right;
  23335. };
  23336. var left = function left(dict) {
  23337. return dict.left;
  23338. };
  23339. var splitChoice = function splitChoice(dictCategory) {
  23340. return function (dictChoice) {
  23341. return function (l) {
  23342. return function (r) {
  23343. return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(left(dictChoice)(l))(right(dictChoice)(r));
  23344. };
  23345. };
  23346. };
  23347. };
  23348. var fanin = function fanin(dictCategory) {
  23349. return function (dictChoice) {
  23350. return function (l) {
  23351. return function (r) {
  23352. 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));
  23353. return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(splitChoice(dictCategory)(dictChoice)(l)(r))(join);
  23354. };
  23355. };
  23356. };
  23357. };
  23358. var choiceFn = new Choice(function () {
  23359. return Data_Profunctor.profunctorFn;
  23360. }, function (v) {
  23361. return function (v1) {
  23362. if (v1 instanceof Data_Either.Left) {
  23363. return Data_Either.Left.create(v(v1.value0));
  23364. }
  23365. ;
  23366. if (v1 instanceof Data_Either.Right) {
  23367. return new Data_Either.Right(v1.value0);
  23368. }
  23369. ;
  23370. throw new Error("Failed pattern match at Data.Profunctor.Choice (line 32, column 1 - line 35, column 16): " + [v.constructor.name, v1.constructor.name]);
  23371. };
  23372. }, Data_Functor.map(Data_Either.functorEither));
  23373. module.exports = {
  23374. left: left,
  23375. right: right,
  23376. Choice: Choice,
  23377. splitChoice: splitChoice,
  23378. fanin: fanin,
  23379. choiceFn: choiceFn
  23380. };
  23381. },{"../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) {
  23382. // Generated by purs version 0.13.6
  23383. "use strict";
  23384. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  23385. var Data_Profunctor = require("../Data.Profunctor/index.js");
  23386. var Closed = function Closed(Profunctor0, closed) {
  23387. this.Profunctor0 = Profunctor0;
  23388. this.closed = closed;
  23389. };
  23390. var closedFunction = new Closed(function () {
  23391. return Data_Profunctor.profunctorFn;
  23392. }, Control_Semigroupoid.compose(Control_Semigroupoid.semigroupoidFn));
  23393. var closed = function closed(dict) {
  23394. return dict.closed;
  23395. };
  23396. module.exports = {
  23397. closed: closed,
  23398. Closed: Closed,
  23399. closedFunction: closedFunction
  23400. };
  23401. },{"../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) {
  23402. // Generated by purs version 0.13.6
  23403. "use strict";
  23404. var Control_Category = require("../Control.Category/index.js");
  23405. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  23406. var Data_Functor = require("../Data.Functor/index.js");
  23407. var Data_Profunctor = require("../Data.Profunctor/index.js");
  23408. var Data_Tuple = require("../Data.Tuple/index.js");
  23409. var Strong = function Strong(Profunctor0, first, second) {
  23410. this.Profunctor0 = Profunctor0;
  23411. this.first = first;
  23412. this.second = second;
  23413. };
  23414. var strongFn = new Strong(function () {
  23415. return Data_Profunctor.profunctorFn;
  23416. }, function (a2b) {
  23417. return function (v) {
  23418. return new Data_Tuple.Tuple(a2b(v.value0), v.value1);
  23419. };
  23420. }, Data_Functor.map(Data_Tuple.functorTuple));
  23421. var second = function second(dict) {
  23422. return dict.second;
  23423. };
  23424. var first = function first(dict) {
  23425. return dict.first;
  23426. };
  23427. var splitStrong = function splitStrong(dictCategory) {
  23428. return function (dictStrong) {
  23429. return function (l) {
  23430. return function (r) {
  23431. return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(first(dictStrong)(l))(second(dictStrong)(r));
  23432. };
  23433. };
  23434. };
  23435. };
  23436. var fanout = function fanout(dictCategory) {
  23437. return function (dictStrong) {
  23438. return function (l) {
  23439. return function (r) {
  23440. var split = Data_Profunctor.dimap(dictStrong.Profunctor0())(Control_Category.identity(Control_Category.categoryFn))(function (a) {
  23441. return new Data_Tuple.Tuple(a, a);
  23442. })(Control_Category.identity(dictCategory));
  23443. return Control_Semigroupoid.composeFlipped(dictCategory.Semigroupoid0())(split)(splitStrong(dictCategory)(dictStrong)(l)(r));
  23444. };
  23445. };
  23446. };
  23447. };
  23448. module.exports = {
  23449. first: first,
  23450. second: second,
  23451. Strong: Strong,
  23452. splitStrong: splitStrong,
  23453. fanout: fanout,
  23454. strongFn: strongFn
  23455. };
  23456. },{"../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) {
  23457. // Generated by purs version 0.13.6
  23458. "use strict";
  23459. var Control_Alt = require("../Control.Alt/index.js");
  23460. var Control_Alternative = require("../Control.Alternative/index.js");
  23461. var Control_Applicative = require("../Control.Applicative/index.js");
  23462. var Control_Apply = require("../Control.Apply/index.js");
  23463. var Control_Bind = require("../Control.Bind/index.js");
  23464. var Control_Category = require("../Control.Category/index.js");
  23465. var Control_Monad = require("../Control.Monad/index.js");
  23466. var Control_MonadPlus = require("../Control.MonadPlus/index.js");
  23467. var Control_MonadZero = require("../Control.MonadZero/index.js");
  23468. var Control_Plus = require("../Control.Plus/index.js");
  23469. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  23470. var Data_Distributive = require("../Data.Distributive/index.js");
  23471. var Data_Either = require("../Data.Either/index.js");
  23472. var Data_Functor = require("../Data.Functor/index.js");
  23473. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  23474. var Data_Newtype = require("../Data.Newtype/index.js");
  23475. var Data_Profunctor = require("../Data.Profunctor/index.js");
  23476. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  23477. var Data_Profunctor_Closed = require("../Data.Profunctor.Closed/index.js");
  23478. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  23479. var Data_Tuple = require("../Data.Tuple/index.js");
  23480. var Star = function Star(x) {
  23481. return x;
  23482. };
  23483. var semigroupoidStar = function semigroupoidStar(dictBind) {
  23484. return new Control_Semigroupoid.Semigroupoid(function (v) {
  23485. return function (v1) {
  23486. return function (x) {
  23487. return Control_Bind.bind(dictBind)(v1(x))(v);
  23488. };
  23489. };
  23490. });
  23491. };
  23492. var profunctorStar = function profunctorStar(dictFunctor) {
  23493. return new Data_Profunctor.Profunctor(function (f) {
  23494. return function (g) {
  23495. return function (v) {
  23496. var $78 = Data_Functor.map(dictFunctor)(g);
  23497. return function ($79) {
  23498. return $78(v(f($79)));
  23499. };
  23500. };
  23501. };
  23502. });
  23503. };
  23504. var strongStar = function strongStar(dictFunctor) {
  23505. return new Data_Profunctor_Strong.Strong(function () {
  23506. return profunctorStar(dictFunctor);
  23507. }, function (v) {
  23508. return function (v1) {
  23509. return Data_Functor.map(dictFunctor)(function (v2) {
  23510. return new Data_Tuple.Tuple(v2, v1.value1);
  23511. })(v(v1.value0));
  23512. };
  23513. }, function (v) {
  23514. return function (v1) {
  23515. return Data_Functor.map(dictFunctor)(Data_Tuple.Tuple.create(v1.value0))(v(v1.value1));
  23516. };
  23517. });
  23518. };
  23519. var newtypeStar = new Data_Newtype.Newtype(function (n) {
  23520. return n;
  23521. }, Star);
  23522. var invariantStar = function invariantStar(dictInvariant) {
  23523. return new Data_Functor_Invariant.Invariant(function (f) {
  23524. return function (g) {
  23525. return function (v) {
  23526. var $80 = Data_Functor_Invariant.imap(dictInvariant)(f)(g);
  23527. return function ($81) {
  23528. return $80(v($81));
  23529. };
  23530. };
  23531. };
  23532. });
  23533. };
  23534. var hoistStar = function hoistStar(f) {
  23535. return function (v) {
  23536. return function ($82) {
  23537. return f(v($82));
  23538. };
  23539. };
  23540. };
  23541. var functorStar = function functorStar(dictFunctor) {
  23542. return new Data_Functor.Functor(function (f) {
  23543. return function (v) {
  23544. var $83 = Data_Functor.map(dictFunctor)(f);
  23545. return function ($84) {
  23546. return $83(v($84));
  23547. };
  23548. };
  23549. });
  23550. };
  23551. var distributiveStar = function distributiveStar(dictDistributive) {
  23552. return new Data_Distributive.Distributive(function () {
  23553. return functorStar(dictDistributive.Functor0());
  23554. }, function (dictFunctor) {
  23555. return function (f) {
  23556. var $85 = Data_Distributive.distribute(distributiveStar(dictDistributive))(dictFunctor);
  23557. var $86 = Data_Functor.map(dictFunctor)(f);
  23558. return function ($87) {
  23559. return $85($86($87));
  23560. };
  23561. };
  23562. }, function (dictFunctor) {
  23563. return function (f) {
  23564. return function (a) {
  23565. return Data_Distributive.collect(dictDistributive)(dictFunctor)(function (v) {
  23566. return v(a);
  23567. })(f);
  23568. };
  23569. };
  23570. });
  23571. };
  23572. var closedStar = function closedStar(dictDistributive) {
  23573. return new Data_Profunctor_Closed.Closed(function () {
  23574. return profunctorStar(dictDistributive.Functor0());
  23575. }, function (v) {
  23576. return function (g) {
  23577. return Data_Distributive.distribute(dictDistributive)(Data_Functor.functorFn)(function ($88) {
  23578. return v(g($88));
  23579. });
  23580. };
  23581. });
  23582. };
  23583. var choiceStar = function choiceStar(dictApplicative) {
  23584. return new Data_Profunctor_Choice.Choice(function () {
  23585. return profunctorStar(dictApplicative.Apply0().Functor0());
  23586. }, function (v) {
  23587. return Star(Data_Either.either(function () {
  23588. var $89 = Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Either.Left.create);
  23589. return function ($90) {
  23590. return $89(v($90));
  23591. };
  23592. }())(function () {
  23593. var $91 = Control_Applicative.pure(dictApplicative);
  23594. return function ($92) {
  23595. return $91(Data_Either.Right.create($92));
  23596. };
  23597. }()));
  23598. }, function (v) {
  23599. return Star(Data_Either.either(function () {
  23600. var $93 = Control_Applicative.pure(dictApplicative);
  23601. return function ($94) {
  23602. return $93(Data_Either.Left.create($94));
  23603. };
  23604. }())(function () {
  23605. var $95 = Data_Functor.map(dictApplicative.Apply0().Functor0())(Data_Either.Right.create);
  23606. return function ($96) {
  23607. return $95(v($96));
  23608. };
  23609. }()));
  23610. });
  23611. };
  23612. var categoryStar = function categoryStar(dictMonad) {
  23613. return new Control_Category.Category(function () {
  23614. return semigroupoidStar(dictMonad.Bind1());
  23615. }, Control_Applicative.pure(dictMonad.Applicative0()));
  23616. };
  23617. var applyStar = function applyStar(dictApply) {
  23618. return new Control_Apply.Apply(function () {
  23619. return functorStar(dictApply.Functor0());
  23620. }, function (v) {
  23621. return function (v1) {
  23622. return function (a) {
  23623. return Control_Apply.apply(dictApply)(v(a))(v1(a));
  23624. };
  23625. };
  23626. });
  23627. };
  23628. var bindStar = function bindStar(dictBind) {
  23629. return new Control_Bind.Bind(function () {
  23630. return applyStar(dictBind.Apply0());
  23631. }, function (v) {
  23632. return function (f) {
  23633. return function (x) {
  23634. return Control_Bind.bind(dictBind)(v(x))(function (a) {
  23635. var v1 = f(a);
  23636. return v1(x);
  23637. });
  23638. };
  23639. };
  23640. });
  23641. };
  23642. var applicativeStar = function applicativeStar(dictApplicative) {
  23643. return new Control_Applicative.Applicative(function () {
  23644. return applyStar(dictApplicative.Apply0());
  23645. }, function (a) {
  23646. return function (v) {
  23647. return Control_Applicative.pure(dictApplicative)(a);
  23648. };
  23649. });
  23650. };
  23651. var monadStar = function monadStar(dictMonad) {
  23652. return new Control_Monad.Monad(function () {
  23653. return applicativeStar(dictMonad.Applicative0());
  23654. }, function () {
  23655. return bindStar(dictMonad.Bind1());
  23656. });
  23657. };
  23658. var altStar = function altStar(dictAlt) {
  23659. return new Control_Alt.Alt(function () {
  23660. return functorStar(dictAlt.Functor0());
  23661. }, function (v) {
  23662. return function (v1) {
  23663. return function (a) {
  23664. return Control_Alt.alt(dictAlt)(v(a))(v1(a));
  23665. };
  23666. };
  23667. });
  23668. };
  23669. var plusStar = function plusStar(dictPlus) {
  23670. return new Control_Plus.Plus(function () {
  23671. return altStar(dictPlus.Alt0());
  23672. }, function (v) {
  23673. return Control_Plus.empty(dictPlus);
  23674. });
  23675. };
  23676. var alternativeStar = function alternativeStar(dictAlternative) {
  23677. return new Control_Alternative.Alternative(function () {
  23678. return applicativeStar(dictAlternative.Applicative0());
  23679. }, function () {
  23680. return plusStar(dictAlternative.Plus1());
  23681. });
  23682. };
  23683. var monadZeroStar = function monadZeroStar(dictMonadZero) {
  23684. return new Control_MonadZero.MonadZero(function () {
  23685. return alternativeStar(dictMonadZero.Alternative1());
  23686. }, function () {
  23687. return monadStar(dictMonadZero.Monad0());
  23688. });
  23689. };
  23690. var monadPlusStar = function monadPlusStar(dictMonadPlus) {
  23691. return new Control_MonadPlus.MonadPlus(function () {
  23692. return monadZeroStar(dictMonadPlus.MonadZero0());
  23693. });
  23694. };
  23695. module.exports = {
  23696. Star: Star,
  23697. hoistStar: hoistStar,
  23698. newtypeStar: newtypeStar,
  23699. semigroupoidStar: semigroupoidStar,
  23700. categoryStar: categoryStar,
  23701. functorStar: functorStar,
  23702. invariantStar: invariantStar,
  23703. applyStar: applyStar,
  23704. applicativeStar: applicativeStar,
  23705. bindStar: bindStar,
  23706. monadStar: monadStar,
  23707. altStar: altStar,
  23708. plusStar: plusStar,
  23709. alternativeStar: alternativeStar,
  23710. monadZeroStar: monadZeroStar,
  23711. monadPlusStar: monadPlusStar,
  23712. distributiveStar: distributiveStar,
  23713. profunctorStar: profunctorStar,
  23714. strongStar: strongStar,
  23715. choiceStar: choiceStar,
  23716. closedStar: closedStar
  23717. };
  23718. },{"../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) {
  23719. // Generated by purs version 0.13.6
  23720. "use strict";
  23721. var Data_Functor = require("../Data.Functor/index.js");
  23722. var Data_Identity = require("../Data.Identity/index.js");
  23723. var Data_Newtype = require("../Data.Newtype/index.js");
  23724. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  23725. var Data_Profunctor_Star = require("../Data.Profunctor.Star/index.js");
  23726. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  23727. var Wander = function Wander(Choice1, Strong0, wander) {
  23728. this.Choice1 = Choice1;
  23729. this.Strong0 = Strong0;
  23730. this.wander = wander;
  23731. };
  23732. var wanderStar = function wanderStar(dictApplicative) {
  23733. return new Wander(function () {
  23734. return Data_Profunctor_Star.choiceStar(dictApplicative);
  23735. }, function () {
  23736. return Data_Profunctor_Star.strongStar(dictApplicative.Apply0().Functor0());
  23737. }, function (t) {
  23738. return function (v) {
  23739. return t(dictApplicative)(v);
  23740. };
  23741. });
  23742. };
  23743. var wanderFunction = new Wander(function () {
  23744. return Data_Profunctor_Choice.choiceFn;
  23745. }, function () {
  23746. return Data_Profunctor_Strong.strongFn;
  23747. }, function (t) {
  23748. return Data_Newtype.alaF(Data_Functor.functorFn)(Data_Functor.functorFn)(Data_Identity.newtypeIdentity)(Data_Identity.newtypeIdentity)(Data_Identity.Identity)(t(Data_Identity.applicativeIdentity));
  23749. });
  23750. var wander = function wander(dict) {
  23751. return dict.wander;
  23752. };
  23753. module.exports = {
  23754. wander: wander,
  23755. Wander: Wander,
  23756. wanderFunction: wanderFunction,
  23757. wanderStar: wanderStar
  23758. };
  23759. },{"../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) {
  23760. "use strict";
  23761. exports.defer = function (thunk) {
  23762. var v = null;
  23763. return function () {
  23764. if (thunk === undefined) return v;
  23765. v = thunk();
  23766. thunk = undefined; // eslint-disable-line no-param-reassign
  23767. return v;
  23768. };
  23769. };
  23770. exports.force = function (l) {
  23771. return l();
  23772. };
  23773. },{}],"../output/Data.Lazy/index.js":[function(require,module,exports) {
  23774. // Generated by purs version 0.13.6
  23775. "use strict";
  23776. var $foreign = require("./foreign.js");
  23777. var Control_Applicative = require("../Control.Applicative/index.js");
  23778. var Control_Apply = require("../Control.Apply/index.js");
  23779. var Control_Bind = require("../Control.Bind/index.js");
  23780. var Control_Comonad = require("../Control.Comonad/index.js");
  23781. var Control_Extend = require("../Control.Extend/index.js");
  23782. var Control_Lazy = require("../Control.Lazy/index.js");
  23783. var Control_Monad = require("../Control.Monad/index.js");
  23784. var Data_BooleanAlgebra = require("../Data.BooleanAlgebra/index.js");
  23785. var Data_Bounded = require("../Data.Bounded/index.js");
  23786. var Data_CommutativeRing = require("../Data.CommutativeRing/index.js");
  23787. var Data_Eq = require("../Data.Eq/index.js");
  23788. var Data_EuclideanRing = require("../Data.EuclideanRing/index.js");
  23789. var Data_Foldable = require("../Data.Foldable/index.js");
  23790. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  23791. var Data_Function = require("../Data.Function/index.js");
  23792. var Data_Functor = require("../Data.Functor/index.js");
  23793. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  23794. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  23795. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  23796. var Data_Monoid = require("../Data.Monoid/index.js");
  23797. var Data_Ord = require("../Data.Ord/index.js");
  23798. var Data_Ring = require("../Data.Ring/index.js");
  23799. var Data_Semigroup = require("../Data.Semigroup/index.js");
  23800. var Data_Semigroup_Foldable = require("../Data.Semigroup.Foldable/index.js");
  23801. var Data_Semigroup_Traversable = require("../Data.Semigroup.Traversable/index.js");
  23802. var Data_Semiring = require("../Data.Semiring/index.js");
  23803. var Data_Show = require("../Data.Show/index.js");
  23804. var Data_Traversable = require("../Data.Traversable/index.js");
  23805. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  23806. var Data_Unit = require("../Data.Unit/index.js");
  23807. var showLazy = function showLazy(dictShow) {
  23808. return new Data_Show.Show(function (x) {
  23809. return "(defer \\_ -> " + (Data_Show.show(dictShow)($foreign.force(x)) + ")");
  23810. });
  23811. };
  23812. var semiringLazy = function semiringLazy(dictSemiring) {
  23813. return new Data_Semiring.Semiring(function (a) {
  23814. return function (b) {
  23815. return $foreign.defer(function (v) {
  23816. return Data_Semiring.add(dictSemiring)($foreign.force(a))($foreign.force(b));
  23817. });
  23818. };
  23819. }, function (a) {
  23820. return function (b) {
  23821. return $foreign.defer(function (v) {
  23822. return Data_Semiring.mul(dictSemiring)($foreign.force(a))($foreign.force(b));
  23823. });
  23824. };
  23825. }, $foreign.defer(function (v) {
  23826. return Data_Semiring.one(dictSemiring);
  23827. }), $foreign.defer(function (v) {
  23828. return Data_Semiring.zero(dictSemiring);
  23829. }));
  23830. };
  23831. var semigroupLazy = function semigroupLazy(dictSemigroup) {
  23832. return new Data_Semigroup.Semigroup(function (a) {
  23833. return function (b) {
  23834. return $foreign.defer(function (v) {
  23835. return Data_Semigroup.append(dictSemigroup)($foreign.force(a))($foreign.force(b));
  23836. });
  23837. };
  23838. });
  23839. };
  23840. var ringLazy = function ringLazy(dictRing) {
  23841. return new Data_Ring.Ring(function () {
  23842. return semiringLazy(dictRing.Semiring0());
  23843. }, function (a) {
  23844. return function (b) {
  23845. return $foreign.defer(function (v) {
  23846. return Data_Ring.sub(dictRing)($foreign.force(a))($foreign.force(b));
  23847. });
  23848. };
  23849. });
  23850. };
  23851. var monoidLazy = function monoidLazy(dictMonoid) {
  23852. return new Data_Monoid.Monoid(function () {
  23853. return semigroupLazy(dictMonoid.Semigroup0());
  23854. }, $foreign.defer(function (v) {
  23855. return Data_Monoid.mempty(dictMonoid);
  23856. }));
  23857. };
  23858. var lazyLazy = new Control_Lazy.Lazy(function (f) {
  23859. return $foreign.defer(function (v) {
  23860. return $foreign.force(f(Data_Unit.unit));
  23861. });
  23862. });
  23863. var functorLazy = new Data_Functor.Functor(function (f) {
  23864. return function (l) {
  23865. return $foreign.defer(function (v) {
  23866. return f($foreign.force(l));
  23867. });
  23868. };
  23869. });
  23870. var functorWithIndexLazy = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  23871. return functorLazy;
  23872. }, function (f) {
  23873. return Data_Functor.map(functorLazy)(f(Data_Unit.unit));
  23874. });
  23875. var invariantLazy = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorLazy));
  23876. var foldableLazy = new Data_Foldable.Foldable(function (dictMonoid) {
  23877. return function (f) {
  23878. return function (l) {
  23879. return f($foreign.force(l));
  23880. };
  23881. };
  23882. }, function (f) {
  23883. return function (z) {
  23884. return function (l) {
  23885. return f(z)($foreign.force(l));
  23886. };
  23887. };
  23888. }, function (f) {
  23889. return function (z) {
  23890. return function (l) {
  23891. return f($foreign.force(l))(z);
  23892. };
  23893. };
  23894. });
  23895. var foldableWithIndexLazy = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  23896. return foldableLazy;
  23897. }, function (dictMonoid) {
  23898. return function (f) {
  23899. return Data_Foldable.foldMap(foldableLazy)(dictMonoid)(f(Data_Unit.unit));
  23900. };
  23901. }, function (f) {
  23902. return Data_Foldable.foldl(foldableLazy)(f(Data_Unit.unit));
  23903. }, function (f) {
  23904. return Data_Foldable.foldr(foldableLazy)(f(Data_Unit.unit));
  23905. });
  23906. var traversableLazy = new Data_Traversable.Traversable(function () {
  23907. return foldableLazy;
  23908. }, function () {
  23909. return functorLazy;
  23910. }, function (dictApplicative) {
  23911. return function (l) {
  23912. return Data_Functor.map(dictApplicative.Apply0().Functor0())(function ($42) {
  23913. return $foreign.defer(Data_Function["const"]($42));
  23914. })($foreign.force(l));
  23915. };
  23916. }, function (dictApplicative) {
  23917. return function (f) {
  23918. return function (l) {
  23919. return Data_Functor.map(dictApplicative.Apply0().Functor0())(function ($43) {
  23920. return $foreign.defer(Data_Function["const"]($43));
  23921. })(f($foreign.force(l)));
  23922. };
  23923. };
  23924. });
  23925. var traversableWithIndexLazy = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  23926. return foldableWithIndexLazy;
  23927. }, function () {
  23928. return functorWithIndexLazy;
  23929. }, function () {
  23930. return traversableLazy;
  23931. }, function (dictApplicative) {
  23932. return function (f) {
  23933. return Data_Traversable.traverse(traversableLazy)(dictApplicative)(f(Data_Unit.unit));
  23934. };
  23935. });
  23936. var foldable1Lazy = new Data_Semigroup_Foldable.Foldable1(function () {
  23937. return foldableLazy;
  23938. }, function (dictSemigroup) {
  23939. return Data_Semigroup_Foldable.fold1Default(foldable1Lazy)(dictSemigroup);
  23940. }, function (dictSemigroup) {
  23941. return function (f) {
  23942. return function (l) {
  23943. return f($foreign.force(l));
  23944. };
  23945. };
  23946. });
  23947. var traversable1Lazy = new Data_Semigroup_Traversable.Traversable1(function () {
  23948. return foldable1Lazy;
  23949. }, function () {
  23950. return traversableLazy;
  23951. }, function (dictApply) {
  23952. return function (l) {
  23953. return Data_Functor.map(dictApply.Functor0())(function ($44) {
  23954. return $foreign.defer(Data_Function["const"]($44));
  23955. })($foreign.force(l));
  23956. };
  23957. }, function (dictApply) {
  23958. return function (f) {
  23959. return function (l) {
  23960. return Data_Functor.map(dictApply.Functor0())(function ($45) {
  23961. return $foreign.defer(Data_Function["const"]($45));
  23962. })(f($foreign.force(l)));
  23963. };
  23964. };
  23965. });
  23966. var extendLazy = new Control_Extend.Extend(function () {
  23967. return functorLazy;
  23968. }, function (f) {
  23969. return function (x) {
  23970. return $foreign.defer(function (v) {
  23971. return f(x);
  23972. });
  23973. };
  23974. });
  23975. var eqLazy = function eqLazy(dictEq) {
  23976. return new Data_Eq.Eq(function (x) {
  23977. return function (y) {
  23978. return Data_Eq.eq(dictEq)($foreign.force(x))($foreign.force(y));
  23979. };
  23980. });
  23981. };
  23982. var ordLazy = function ordLazy(dictOrd) {
  23983. return new Data_Ord.Ord(function () {
  23984. return eqLazy(dictOrd.Eq0());
  23985. }, function (x) {
  23986. return function (y) {
  23987. return Data_Ord.compare(dictOrd)($foreign.force(x))($foreign.force(y));
  23988. };
  23989. });
  23990. };
  23991. var eq1Lazy = new Data_Eq.Eq1(function (dictEq) {
  23992. return Data_Eq.eq(eqLazy(dictEq));
  23993. });
  23994. var ord1Lazy = new Data_Ord.Ord1(function () {
  23995. return eq1Lazy;
  23996. }, function (dictOrd) {
  23997. return Data_Ord.compare(ordLazy(dictOrd));
  23998. });
  23999. var comonadLazy = new Control_Comonad.Comonad(function () {
  24000. return extendLazy;
  24001. }, $foreign.force);
  24002. var commutativeRingLazy = function commutativeRingLazy(dictCommutativeRing) {
  24003. return new Data_CommutativeRing.CommutativeRing(function () {
  24004. return ringLazy(dictCommutativeRing.Ring0());
  24005. });
  24006. };
  24007. var euclideanRingLazy = function euclideanRingLazy(dictEuclideanRing) {
  24008. return new Data_EuclideanRing.EuclideanRing(function () {
  24009. return commutativeRingLazy(dictEuclideanRing.CommutativeRing0());
  24010. }, function () {
  24011. var $46 = Data_EuclideanRing.degree(dictEuclideanRing);
  24012. return function ($47) {
  24013. return $46($foreign.force($47));
  24014. };
  24015. }(), function (a) {
  24016. return function (b) {
  24017. return $foreign.defer(function (v) {
  24018. return Data_EuclideanRing.div(dictEuclideanRing)($foreign.force(a))($foreign.force(b));
  24019. });
  24020. };
  24021. }, function (a) {
  24022. return function (b) {
  24023. return $foreign.defer(function (v) {
  24024. return Data_EuclideanRing.mod(dictEuclideanRing)($foreign.force(a))($foreign.force(b));
  24025. });
  24026. };
  24027. });
  24028. };
  24029. var boundedLazy = function boundedLazy(dictBounded) {
  24030. return new Data_Bounded.Bounded(function () {
  24031. return ordLazy(dictBounded.Ord0());
  24032. }, $foreign.defer(function (v) {
  24033. return Data_Bounded.bottom(dictBounded);
  24034. }), $foreign.defer(function (v) {
  24035. return Data_Bounded.top(dictBounded);
  24036. }));
  24037. };
  24038. var applyLazy = new Control_Apply.Apply(function () {
  24039. return functorLazy;
  24040. }, function (f) {
  24041. return function (x) {
  24042. return $foreign.defer(function (v) {
  24043. return $foreign.force(f)($foreign.force(x));
  24044. });
  24045. };
  24046. });
  24047. var bindLazy = new Control_Bind.Bind(function () {
  24048. return applyLazy;
  24049. }, function (l) {
  24050. return function (f) {
  24051. return $foreign.defer(function (v) {
  24052. return $foreign.force(f($foreign.force(l)));
  24053. });
  24054. };
  24055. });
  24056. var heytingAlgebraLazy = function heytingAlgebraLazy(dictHeytingAlgebra) {
  24057. return new Data_HeytingAlgebra.HeytingAlgebra(function (a) {
  24058. return function (b) {
  24059. return Control_Apply.apply(applyLazy)(Data_Functor.map(functorLazy)(Data_HeytingAlgebra.conj(dictHeytingAlgebra))(a))(b);
  24060. };
  24061. }, function (a) {
  24062. return function (b) {
  24063. return Control_Apply.apply(applyLazy)(Data_Functor.map(functorLazy)(Data_HeytingAlgebra.disj(dictHeytingAlgebra))(a))(b);
  24064. };
  24065. }, $foreign.defer(function (v) {
  24066. return Data_HeytingAlgebra.ff(dictHeytingAlgebra);
  24067. }), function (a) {
  24068. return function (b) {
  24069. return Control_Apply.apply(applyLazy)(Data_Functor.map(functorLazy)(Data_HeytingAlgebra.implies(dictHeytingAlgebra))(a))(b);
  24070. };
  24071. }, function (a) {
  24072. return Data_Functor.map(functorLazy)(Data_HeytingAlgebra.not(dictHeytingAlgebra))(a);
  24073. }, $foreign.defer(function (v) {
  24074. return Data_HeytingAlgebra.tt(dictHeytingAlgebra);
  24075. }));
  24076. };
  24077. var booleanAlgebraLazy = function booleanAlgebraLazy(dictBooleanAlgebra) {
  24078. return new Data_BooleanAlgebra.BooleanAlgebra(function () {
  24079. return heytingAlgebraLazy(dictBooleanAlgebra.HeytingAlgebra0());
  24080. });
  24081. };
  24082. var applicativeLazy = new Control_Applicative.Applicative(function () {
  24083. return applyLazy;
  24084. }, function (a) {
  24085. return $foreign.defer(function (v) {
  24086. return a;
  24087. });
  24088. });
  24089. var monadLazy = new Control_Monad.Monad(function () {
  24090. return applicativeLazy;
  24091. }, function () {
  24092. return bindLazy;
  24093. });
  24094. module.exports = {
  24095. semiringLazy: semiringLazy,
  24096. ringLazy: ringLazy,
  24097. commutativeRingLazy: commutativeRingLazy,
  24098. euclideanRingLazy: euclideanRingLazy,
  24099. eqLazy: eqLazy,
  24100. eq1Lazy: eq1Lazy,
  24101. ordLazy: ordLazy,
  24102. ord1Lazy: ord1Lazy,
  24103. boundedLazy: boundedLazy,
  24104. semigroupLazy: semigroupLazy,
  24105. monoidLazy: monoidLazy,
  24106. heytingAlgebraLazy: heytingAlgebraLazy,
  24107. booleanAlgebraLazy: booleanAlgebraLazy,
  24108. functorLazy: functorLazy,
  24109. functorWithIndexLazy: functorWithIndexLazy,
  24110. foldableLazy: foldableLazy,
  24111. foldableWithIndexLazy: foldableWithIndexLazy,
  24112. foldable1Lazy: foldable1Lazy,
  24113. traversableLazy: traversableLazy,
  24114. traversableWithIndexLazy: traversableWithIndexLazy,
  24115. traversable1Lazy: traversable1Lazy,
  24116. invariantLazy: invariantLazy,
  24117. applyLazy: applyLazy,
  24118. applicativeLazy: applicativeLazy,
  24119. bindLazy: bindLazy,
  24120. monadLazy: monadLazy,
  24121. extendLazy: extendLazy,
  24122. comonadLazy: comonadLazy,
  24123. showLazy: showLazy,
  24124. lazyLazy: lazyLazy,
  24125. defer: $foreign.defer,
  24126. force: $foreign.force
  24127. };
  24128. },{"./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) {
  24129. // Generated by purs version 0.13.6
  24130. "use strict";
  24131. var Control_Alt = require("../Control.Alt/index.js");
  24132. var Control_Alternative = require("../Control.Alternative/index.js");
  24133. var Control_Applicative = require("../Control.Applicative/index.js");
  24134. var Control_Apply = require("../Control.Apply/index.js");
  24135. var Control_Bind = require("../Control.Bind/index.js");
  24136. var Control_Category = require("../Control.Category/index.js");
  24137. var Control_Comonad = require("../Control.Comonad/index.js");
  24138. var Control_Extend = require("../Control.Extend/index.js");
  24139. var Control_Lazy = require("../Control.Lazy/index.js");
  24140. var Control_Monad = require("../Control.Monad/index.js");
  24141. var Control_MonadPlus = require("../Control.MonadPlus/index.js");
  24142. var Control_MonadZero = require("../Control.MonadZero/index.js");
  24143. var Control_Plus = require("../Control.Plus/index.js");
  24144. var Data_Eq = require("../Data.Eq/index.js");
  24145. var Data_Foldable = require("../Data.Foldable/index.js");
  24146. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  24147. var Data_Function = require("../Data.Function/index.js");
  24148. var Data_Functor = require("../Data.Functor/index.js");
  24149. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  24150. var Data_Lazy = require("../Data.Lazy/index.js");
  24151. var Data_Maybe = require("../Data.Maybe/index.js");
  24152. var Data_Monoid = require("../Data.Monoid/index.js");
  24153. var Data_Newtype = require("../Data.Newtype/index.js");
  24154. var Data_NonEmpty = require("../Data.NonEmpty/index.js");
  24155. var Data_Ord = require("../Data.Ord/index.js");
  24156. var Data_Ordering = require("../Data.Ordering/index.js");
  24157. var Data_Semigroup = require("../Data.Semigroup/index.js");
  24158. var Data_Semiring = require("../Data.Semiring/index.js");
  24159. var Data_Show = require("../Data.Show/index.js");
  24160. var Data_Traversable = require("../Data.Traversable/index.js");
  24161. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  24162. var Data_Tuple = require("../Data.Tuple/index.js");
  24163. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  24164. var Data_Unfoldable1 = require("../Data.Unfoldable1/index.js");
  24165. var List = function List(x) {
  24166. return x;
  24167. };
  24168. var Nil = function () {
  24169. function Nil() {}
  24170. ;
  24171. Nil.value = new Nil();
  24172. return Nil;
  24173. }();
  24174. var Cons = function () {
  24175. function Cons(value0, value1) {
  24176. this.value0 = value0;
  24177. this.value1 = value1;
  24178. }
  24179. ;
  24180. Cons.create = function (value0) {
  24181. return function (value1) {
  24182. return new Cons(value0, value1);
  24183. };
  24184. };
  24185. return Cons;
  24186. }();
  24187. var NonEmptyList = function NonEmptyList(x) {
  24188. return x;
  24189. };
  24190. var nil = List(Data_Lazy.defer(function (v) {
  24191. return Nil.value;
  24192. }));
  24193. var newtypeNonEmptyList = new Data_Newtype.Newtype(function (n) {
  24194. return n;
  24195. }, NonEmptyList);
  24196. var newtypeList = new Data_Newtype.Newtype(function (n) {
  24197. return n;
  24198. }, List);
  24199. var step = function () {
  24200. var $215 = Data_Newtype.unwrap(newtypeList);
  24201. return function ($216) {
  24202. return Data_Lazy.force($215($216));
  24203. };
  24204. }();
  24205. var semigroupList = new Data_Semigroup.Semigroup(function (xs) {
  24206. return function (ys) {
  24207. var go = function go(v) {
  24208. if (v instanceof Nil) {
  24209. return step(ys);
  24210. }
  24211. ;
  24212. if (v instanceof Cons) {
  24213. return new Cons(v.value0, Data_Semigroup.append(semigroupList)(v.value1)(ys));
  24214. }
  24215. ;
  24216. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 98, column 5 - line 98, column 21): " + [v.constructor.name]);
  24217. };
  24218. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(newtypeList)(xs));
  24219. };
  24220. });
  24221. var showList = function showList(dictShow) {
  24222. return new Data_Show.Show(function (xs) {
  24223. var go = function go(v) {
  24224. if (v instanceof Nil) {
  24225. return "Nil";
  24226. }
  24227. ;
  24228. if (v instanceof Cons) {
  24229. return "(Cons " + (Data_Show.show(dictShow)(v.value0) + (" " + (go(step(v.value1)) + ")")));
  24230. }
  24231. ;
  24232. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 64, column 5 - line 64, column 19): " + [v.constructor.name]);
  24233. };
  24234. return "fromStrict (" + (go(step(xs)) + ")");
  24235. });
  24236. };
  24237. var showNonEmptyList = function showNonEmptyList(dictShow) {
  24238. return new Data_Show.Show(function (v) {
  24239. return "(NonEmptyList " + (Data_Show.show(Data_Lazy.showLazy(Data_NonEmpty.showNonEmpty(dictShow)(showList(dictShow))))(v) + ")");
  24240. });
  24241. };
  24242. var monoidList = new Data_Monoid.Monoid(function () {
  24243. return semigroupList;
  24244. }, nil);
  24245. var lazyList = new Control_Lazy.Lazy(function (f) {
  24246. return List(Data_Lazy.defer(function ($217) {
  24247. return step(f($217));
  24248. }));
  24249. });
  24250. var functorList = new Data_Functor.Functor(function (f) {
  24251. return function (xs) {
  24252. var go = function go(v) {
  24253. if (v instanceof Nil) {
  24254. return Nil.value;
  24255. }
  24256. ;
  24257. if (v instanceof Cons) {
  24258. return new Cons(f(v.value0), Data_Functor.map(functorList)(f)(v.value1));
  24259. }
  24260. ;
  24261. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 107, column 5 - line 107, column 17): " + [v.constructor.name]);
  24262. };
  24263. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(newtypeList)(xs));
  24264. };
  24265. });
  24266. var functorNonEmptyList = new Data_Functor.Functor(function (f) {
  24267. return function (v) {
  24268. return Data_Functor.map(Data_Lazy.functorLazy)(Data_Functor.map(Data_NonEmpty.functorNonEmpty(functorList))(f))(v);
  24269. };
  24270. });
  24271. var eq1List = new Data_Eq.Eq1(function (dictEq) {
  24272. return function (xs) {
  24273. return function (ys) {
  24274. var go = function go($copy_v) {
  24275. return function ($copy_v1) {
  24276. var $tco_var_v = $copy_v;
  24277. var $tco_done = false;
  24278. var $tco_result;
  24279. function $tco_loop(v, v1) {
  24280. if (v instanceof Nil && v1 instanceof Nil) {
  24281. $tco_done = true;
  24282. return true;
  24283. }
  24284. ;
  24285. if (v instanceof Cons && v1 instanceof Cons && Data_Eq.eq(dictEq)(v.value0)(v1.value0)) {
  24286. $tco_var_v = step(v.value1);
  24287. $copy_v1 = step(v1.value1);
  24288. return;
  24289. }
  24290. ;
  24291. $tco_done = true;
  24292. return false;
  24293. }
  24294. ;
  24295. while (!$tco_done) {
  24296. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  24297. }
  24298. ;
  24299. return $tco_result;
  24300. };
  24301. };
  24302. return go(step(xs))(step(ys));
  24303. };
  24304. };
  24305. });
  24306. var eqList = function eqList(dictEq) {
  24307. return new Data_Eq.Eq(Data_Eq.eq1(eq1List)(dictEq));
  24308. };
  24309. var eqNonEmptyList = function eqNonEmptyList(dictEq) {
  24310. return Data_Lazy.eqLazy(Data_NonEmpty.eqNonEmpty(eq1List)(dictEq));
  24311. };
  24312. var ord1List = new Data_Ord.Ord1(function () {
  24313. return eq1List;
  24314. }, function (dictOrd) {
  24315. return function (xs) {
  24316. return function (ys) {
  24317. var go = function go($copy_v) {
  24318. return function ($copy_v1) {
  24319. var $tco_var_v = $copy_v;
  24320. var $tco_done = false;
  24321. var $tco_result;
  24322. function $tco_loop(v, v1) {
  24323. if (v instanceof Nil && v1 instanceof Nil) {
  24324. $tco_done = true;
  24325. return Data_Ordering.EQ.value;
  24326. }
  24327. ;
  24328. if (v instanceof Nil) {
  24329. $tco_done = true;
  24330. return Data_Ordering.LT.value;
  24331. }
  24332. ;
  24333. if (v1 instanceof Nil) {
  24334. $tco_done = true;
  24335. return Data_Ordering.GT.value;
  24336. }
  24337. ;
  24338. if (v instanceof Cons && v1 instanceof Cons) {
  24339. var v2 = Data_Ord.compare(dictOrd)(v.value0)(v1.value0);
  24340. if (v2 instanceof Data_Ordering.EQ) {
  24341. $tco_var_v = step(v.value1);
  24342. $copy_v1 = step(v1.value1);
  24343. return;
  24344. }
  24345. ;
  24346. $tco_done = true;
  24347. return v2;
  24348. }
  24349. ;
  24350. 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]);
  24351. }
  24352. ;
  24353. while (!$tco_done) {
  24354. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  24355. }
  24356. ;
  24357. return $tco_result;
  24358. };
  24359. };
  24360. return go(step(xs))(step(ys));
  24361. };
  24362. };
  24363. });
  24364. var ordList = function ordList(dictOrd) {
  24365. return new Data_Ord.Ord(function () {
  24366. return eqList(dictOrd.Eq0());
  24367. }, Data_Ord.compare1(ord1List)(dictOrd));
  24368. };
  24369. var ordNonEmptyList = function ordNonEmptyList(dictOrd) {
  24370. return Data_Lazy.ordLazy(Data_NonEmpty.ordNonEmpty(ord1List)(dictOrd));
  24371. };
  24372. var cons = function cons(x) {
  24373. return function (xs) {
  24374. return List(Data_Lazy.defer(function (v) {
  24375. return new Cons(x, xs);
  24376. }));
  24377. };
  24378. };
  24379. var foldableList = new Data_Foldable.Foldable(function (dictMonoid) {
  24380. return function (f) {
  24381. return Data_Foldable.foldl(foldableList)(function (b) {
  24382. return function (a) {
  24383. return Data_Semigroup.append(dictMonoid.Semigroup0())(b)(f(a));
  24384. };
  24385. })(Data_Monoid.mempty(dictMonoid));
  24386. };
  24387. }, function (op) {
  24388. var go = function go($copy_b) {
  24389. return function ($copy_xs) {
  24390. var $tco_var_b = $copy_b;
  24391. var $tco_done = false;
  24392. var $tco_result;
  24393. function $tco_loop(b, xs) {
  24394. var v = step(xs);
  24395. if (v instanceof Nil) {
  24396. $tco_done = true;
  24397. return b;
  24398. }
  24399. ;
  24400. if (v instanceof Cons) {
  24401. $tco_var_b = op(b)(v.value0);
  24402. $copy_xs = v.value1;
  24403. return;
  24404. }
  24405. ;
  24406. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 122, column 7 - line 124, column 40): " + [v.constructor.name]);
  24407. }
  24408. ;
  24409. while (!$tco_done) {
  24410. $tco_result = $tco_loop($tco_var_b, $copy_xs);
  24411. }
  24412. ;
  24413. return $tco_result;
  24414. };
  24415. };
  24416. return go;
  24417. }, function (op) {
  24418. return function (z) {
  24419. return function (xs) {
  24420. var rev = Data_Foldable.foldl(foldableList)(Data_Function.flip(cons))(nil);
  24421. return Data_Foldable.foldl(foldableList)(Data_Function.flip(op))(z)(rev(xs));
  24422. };
  24423. };
  24424. });
  24425. var extendList = new Control_Extend.Extend(function () {
  24426. return functorList;
  24427. }, function (f) {
  24428. return function (l) {
  24429. var go = function go(a) {
  24430. return function (v) {
  24431. var acc$prime = cons(a)(v.acc);
  24432. return {
  24433. val: cons(f(acc$prime))(v.val),
  24434. acc: acc$prime
  24435. };
  24436. };
  24437. };
  24438. var v = step(l);
  24439. if (v instanceof Nil) {
  24440. return nil;
  24441. }
  24442. ;
  24443. if (v instanceof Cons) {
  24444. return cons(f(l))(Data_Foldable.foldr(foldableList)(go)({
  24445. val: nil,
  24446. acc: nil
  24447. })(v.value1).val);
  24448. }
  24449. ;
  24450. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 194, column 5 - line 197, column 55): " + [v.constructor.name]);
  24451. };
  24452. });
  24453. var extendNonEmptyList = new Control_Extend.Extend(function () {
  24454. return functorNonEmptyList;
  24455. }, function (f) {
  24456. return function (v) {
  24457. var go = function go(a) {
  24458. return function (v1) {
  24459. return {
  24460. val: cons(f(Data_Lazy.defer(function (v2) {
  24461. return new Data_NonEmpty.NonEmpty(a, v1.acc);
  24462. })))(v1.val),
  24463. acc: cons(a)(v1.acc)
  24464. };
  24465. };
  24466. };
  24467. var v1 = Data_Lazy.force(v);
  24468. return NonEmptyList(Data_Lazy.defer(function (v2) {
  24469. return new Data_NonEmpty.NonEmpty(f(v), Data_Foldable.foldr(foldableList)(go)({
  24470. val: nil,
  24471. acc: nil
  24472. })(v1.value1).val);
  24473. }));
  24474. };
  24475. });
  24476. var foldableNonEmptyList = new Data_Foldable.Foldable(function (dictMonoid) {
  24477. return function (f) {
  24478. return function (v) {
  24479. return Data_Foldable.foldMap(Data_NonEmpty.foldableNonEmpty(foldableList))(dictMonoid)(f)(Data_Lazy.force(v));
  24480. };
  24481. };
  24482. }, function (f) {
  24483. return function (b) {
  24484. return function (v) {
  24485. return Data_Foldable.foldl(Data_NonEmpty.foldableNonEmpty(foldableList))(f)(b)(Data_Lazy.force(v));
  24486. };
  24487. };
  24488. }, function (f) {
  24489. return function (b) {
  24490. return function (v) {
  24491. return Data_Foldable.foldr(Data_NonEmpty.foldableNonEmpty(foldableList))(f)(b)(Data_Lazy.force(v));
  24492. };
  24493. };
  24494. });
  24495. var foldableWithIndexList = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  24496. return foldableList;
  24497. }, function (dictMonoid) {
  24498. return function (f) {
  24499. return Data_FoldableWithIndex.foldlWithIndex(foldableWithIndexList)(function (i) {
  24500. return function (acc) {
  24501. var $218 = Data_Semigroup.append(dictMonoid.Semigroup0())(acc);
  24502. var $219 = f(i);
  24503. return function ($220) {
  24504. return $218($219($220));
  24505. };
  24506. };
  24507. })(Data_Monoid.mempty(dictMonoid));
  24508. };
  24509. }, function (f) {
  24510. return function (acc) {
  24511. var $221 = Data_Foldable.foldl(foldableList)(function (v) {
  24512. return function (a) {
  24513. return new Data_Tuple.Tuple(v.value0 + 1 | 0, f(v.value0)(v.value1)(a));
  24514. };
  24515. })(new Data_Tuple.Tuple(0, acc));
  24516. return function ($222) {
  24517. return Data_Tuple.snd($221($222));
  24518. };
  24519. };
  24520. }, function (f) {
  24521. return function (b) {
  24522. return function (xs) {
  24523. var v = function () {
  24524. var rev = Data_Foldable.foldl(foldableList)(function (v1) {
  24525. return function (a) {
  24526. return new Data_Tuple.Tuple(v1.value0 + 1 | 0, cons(a)(v1.value1));
  24527. };
  24528. });
  24529. return rev(new Data_Tuple.Tuple(0, nil))(xs);
  24530. }();
  24531. return Data_Tuple.snd(Data_Foldable.foldl(foldableList)(function (v1) {
  24532. return function (a) {
  24533. return new Data_Tuple.Tuple(v1.value0 - 1 | 0, f(v1.value0 - 1 | 0)(a)(v1.value1));
  24534. };
  24535. })(new Data_Tuple.Tuple(v.value0, b))(v.value1));
  24536. };
  24537. };
  24538. });
  24539. var foldableWithIndexNonEmptyList = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  24540. return foldableNonEmptyList;
  24541. }, function (dictMonoid) {
  24542. return function (f) {
  24543. return function (v) {
  24544. return Data_FoldableWithIndex.foldMapWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(dictMonoid)(function () {
  24545. var $223 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  24546. return function ($224) {
  24547. return f($223($224));
  24548. };
  24549. }())(Data_Lazy.force(v));
  24550. };
  24551. };
  24552. }, function (f) {
  24553. return function (b) {
  24554. return function (v) {
  24555. return Data_FoldableWithIndex.foldlWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () {
  24556. var $225 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  24557. return function ($226) {
  24558. return f($225($226));
  24559. };
  24560. }())(b)(Data_Lazy.force(v));
  24561. };
  24562. };
  24563. }, function (f) {
  24564. return function (b) {
  24565. return function (v) {
  24566. return Data_FoldableWithIndex.foldrWithIndex(Data_NonEmpty.foldableWithIndexNonEmpty(foldableWithIndexList))(function () {
  24567. var $227 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  24568. return function ($228) {
  24569. return f($227($228));
  24570. };
  24571. }())(b)(Data_Lazy.force(v));
  24572. };
  24573. };
  24574. });
  24575. var functorWithIndexList = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  24576. return functorList;
  24577. }, function (f) {
  24578. return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexList)(function (i) {
  24579. return function (x) {
  24580. return function (acc) {
  24581. return cons(f(i)(x))(acc);
  24582. };
  24583. };
  24584. })(nil);
  24585. });
  24586. var functorWithIndexNonEmptyList = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  24587. return functorNonEmptyList;
  24588. }, function (f) {
  24589. return function (v) {
  24590. return NonEmptyList(Data_Lazy.defer(function (v1) {
  24591. return Data_FunctorWithIndex.mapWithIndex(Data_NonEmpty.functorWithIndex(functorWithIndexList))(function () {
  24592. var $229 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  24593. return function ($230) {
  24594. return f($229($230));
  24595. };
  24596. }())(Data_Lazy.force(v));
  24597. }));
  24598. };
  24599. });
  24600. var toList = function toList(v) {
  24601. return Control_Lazy.defer(lazyList)(function (v1) {
  24602. var v2 = Data_Lazy.force(v);
  24603. return cons(v2.value0)(v2.value1);
  24604. });
  24605. };
  24606. var semigroupNonEmptyList = new Data_Semigroup.Semigroup(function (v) {
  24607. return function (as$prime) {
  24608. var v1 = Data_Lazy.force(v);
  24609. return Data_Lazy.defer(function (v2) {
  24610. return new Data_NonEmpty.NonEmpty(v1.value0, Data_Semigroup.append(semigroupList)(v1.value1)(toList(as$prime)));
  24611. });
  24612. };
  24613. });
  24614. var traversableList = new Data_Traversable.Traversable(function () {
  24615. return foldableList;
  24616. }, function () {
  24617. return functorList;
  24618. }, function (dictApplicative) {
  24619. return Data_Traversable.traverse(traversableList)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
  24620. }, function (dictApplicative) {
  24621. return function (f) {
  24622. return Data_Foldable.foldr(foldableList)(function (a) {
  24623. return function (b) {
  24624. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(cons)(f(a)))(b);
  24625. };
  24626. })(Control_Applicative.pure(dictApplicative)(nil));
  24627. };
  24628. });
  24629. var traversableNonEmptyList = new Data_Traversable.Traversable(function () {
  24630. return foldableNonEmptyList;
  24631. }, function () {
  24632. return functorNonEmptyList;
  24633. }, function (dictApplicative) {
  24634. return function (v) {
  24635. return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (xxs) {
  24636. return NonEmptyList(Data_Lazy.defer(function (v1) {
  24637. return xxs;
  24638. }));
  24639. })(Data_Traversable.sequence(Data_NonEmpty.traversableNonEmpty(traversableList))(dictApplicative)(Data_Lazy.force(v)));
  24640. };
  24641. }, function (dictApplicative) {
  24642. return function (f) {
  24643. return function (v) {
  24644. return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (xxs) {
  24645. return NonEmptyList(Data_Lazy.defer(function (v1) {
  24646. return xxs;
  24647. }));
  24648. })(Data_Traversable.traverse(Data_NonEmpty.traversableNonEmpty(traversableList))(dictApplicative)(f)(Data_Lazy.force(v)));
  24649. };
  24650. };
  24651. });
  24652. var traversableWithIndexList = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  24653. return foldableWithIndexList;
  24654. }, function () {
  24655. return functorWithIndexList;
  24656. }, function () {
  24657. return traversableList;
  24658. }, function (dictApplicative) {
  24659. return function (f) {
  24660. return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexList)(function (i) {
  24661. return function (a) {
  24662. return function (b) {
  24663. return Control_Apply.apply(dictApplicative.Apply0())(Data_Functor.map(dictApplicative.Apply0().Functor0())(cons)(f(i)(a)))(b);
  24664. };
  24665. };
  24666. })(Control_Applicative.pure(dictApplicative)(nil));
  24667. };
  24668. });
  24669. var traversableWithIndexNonEmptyList = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  24670. return foldableWithIndexNonEmptyList;
  24671. }, function () {
  24672. return functorWithIndexNonEmptyList;
  24673. }, function () {
  24674. return traversableNonEmptyList;
  24675. }, function (dictApplicative) {
  24676. return function (f) {
  24677. return function (v) {
  24678. return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (xxs) {
  24679. return NonEmptyList(Data_Lazy.defer(function (v1) {
  24680. return xxs;
  24681. }));
  24682. })(Data_TraversableWithIndex.traverseWithIndex(Data_NonEmpty.traversableWithIndexNonEmpty(traversableWithIndexList))(dictApplicative)(function () {
  24683. var $231 = Data_Maybe.maybe(0)(Data_Semiring.add(Data_Semiring.semiringInt)(1));
  24684. return function ($232) {
  24685. return f($231($232));
  24686. };
  24687. }())(Data_Lazy.force(v)));
  24688. };
  24689. };
  24690. });
  24691. var unfoldable1List = new Data_Unfoldable1.Unfoldable1(function () {
  24692. var go = function go(f) {
  24693. return function (b) {
  24694. return Control_Lazy.defer(lazyList)(function (v) {
  24695. var v1 = f(b);
  24696. if (v1.value1 instanceof Data_Maybe.Just) {
  24697. return cons(v1.value0)(go(f)(v1.value1.value0));
  24698. }
  24699. ;
  24700. if (v1.value1 instanceof Data_Maybe.Nothing) {
  24701. return cons(v1.value0)(nil);
  24702. }
  24703. ;
  24704. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 146, column 28 - line 148, column 33): " + [v1.constructor.name]);
  24705. });
  24706. };
  24707. };
  24708. return go;
  24709. }());
  24710. var unfoldableList = new Data_Unfoldable.Unfoldable(function () {
  24711. return unfoldable1List;
  24712. }, function () {
  24713. var go = function go(f) {
  24714. return function (b) {
  24715. return Control_Lazy.defer(lazyList)(function (v) {
  24716. var v1 = f(b);
  24717. if (v1 instanceof Data_Maybe.Nothing) {
  24718. return nil;
  24719. }
  24720. ;
  24721. if (v1 instanceof Data_Maybe.Just) {
  24722. return cons(v1.value0.value0)(go(f)(v1.value0.value1));
  24723. }
  24724. ;
  24725. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 152, column 28 - line 154, column 39): " + [v1.constructor.name]);
  24726. });
  24727. };
  24728. };
  24729. return go;
  24730. }());
  24731. var unfoldable1NonEmptyList = new Data_Unfoldable1.Unfoldable1(function (f) {
  24732. return function (b) {
  24733. return NonEmptyList(Data_Lazy.defer(function (v) {
  24734. return Data_Unfoldable1.unfoldr1(Data_NonEmpty.unfoldable1NonEmpty(unfoldableList))(f)(b);
  24735. }));
  24736. };
  24737. });
  24738. var comonadNonEmptyList = new Control_Comonad.Comonad(function () {
  24739. return extendNonEmptyList;
  24740. }, function (v) {
  24741. return Data_NonEmpty.head(Data_Lazy.force(v));
  24742. });
  24743. var monadList = new Control_Monad.Monad(function () {
  24744. return applicativeList;
  24745. }, function () {
  24746. return bindList;
  24747. });
  24748. var bindList = new Control_Bind.Bind(function () {
  24749. return applyList;
  24750. }, function (xs) {
  24751. return function (f) {
  24752. var go = function go(v) {
  24753. if (v instanceof Nil) {
  24754. return Nil.value;
  24755. }
  24756. ;
  24757. if (v instanceof Cons) {
  24758. return step(Data_Semigroup.append(semigroupList)(f(v.value0))(Control_Bind.bind(bindList)(v.value1)(f)));
  24759. }
  24760. ;
  24761. throw new Error("Failed pattern match at Data.List.Lazy.Types (line 175, column 5 - line 175, column 17): " + [v.constructor.name]);
  24762. };
  24763. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(newtypeList)(xs));
  24764. };
  24765. });
  24766. var applyList = new Control_Apply.Apply(function () {
  24767. return functorList;
  24768. }, Control_Monad.ap(monadList));
  24769. var applicativeList = new Control_Applicative.Applicative(function () {
  24770. return applyList;
  24771. }, function (a) {
  24772. return cons(a)(nil);
  24773. });
  24774. var applyNonEmptyList = new Control_Apply.Apply(function () {
  24775. return functorNonEmptyList;
  24776. }, function (v) {
  24777. return function (v1) {
  24778. var v2 = Data_Lazy.force(v1);
  24779. var v3 = Data_Lazy.force(v);
  24780. return Data_Lazy.defer(function (v4) {
  24781. 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)));
  24782. });
  24783. };
  24784. });
  24785. var bindNonEmptyList = new Control_Bind.Bind(function () {
  24786. return applyNonEmptyList;
  24787. }, function (v) {
  24788. return function (f) {
  24789. var v1 = Data_Lazy.force(v);
  24790. var v2 = Data_Lazy.force(Data_Newtype.unwrap(newtypeNonEmptyList)(f(v1.value0)));
  24791. return Data_Lazy.defer(function (v3) {
  24792. return new Data_NonEmpty.NonEmpty(v2.value0, Data_Semigroup.append(semigroupList)(v2.value1)(Control_Bind.bind(bindList)(v1.value1)(function ($233) {
  24793. return toList(f($233));
  24794. })));
  24795. });
  24796. };
  24797. });
  24798. var altNonEmptyList = new Control_Alt.Alt(function () {
  24799. return functorNonEmptyList;
  24800. }, Data_Semigroup.append(semigroupNonEmptyList));
  24801. var altList = new Control_Alt.Alt(function () {
  24802. return functorList;
  24803. }, Data_Semigroup.append(semigroupList));
  24804. var plusList = new Control_Plus.Plus(function () {
  24805. return altList;
  24806. }, nil);
  24807. var alternativeList = new Control_Alternative.Alternative(function () {
  24808. return applicativeList;
  24809. }, function () {
  24810. return plusList;
  24811. });
  24812. var monadZeroList = new Control_MonadZero.MonadZero(function () {
  24813. return alternativeList;
  24814. }, function () {
  24815. return monadList;
  24816. });
  24817. var monadPlusList = new Control_MonadPlus.MonadPlus(function () {
  24818. return monadZeroList;
  24819. });
  24820. var applicativeNonEmptyList = new Control_Applicative.Applicative(function () {
  24821. return applyNonEmptyList;
  24822. }, function (a) {
  24823. return Data_Lazy.defer(function (v) {
  24824. return Data_NonEmpty.singleton(plusList)(a);
  24825. });
  24826. });
  24827. var monadNonEmptyList = new Control_Monad.Monad(function () {
  24828. return applicativeNonEmptyList;
  24829. }, function () {
  24830. return bindNonEmptyList;
  24831. });
  24832. module.exports = {
  24833. List: List,
  24834. Nil: Nil,
  24835. Cons: Cons,
  24836. step: step,
  24837. nil: nil,
  24838. cons: cons,
  24839. NonEmptyList: NonEmptyList,
  24840. toList: toList,
  24841. newtypeList: newtypeList,
  24842. showList: showList,
  24843. eqList: eqList,
  24844. eq1List: eq1List,
  24845. ordList: ordList,
  24846. ord1List: ord1List,
  24847. lazyList: lazyList,
  24848. semigroupList: semigroupList,
  24849. monoidList: monoidList,
  24850. functorList: functorList,
  24851. functorWithIndexList: functorWithIndexList,
  24852. foldableList: foldableList,
  24853. foldableWithIndexList: foldableWithIndexList,
  24854. unfoldable1List: unfoldable1List,
  24855. unfoldableList: unfoldableList,
  24856. traversableList: traversableList,
  24857. traversableWithIndexList: traversableWithIndexList,
  24858. applyList: applyList,
  24859. applicativeList: applicativeList,
  24860. bindList: bindList,
  24861. monadList: monadList,
  24862. altList: altList,
  24863. plusList: plusList,
  24864. alternativeList: alternativeList,
  24865. monadZeroList: monadZeroList,
  24866. monadPlusList: monadPlusList,
  24867. extendList: extendList,
  24868. newtypeNonEmptyList: newtypeNonEmptyList,
  24869. eqNonEmptyList: eqNonEmptyList,
  24870. ordNonEmptyList: ordNonEmptyList,
  24871. showNonEmptyList: showNonEmptyList,
  24872. functorNonEmptyList: functorNonEmptyList,
  24873. applyNonEmptyList: applyNonEmptyList,
  24874. applicativeNonEmptyList: applicativeNonEmptyList,
  24875. bindNonEmptyList: bindNonEmptyList,
  24876. monadNonEmptyList: monadNonEmptyList,
  24877. altNonEmptyList: altNonEmptyList,
  24878. extendNonEmptyList: extendNonEmptyList,
  24879. comonadNonEmptyList: comonadNonEmptyList,
  24880. semigroupNonEmptyList: semigroupNonEmptyList,
  24881. foldableNonEmptyList: foldableNonEmptyList,
  24882. traversableNonEmptyList: traversableNonEmptyList,
  24883. unfoldable1NonEmptyList: unfoldable1NonEmptyList,
  24884. functorWithIndexNonEmptyList: functorWithIndexNonEmptyList,
  24885. foldableWithIndexNonEmptyList: foldableWithIndexNonEmptyList,
  24886. traversableWithIndexNonEmptyList: traversableWithIndexNonEmptyList
  24887. };
  24888. },{"../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) {
  24889. // Generated by purs version 0.13.6
  24890. "use strict";
  24891. var Control_Alt = require("../Control.Alt/index.js");
  24892. var Control_Applicative = require("../Control.Applicative/index.js");
  24893. var Control_Apply = require("../Control.Apply/index.js");
  24894. var Control_Bind = require("../Control.Bind/index.js");
  24895. var Control_Category = require("../Control.Category/index.js");
  24896. var Control_Lazy = require("../Control.Lazy/index.js");
  24897. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  24898. var Data_Boolean = require("../Data.Boolean/index.js");
  24899. var Data_Eq = require("../Data.Eq/index.js");
  24900. var Data_Foldable = require("../Data.Foldable/index.js");
  24901. var Data_Function = require("../Data.Function/index.js");
  24902. var Data_Functor = require("../Data.Functor/index.js");
  24903. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  24904. var Data_Lazy = require("../Data.Lazy/index.js");
  24905. var Data_List_Lazy_Types = require("../Data.List.Lazy.Types/index.js");
  24906. var Data_Maybe = require("../Data.Maybe/index.js");
  24907. var Data_Newtype = require("../Data.Newtype/index.js");
  24908. var Data_NonEmpty = require("../Data.NonEmpty/index.js");
  24909. var Data_Ord = require("../Data.Ord/index.js");
  24910. var Data_Ordering = require("../Data.Ordering/index.js");
  24911. var Data_Semigroup = require("../Data.Semigroup/index.js");
  24912. var Data_Show = require("../Data.Show/index.js");
  24913. var Data_Traversable = require("../Data.Traversable/index.js");
  24914. var Data_Tuple = require("../Data.Tuple/index.js");
  24915. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  24916. var Pattern = function Pattern(x) {
  24917. return x;
  24918. };
  24919. var zipWith = function zipWith(f) {
  24920. return function (xs) {
  24921. return function (ys) {
  24922. var go = function go(v) {
  24923. return function (v1) {
  24924. if (v instanceof Data_List_Lazy_Types.Nil) {
  24925. return Data_List_Lazy_Types.Nil.value;
  24926. }
  24927. ;
  24928. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  24929. return Data_List_Lazy_Types.Nil.value;
  24930. }
  24931. ;
  24932. if (v instanceof Data_List_Lazy_Types.Cons && v1 instanceof Data_List_Lazy_Types.Cons) {
  24933. return new Data_List_Lazy_Types.Cons(f(v.value0)(v1.value0), zipWith(f)(v.value1)(v1.value1));
  24934. }
  24935. ;
  24936. throw new Error("Failed pattern match at Data.List.Lazy (line 693, column 3 - line 693, column 35): " + [v.constructor.name, v1.constructor.name]);
  24937. };
  24938. };
  24939. 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));
  24940. };
  24941. };
  24942. };
  24943. var zipWithA = function zipWithA(dictApplicative) {
  24944. return function (f) {
  24945. return function (xs) {
  24946. return function (ys) {
  24947. return Data_Traversable.sequence(Data_List_Lazy_Types.traversableList)(dictApplicative)(zipWith(f)(xs)(ys));
  24948. };
  24949. };
  24950. };
  24951. };
  24952. var zip = zipWith(Data_Tuple.Tuple.create);
  24953. var updateAt = function updateAt(n) {
  24954. return function (x) {
  24955. return function (xs) {
  24956. var go = function go(v) {
  24957. return function (v1) {
  24958. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  24959. return Data_List_Lazy_Types.Nil.value;
  24960. }
  24961. ;
  24962. if (v === 0 && v1 instanceof Data_List_Lazy_Types.Cons) {
  24963. return new Data_List_Lazy_Types.Cons(x, v1.value1);
  24964. }
  24965. ;
  24966. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  24967. return new Data_List_Lazy_Types.Cons(v1.value0, updateAt(v - 1 | 0)(x)(v1.value1));
  24968. }
  24969. ;
  24970. throw new Error("Failed pattern match at Data.List.Lazy (line 367, column 3 - line 367, column 17): " + [v.constructor.name, v1.constructor.name]);
  24971. };
  24972. };
  24973. return Data_Functor.map(Data_Lazy.functorLazy)(go(n))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  24974. };
  24975. };
  24976. };
  24977. var unzip = Data_Foldable.foldr(Data_List_Lazy_Types.foldableList)(function (v) {
  24978. return function (v1) {
  24979. return new Data_Tuple.Tuple(Data_List_Lazy_Types.cons(v.value0)(v1.value0), Data_List_Lazy_Types.cons(v.value1)(v1.value1));
  24980. };
  24981. })(new Data_Tuple.Tuple(Data_List_Lazy_Types.nil, Data_List_Lazy_Types.nil));
  24982. var uncons = function uncons(xs) {
  24983. var v = Data_List_Lazy_Types.step(xs);
  24984. if (v instanceof Data_List_Lazy_Types.Nil) {
  24985. return Data_Maybe.Nothing.value;
  24986. }
  24987. ;
  24988. if (v instanceof Data_List_Lazy_Types.Cons) {
  24989. return new Data_Maybe.Just({
  24990. head: v.value0,
  24991. tail: v.value1
  24992. });
  24993. }
  24994. ;
  24995. throw new Error("Failed pattern match at Data.List.Lazy (line 285, column 13 - line 287, column 44): " + [v.constructor.name]);
  24996. };
  24997. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  24998. return Data_Unfoldable.unfoldr(dictUnfoldable)(function (xs) {
  24999. return Data_Functor.map(Data_Maybe.functorMaybe)(function (rec) {
  25000. return new Data_Tuple.Tuple(rec.head, rec.tail);
  25001. })(uncons(xs));
  25002. });
  25003. };
  25004. var takeWhile = function takeWhile(p) {
  25005. var go = function go(v) {
  25006. if (v instanceof Data_List_Lazy_Types.Cons && p(v.value0)) {
  25007. return new Data_List_Lazy_Types.Cons(v.value0, takeWhile(p)(v.value1));
  25008. }
  25009. ;
  25010. return Data_List_Lazy_Types.Nil.value;
  25011. };
  25012. var $239 = Data_Functor.map(Data_Lazy.functorLazy)(go);
  25013. var $240 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  25014. return function ($241) {
  25015. return Data_List_Lazy_Types.List($239($240($241)));
  25016. };
  25017. };
  25018. var take = function take(n) {
  25019. var go = function go(v) {
  25020. return function (v1) {
  25021. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  25022. return Data_List_Lazy_Types.Nil.value;
  25023. }
  25024. ;
  25025. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  25026. return new Data_List_Lazy_Types.Cons(v1.value0, take(v - 1 | 0)(v1.value1));
  25027. }
  25028. ;
  25029. throw new Error("Failed pattern match at Data.List.Lazy (line 517, column 3 - line 517, column 32): " + [v.constructor.name, v1.constructor.name]);
  25030. };
  25031. };
  25032. var $119 = n <= 0;
  25033. if ($119) {
  25034. return Data_Function["const"](Data_List_Lazy_Types.nil);
  25035. }
  25036. ;
  25037. var $242 = Data_Functor.map(Data_Lazy.functorLazy)(go(n));
  25038. var $243 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  25039. return function ($244) {
  25040. return Data_List_Lazy_Types.List($242($243($244)));
  25041. };
  25042. };
  25043. var tail = function tail(xs) {
  25044. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
  25045. return v.tail;
  25046. })(uncons(xs));
  25047. };
  25048. var stripPrefix = function stripPrefix(dictEq) {
  25049. return function (v) {
  25050. return function (s) {
  25051. var go = function go(prefix) {
  25052. return function (input) {
  25053. var v1 = Data_List_Lazy_Types.step(prefix);
  25054. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  25055. return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Done(input));
  25056. }
  25057. ;
  25058. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  25059. var v2 = Data_List_Lazy_Types.step(input);
  25060. if (v2 instanceof Data_List_Lazy_Types.Cons && Data_Eq.eq(dictEq)(v1.value0)(v2.value0)) {
  25061. return Data_Maybe.Just.create(new Control_Monad_Rec_Class.Loop({
  25062. a: v1.value1,
  25063. b: v2.value1
  25064. }));
  25065. }
  25066. ;
  25067. return Data_Maybe.Nothing.value;
  25068. }
  25069. ;
  25070. throw new Error("Failed pattern match at Data.List.Lazy (line 499, column 21 - line 503, column 19): " + [v1.constructor.name]);
  25071. };
  25072. };
  25073. return Control_Monad_Rec_Class.tailRecM2(Control_Monad_Rec_Class.monadRecMaybe)(go)(v)(s);
  25074. };
  25075. };
  25076. };
  25077. var span = function span(p) {
  25078. return function (xs) {
  25079. var v = uncons(xs);
  25080. if (v instanceof Data_Maybe.Just && p(v.value0.head)) {
  25081. var v1 = span(p)(v.value0.tail);
  25082. return {
  25083. init: Data_List_Lazy_Types.cons(v.value0.head)(v1.init),
  25084. rest: v1.rest
  25085. };
  25086. }
  25087. ;
  25088. return {
  25089. init: Data_List_Lazy_Types.nil,
  25090. rest: xs
  25091. };
  25092. };
  25093. };
  25094. var snoc = function snoc(xs) {
  25095. return function (x) {
  25096. 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);
  25097. };
  25098. };
  25099. var singleton = function singleton(a) {
  25100. return Data_List_Lazy_Types.cons(a)(Data_List_Lazy_Types.nil);
  25101. };
  25102. var showPattern = function showPattern(dictShow) {
  25103. return new Data_Show.Show(function (v) {
  25104. return "(Pattern " + (Data_Show.show(Data_List_Lazy_Types.showList(dictShow))(v) + ")");
  25105. });
  25106. };
  25107. var scanrLazy = function scanrLazy(f) {
  25108. return function (acc) {
  25109. return function (xs) {
  25110. var go = function go(v) {
  25111. if (v instanceof Data_List_Lazy_Types.Nil) {
  25112. return Data_List_Lazy_Types.Nil.value;
  25113. }
  25114. ;
  25115. if (v instanceof Data_List_Lazy_Types.Cons) {
  25116. var acc$prime = f(v.value0)(acc);
  25117. return Data_List_Lazy_Types.Cons.create(acc$prime)(scanrLazy(f)(acc$prime)(v.value1));
  25118. }
  25119. ;
  25120. throw new Error("Failed pattern match at Data.List.Lazy (line 764, column 5 - line 764, column 27): " + [v.constructor.name]);
  25121. };
  25122. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  25123. };
  25124. };
  25125. };
  25126. var reverse = function reverse(xs) {
  25127. return Control_Lazy.defer(Data_List_Lazy_Types.lazyList)(function (v) {
  25128. return Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(Data_Function.flip(Data_List_Lazy_Types.cons))(Data_List_Lazy_Types.nil)(xs);
  25129. });
  25130. };
  25131. var replicateM = function replicateM(dictMonad) {
  25132. return function (n) {
  25133. return function (m) {
  25134. if (n < 1) {
  25135. return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Lazy_Types.nil);
  25136. }
  25137. ;
  25138. if (Data_Boolean.otherwise) {
  25139. return Control_Bind.bind(dictMonad.Bind1())(m)(function (a) {
  25140. return Control_Bind.bind(dictMonad.Bind1())(replicateM(dictMonad)(n - 1 | 0)(m))(function (as) {
  25141. return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Lazy_Types.cons(a)(as));
  25142. });
  25143. });
  25144. }
  25145. ;
  25146. throw new Error("Failed pattern match at Data.List.Lazy (line 161, column 1 - line 161, column 62): " + [n.constructor.name, m.constructor.name]);
  25147. };
  25148. };
  25149. };
  25150. var repeat = function repeat(x) {
  25151. return Control_Lazy.fix(Data_List_Lazy_Types.lazyList)(function (xs) {
  25152. return Data_List_Lazy_Types.cons(x)(xs);
  25153. });
  25154. };
  25155. var replicate = function replicate(i) {
  25156. return function (xs) {
  25157. return take(i)(repeat(xs));
  25158. };
  25159. };
  25160. var range = function range(start) {
  25161. return function (end) {
  25162. if (start > end) {
  25163. var g = function g(x) {
  25164. if (x >= end) {
  25165. return new Data_Maybe.Just(new Data_Tuple.Tuple(x, x - 1 | 0));
  25166. }
  25167. ;
  25168. if (Data_Boolean.otherwise) {
  25169. return Data_Maybe.Nothing.value;
  25170. }
  25171. ;
  25172. throw new Error("Failed pattern match at Data.List.Lazy (line 148, column 13 - line 149, column 38): " + [x.constructor.name]);
  25173. };
  25174. return Data_Unfoldable.unfoldr(Data_List_Lazy_Types.unfoldableList)(g)(start);
  25175. }
  25176. ;
  25177. if (Data_Boolean.otherwise) {
  25178. var f = function f(x) {
  25179. if (x <= end) {
  25180. return new Data_Maybe.Just(new Data_Tuple.Tuple(x, x + 1 | 0));
  25181. }
  25182. ;
  25183. if (Data_Boolean.otherwise) {
  25184. return Data_Maybe.Nothing.value;
  25185. }
  25186. ;
  25187. throw new Error("Failed pattern match at Data.List.Lazy (line 153, column 5 - line 154, column 30): " + [x.constructor.name]);
  25188. };
  25189. return Data_Unfoldable.unfoldr(Data_List_Lazy_Types.unfoldableList)(f)(start);
  25190. }
  25191. ;
  25192. throw new Error("Failed pattern match at Data.List.Lazy (line 145, column 1 - line 145, column 32): " + [start.constructor.name, end.constructor.name]);
  25193. };
  25194. };
  25195. var partition = function partition(f) {
  25196. var go = function go(x) {
  25197. return function (v) {
  25198. var $147 = f(x);
  25199. if ($147) {
  25200. return {
  25201. yes: Data_List_Lazy_Types.cons(x)(v.yes),
  25202. no: v.no
  25203. };
  25204. }
  25205. ;
  25206. return {
  25207. yes: v.yes,
  25208. no: Data_List_Lazy_Types.cons(x)(v.no)
  25209. };
  25210. };
  25211. };
  25212. return Data_Foldable.foldr(Data_List_Lazy_Types.foldableList)(go)({
  25213. yes: Data_List_Lazy_Types.nil,
  25214. no: Data_List_Lazy_Types.nil
  25215. });
  25216. };
  25217. var $$null = function $$null($245) {
  25218. return Data_Maybe.isNothing(uncons($245));
  25219. };
  25220. var newtypePattern = new Data_Newtype.Newtype(function (n) {
  25221. return n;
  25222. }, Pattern);
  25223. var mapMaybe = function mapMaybe(f) {
  25224. var go = function go($copy_v) {
  25225. var $tco_done = false;
  25226. var $tco_result;
  25227. function $tco_loop(v) {
  25228. if (v instanceof Data_List_Lazy_Types.Nil) {
  25229. $tco_done = true;
  25230. return Data_List_Lazy_Types.Nil.value;
  25231. }
  25232. ;
  25233. if (v instanceof Data_List_Lazy_Types.Cons) {
  25234. var v1 = f(v.value0);
  25235. if (v1 instanceof Data_Maybe.Nothing) {
  25236. $copy_v = Data_List_Lazy_Types.step(v.value1);
  25237. return;
  25238. }
  25239. ;
  25240. if (v1 instanceof Data_Maybe.Just) {
  25241. $tco_done = true;
  25242. return new Data_List_Lazy_Types.Cons(v1.value0, mapMaybe(f)(v.value1));
  25243. }
  25244. ;
  25245. throw new Error("Failed pattern match at Data.List.Lazy (line 460, column 5 - line 462, column 39): " + [v1.constructor.name]);
  25246. }
  25247. ;
  25248. throw new Error("Failed pattern match at Data.List.Lazy (line 458, column 3 - line 458, column 15): " + [v.constructor.name]);
  25249. }
  25250. ;
  25251. while (!$tco_done) {
  25252. $tco_result = $tco_loop($copy_v);
  25253. }
  25254. ;
  25255. return $tco_result;
  25256. };
  25257. var $246 = Data_Functor.map(Data_Lazy.functorLazy)(go);
  25258. var $247 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  25259. return function ($248) {
  25260. return Data_List_Lazy_Types.List($246($247($248)));
  25261. };
  25262. };
  25263. var some = function some(dictAlternative) {
  25264. return function (dictLazy) {
  25265. return function (v) {
  25266. 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) {
  25267. return many(dictAlternative)(dictLazy)(v);
  25268. }));
  25269. };
  25270. };
  25271. };
  25272. var many = function many(dictAlternative) {
  25273. return function (dictLazy) {
  25274. return function (v) {
  25275. return Control_Alt.alt(dictAlternative.Plus1().Alt0())(some(dictAlternative)(dictLazy)(v))(Control_Applicative.pure(dictAlternative.Applicative0())(Data_List_Lazy_Types.nil));
  25276. };
  25277. };
  25278. };
  25279. var length = Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(function (l) {
  25280. return function (v) {
  25281. return l + 1 | 0;
  25282. };
  25283. })(0);
  25284. var last = function () {
  25285. var go = function go($copy_v) {
  25286. var $tco_done = false;
  25287. var $tco_result;
  25288. function $tco_loop(v) {
  25289. if (v instanceof Data_List_Lazy_Types.Cons) {
  25290. if ($$null(v.value1)) {
  25291. $tco_done = true;
  25292. return new Data_Maybe.Just(v.value0);
  25293. }
  25294. ;
  25295. if (Data_Boolean.otherwise) {
  25296. $copy_v = Data_List_Lazy_Types.step(v.value1);
  25297. return;
  25298. }
  25299. ;
  25300. }
  25301. ;
  25302. $tco_done = true;
  25303. return Data_Maybe.Nothing.value;
  25304. }
  25305. ;
  25306. while (!$tco_done) {
  25307. $tco_result = $tco_loop($copy_v);
  25308. }
  25309. ;
  25310. return $tco_result;
  25311. };
  25312. return function ($249) {
  25313. return go(Data_List_Lazy_Types.step($249));
  25314. };
  25315. }();
  25316. var iterate = function iterate(f) {
  25317. return function (x) {
  25318. return Control_Lazy.fix(Data_List_Lazy_Types.lazyList)(function (xs) {
  25319. return Data_List_Lazy_Types.cons(x)(Data_Functor.map(Data_List_Lazy_Types.functorList)(f)(xs));
  25320. });
  25321. };
  25322. };
  25323. var insertAt = function insertAt(v) {
  25324. return function (x) {
  25325. return function (xs) {
  25326. if (v === 0) {
  25327. return Data_List_Lazy_Types.cons(x)(xs);
  25328. }
  25329. ;
  25330. var go = function go(v1) {
  25331. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  25332. return new Data_List_Lazy_Types.Cons(x, Data_List_Lazy_Types.nil);
  25333. }
  25334. ;
  25335. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  25336. return new Data_List_Lazy_Types.Cons(v1.value0, insertAt(v - 1 | 0)(x)(v1.value1));
  25337. }
  25338. ;
  25339. throw new Error("Failed pattern match at Data.List.Lazy (line 340, column 3 - line 340, column 22): " + [v1.constructor.name]);
  25340. };
  25341. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  25342. };
  25343. };
  25344. };
  25345. var init = function () {
  25346. var go = function go(v) {
  25347. if (v instanceof Data_List_Lazy_Types.Cons) {
  25348. if ($$null(v.value1)) {
  25349. return new Data_Maybe.Just(Data_List_Lazy_Types.nil);
  25350. }
  25351. ;
  25352. if (Data_Boolean.otherwise) {
  25353. return Data_Functor.map(Data_Maybe.functorMaybe)(Data_List_Lazy_Types.cons(v.value0))(go(Data_List_Lazy_Types.step(v.value1)));
  25354. }
  25355. ;
  25356. }
  25357. ;
  25358. return Data_Maybe.Nothing.value;
  25359. };
  25360. return function ($250) {
  25361. return go(Data_List_Lazy_Types.step($250));
  25362. };
  25363. }();
  25364. var index = function index(xs) {
  25365. var go = function go($copy_v) {
  25366. return function ($copy_v1) {
  25367. var $tco_var_v = $copy_v;
  25368. var $tco_done = false;
  25369. var $tco_result;
  25370. function $tco_loop(v, v1) {
  25371. if (v instanceof Data_List_Lazy_Types.Nil) {
  25372. $tco_done = true;
  25373. return Data_Maybe.Nothing.value;
  25374. }
  25375. ;
  25376. if (v instanceof Data_List_Lazy_Types.Cons && v1 === 0) {
  25377. $tco_done = true;
  25378. return new Data_Maybe.Just(v.value0);
  25379. }
  25380. ;
  25381. if (v instanceof Data_List_Lazy_Types.Cons) {
  25382. $tco_var_v = Data_List_Lazy_Types.step(v.value1);
  25383. $copy_v1 = v1 - 1 | 0;
  25384. return;
  25385. }
  25386. ;
  25387. throw new Error("Failed pattern match at Data.List.Lazy (line 299, column 3 - line 299, column 21): " + [v.constructor.name, v1.constructor.name]);
  25388. }
  25389. ;
  25390. while (!$tco_done) {
  25391. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  25392. }
  25393. ;
  25394. return $tco_result;
  25395. };
  25396. };
  25397. return go(Data_List_Lazy_Types.step(xs));
  25398. };
  25399. var head = function head(xs) {
  25400. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
  25401. return v.head;
  25402. })(uncons(xs));
  25403. };
  25404. var transpose = function transpose(xs) {
  25405. var v = uncons(xs);
  25406. if (v instanceof Data_Maybe.Nothing) {
  25407. return xs;
  25408. }
  25409. ;
  25410. if (v instanceof Data_Maybe.Just) {
  25411. var v1 = uncons(v.value0.head);
  25412. if (v1 instanceof Data_Maybe.Nothing) {
  25413. return transpose(v.value0.tail);
  25414. }
  25415. ;
  25416. if (v1 instanceof Data_Maybe.Just) {
  25417. 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))));
  25418. }
  25419. ;
  25420. throw new Error("Failed pattern match at Data.List.Lazy (line 734, column 7 - line 738, column 72): " + [v1.constructor.name]);
  25421. }
  25422. ;
  25423. throw new Error("Failed pattern match at Data.List.Lazy (line 730, column 3 - line 738, column 72): " + [v.constructor.name]);
  25424. };
  25425. var groupBy = function groupBy(eq) {
  25426. var go = function go(v) {
  25427. if (v instanceof Data_List_Lazy_Types.Nil) {
  25428. return Data_List_Lazy_Types.Nil.value;
  25429. }
  25430. ;
  25431. if (v instanceof Data_List_Lazy_Types.Cons) {
  25432. var v1 = span(eq(v.value0))(v.value1);
  25433. return new Data_List_Lazy_Types.Cons(Data_Lazy.defer(function (v2) {
  25434. return new Data_NonEmpty.NonEmpty(v.value0, v1.init);
  25435. }), groupBy(eq)(v1.rest));
  25436. }
  25437. ;
  25438. throw new Error("Failed pattern match at Data.List.Lazy (line 588, column 3 - line 588, column 15): " + [v.constructor.name]);
  25439. };
  25440. var $251 = Data_Functor.map(Data_Lazy.functorLazy)(go);
  25441. var $252 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  25442. return function ($253) {
  25443. return Data_List_Lazy_Types.List($251($252($253)));
  25444. };
  25445. };
  25446. var group = function group(dictEq) {
  25447. return groupBy(Data_Eq.eq(dictEq));
  25448. };
  25449. var fromStep = function () {
  25450. var $254 = Control_Applicative.pure(Data_Lazy.applicativeLazy);
  25451. return function ($255) {
  25452. return Data_List_Lazy_Types.List($254($255));
  25453. };
  25454. }();
  25455. var insertBy = function insertBy(cmp) {
  25456. return function (x) {
  25457. return function (xs) {
  25458. var go = function go(v) {
  25459. if (v instanceof Data_List_Lazy_Types.Nil) {
  25460. return new Data_List_Lazy_Types.Cons(x, Data_List_Lazy_Types.nil);
  25461. }
  25462. ;
  25463. if (v instanceof Data_List_Lazy_Types.Cons) {
  25464. var v1 = cmp(x)(v.value0);
  25465. if (v1 instanceof Data_Ordering.GT) {
  25466. return new Data_List_Lazy_Types.Cons(v.value0, insertBy(cmp)(x)(v.value1));
  25467. }
  25468. ;
  25469. return new Data_List_Lazy_Types.Cons(x, fromStep(v));
  25470. }
  25471. ;
  25472. throw new Error("Failed pattern match at Data.List.Lazy (line 235, column 3 - line 235, column 22): " + [v.constructor.name]);
  25473. };
  25474. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  25475. };
  25476. };
  25477. };
  25478. var insert = function insert(dictOrd) {
  25479. return insertBy(Data_Ord.compare(dictOrd));
  25480. };
  25481. var fromFoldable = function fromFoldable(dictFoldable) {
  25482. return Data_Foldable.foldr(dictFoldable)(Data_List_Lazy_Types.cons)(Data_List_Lazy_Types.nil);
  25483. };
  25484. var foldrLazy = function foldrLazy(dictLazy) {
  25485. return function (op) {
  25486. return function (z) {
  25487. var go = function go(xs) {
  25488. var v = Data_List_Lazy_Types.step(xs);
  25489. if (v instanceof Data_List_Lazy_Types.Cons) {
  25490. return Control_Lazy.defer(dictLazy)(function (v1) {
  25491. return op(v.value0)(go(v.value1));
  25492. });
  25493. }
  25494. ;
  25495. if (v instanceof Data_List_Lazy_Types.Nil) {
  25496. return z;
  25497. }
  25498. ;
  25499. throw new Error("Failed pattern match at Data.List.Lazy (line 756, column 13 - line 758, column 15): " + [v.constructor.name]);
  25500. };
  25501. return go;
  25502. };
  25503. };
  25504. };
  25505. var foldM = function foldM(dictMonad) {
  25506. return function (f) {
  25507. return function (a) {
  25508. return function (xs) {
  25509. var v = uncons(xs);
  25510. if (v instanceof Data_Maybe.Nothing) {
  25511. return Control_Applicative.pure(dictMonad.Applicative0())(a);
  25512. }
  25513. ;
  25514. if (v instanceof Data_Maybe.Just) {
  25515. return Control_Bind.bind(dictMonad.Bind1())(f(a)(v.value0.head))(function (a$prime) {
  25516. return foldM(dictMonad)(f)(a$prime)(v.value0.tail);
  25517. });
  25518. }
  25519. ;
  25520. throw new Error("Failed pattern match at Data.List.Lazy (line 747, column 5 - line 750, column 54): " + [v.constructor.name]);
  25521. };
  25522. };
  25523. };
  25524. };
  25525. var findIndex = function findIndex(fn) {
  25526. var go = function go(n) {
  25527. return function (list) {
  25528. return Control_Bind.bind(Data_Maybe.bindMaybe)(uncons(list))(function (o) {
  25529. var $199 = fn(o.head);
  25530. if ($199) {
  25531. return Control_Applicative.pure(Data_Maybe.applicativeMaybe)(n);
  25532. }
  25533. ;
  25534. return go(n + 1 | 0)(o.tail);
  25535. });
  25536. };
  25537. };
  25538. return go(0);
  25539. };
  25540. var findLastIndex = function findLastIndex(fn) {
  25541. return function (xs) {
  25542. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v) {
  25543. return (length(xs) - 1 | 0) - v | 0;
  25544. })(findIndex(fn)(reverse(xs)));
  25545. };
  25546. };
  25547. var filterM = function filterM(dictMonad) {
  25548. return function (p) {
  25549. return function (list) {
  25550. var v = uncons(list);
  25551. if (v instanceof Data_Maybe.Nothing) {
  25552. return Control_Applicative.pure(dictMonad.Applicative0())(Data_List_Lazy_Types.nil);
  25553. }
  25554. ;
  25555. if (v instanceof Data_Maybe.Just) {
  25556. return Control_Bind.bind(dictMonad.Bind1())(p(v.value0.head))(function (b) {
  25557. return Control_Bind.bind(dictMonad.Bind1())(filterM(dictMonad)(p)(v.value0.tail))(function (xs$prime) {
  25558. return Control_Applicative.pure(dictMonad.Applicative0())(function () {
  25559. if (b) {
  25560. return Data_List_Lazy_Types.cons(v.value0.head)(xs$prime);
  25561. }
  25562. ;
  25563. return xs$prime;
  25564. }());
  25565. });
  25566. });
  25567. }
  25568. ;
  25569. throw new Error("Failed pattern match at Data.List.Lazy (line 443, column 5 - line 448, column 48): " + [v.constructor.name]);
  25570. };
  25571. };
  25572. };
  25573. var filter = function filter(p) {
  25574. var go = function go($copy_v) {
  25575. var $tco_done = false;
  25576. var $tco_result;
  25577. function $tco_loop(v) {
  25578. if (v instanceof Data_List_Lazy_Types.Nil) {
  25579. $tco_done = true;
  25580. return Data_List_Lazy_Types.Nil.value;
  25581. }
  25582. ;
  25583. if (v instanceof Data_List_Lazy_Types.Cons) {
  25584. if (p(v.value0)) {
  25585. $tco_done = true;
  25586. return new Data_List_Lazy_Types.Cons(v.value0, filter(p)(v.value1));
  25587. }
  25588. ;
  25589. if (Data_Boolean.otherwise) {
  25590. $copy_v = Data_List_Lazy_Types.step(v.value1);
  25591. return;
  25592. }
  25593. ;
  25594. }
  25595. ;
  25596. throw new Error("Failed pattern match at Data.List.Lazy (line 428, column 3 - line 428, column 15): " + [v.constructor.name]);
  25597. }
  25598. ;
  25599. while (!$tco_done) {
  25600. $tco_result = $tco_loop($copy_v);
  25601. }
  25602. ;
  25603. return $tco_result;
  25604. };
  25605. var $256 = Data_Functor.map(Data_Lazy.functorLazy)(go);
  25606. var $257 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  25607. return function ($258) {
  25608. return Data_List_Lazy_Types.List($256($257($258)));
  25609. };
  25610. };
  25611. var intersectBy = function intersectBy(eq) {
  25612. return function (xs) {
  25613. return function (ys) {
  25614. return filter(function (x) {
  25615. return Data_Foldable.any(Data_List_Lazy_Types.foldableList)(Data_HeytingAlgebra.heytingAlgebraBoolean)(eq(x))(ys);
  25616. })(xs);
  25617. };
  25618. };
  25619. };
  25620. var intersect = function intersect(dictEq) {
  25621. return intersectBy(Data_Eq.eq(dictEq));
  25622. };
  25623. var nubBy = function nubBy(eq) {
  25624. var go = function go(v) {
  25625. if (v instanceof Data_List_Lazy_Types.Nil) {
  25626. return Data_List_Lazy_Types.Nil.value;
  25627. }
  25628. ;
  25629. if (v instanceof Data_List_Lazy_Types.Cons) {
  25630. return new Data_List_Lazy_Types.Cons(v.value0, nubBy(eq)(filter(function (y) {
  25631. return !eq(v.value0)(y);
  25632. })(v.value1)));
  25633. }
  25634. ;
  25635. throw new Error("Failed pattern match at Data.List.Lazy (line 621, column 3 - line 621, column 15): " + [v.constructor.name]);
  25636. };
  25637. var $259 = Data_Functor.map(Data_Lazy.functorLazy)(go);
  25638. var $260 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  25639. return function ($261) {
  25640. return Data_List_Lazy_Types.List($259($260($261)));
  25641. };
  25642. };
  25643. var nub = function nub(dictEq) {
  25644. return nubBy(Data_Eq.eq(dictEq));
  25645. };
  25646. var eqPattern = function eqPattern(dictEq) {
  25647. return new Data_Eq.Eq(function (x) {
  25648. return function (y) {
  25649. return Data_Eq.eq(Data_List_Lazy_Types.eqList(dictEq))(x)(y);
  25650. };
  25651. });
  25652. };
  25653. var ordPattern = function ordPattern(dictOrd) {
  25654. return new Data_Ord.Ord(function () {
  25655. return eqPattern(dictOrd.Eq0());
  25656. }, function (x) {
  25657. return function (y) {
  25658. return Data_Ord.compare(Data_List_Lazy_Types.ordList(dictOrd))(x)(y);
  25659. };
  25660. });
  25661. };
  25662. var elemLastIndex = function elemLastIndex(dictEq) {
  25663. return function (x) {
  25664. return findLastIndex(function (v) {
  25665. return Data_Eq.eq(dictEq)(v)(x);
  25666. });
  25667. };
  25668. };
  25669. var elemIndex = function elemIndex(dictEq) {
  25670. return function (x) {
  25671. return findIndex(function (v) {
  25672. return Data_Eq.eq(dictEq)(v)(x);
  25673. });
  25674. };
  25675. };
  25676. var dropWhile = function dropWhile(p) {
  25677. var go = function go($copy_v) {
  25678. var $tco_done = false;
  25679. var $tco_result;
  25680. function $tco_loop(v) {
  25681. if (v instanceof Data_List_Lazy_Types.Cons && p(v.value0)) {
  25682. $copy_v = Data_List_Lazy_Types.step(v.value1);
  25683. return;
  25684. }
  25685. ;
  25686. $tco_done = true;
  25687. return fromStep(v);
  25688. }
  25689. ;
  25690. while (!$tco_done) {
  25691. $tco_result = $tco_loop($copy_v);
  25692. }
  25693. ;
  25694. return $tco_result;
  25695. };
  25696. return function ($262) {
  25697. return go(Data_List_Lazy_Types.step($262));
  25698. };
  25699. };
  25700. var drop = function drop(n) {
  25701. var go = function go($copy_v) {
  25702. return function ($copy_v1) {
  25703. var $tco_var_v = $copy_v;
  25704. var $tco_done = false;
  25705. var $tco_result;
  25706. function $tco_loop(v, v1) {
  25707. if (v === 0) {
  25708. $tco_done = true;
  25709. return v1;
  25710. }
  25711. ;
  25712. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  25713. $tco_done = true;
  25714. return Data_List_Lazy_Types.Nil.value;
  25715. }
  25716. ;
  25717. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  25718. $tco_var_v = v - 1 | 0;
  25719. $copy_v1 = Data_List_Lazy_Types.step(v1.value1);
  25720. return;
  25721. }
  25722. ;
  25723. throw new Error("Failed pattern match at Data.List.Lazy (line 536, column 3 - line 536, column 15): " + [v.constructor.name, v1.constructor.name]);
  25724. }
  25725. ;
  25726. while (!$tco_done) {
  25727. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  25728. }
  25729. ;
  25730. return $tco_result;
  25731. };
  25732. };
  25733. var $263 = Data_Functor.map(Data_Lazy.functorLazy)(go(n));
  25734. var $264 = Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList);
  25735. return function ($265) {
  25736. return Data_List_Lazy_Types.List($263($264($265)));
  25737. };
  25738. };
  25739. var slice = function slice(start) {
  25740. return function (end) {
  25741. return function (xs) {
  25742. return take(end - start | 0)(drop(start)(xs));
  25743. };
  25744. };
  25745. };
  25746. var deleteBy = function deleteBy(eq) {
  25747. return function (x) {
  25748. return function (xs) {
  25749. var go = function go(v) {
  25750. if (v instanceof Data_List_Lazy_Types.Nil) {
  25751. return Data_List_Lazy_Types.Nil.value;
  25752. }
  25753. ;
  25754. if (v instanceof Data_List_Lazy_Types.Cons) {
  25755. if (eq(x)(v.value0)) {
  25756. return Data_List_Lazy_Types.step(v.value1);
  25757. }
  25758. ;
  25759. if (Data_Boolean.otherwise) {
  25760. return new Data_List_Lazy_Types.Cons(v.value0, deleteBy(eq)(x)(v.value1));
  25761. }
  25762. ;
  25763. }
  25764. ;
  25765. throw new Error("Failed pattern match at Data.List.Lazy (line 650, column 3 - line 650, column 15): " + [v.constructor.name]);
  25766. };
  25767. return Data_Functor.map(Data_Lazy.functorLazy)(go)(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  25768. };
  25769. };
  25770. };
  25771. var unionBy = function unionBy(eq) {
  25772. return function (xs) {
  25773. return function (ys) {
  25774. 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));
  25775. };
  25776. };
  25777. };
  25778. var union = function union(dictEq) {
  25779. return unionBy(Data_Eq.eq(dictEq));
  25780. };
  25781. var deleteAt = function deleteAt(n) {
  25782. return function (xs) {
  25783. var go = function go(v) {
  25784. return function (v1) {
  25785. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  25786. return Data_List_Lazy_Types.Nil.value;
  25787. }
  25788. ;
  25789. if (v === 0 && v1 instanceof Data_List_Lazy_Types.Cons) {
  25790. return Data_List_Lazy_Types.step(v1.value1);
  25791. }
  25792. ;
  25793. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  25794. return new Data_List_Lazy_Types.Cons(v1.value0, deleteAt(v - 1 | 0)(v1.value1));
  25795. }
  25796. ;
  25797. throw new Error("Failed pattern match at Data.List.Lazy (line 353, column 3 - line 353, column 17): " + [v.constructor.name, v1.constructor.name]);
  25798. };
  25799. };
  25800. return Data_Functor.map(Data_Lazy.functorLazy)(go(n))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  25801. };
  25802. };
  25803. var $$delete = function $$delete(dictEq) {
  25804. return deleteBy(Data_Eq.eq(dictEq));
  25805. };
  25806. var difference = function difference(dictEq) {
  25807. return Data_Foldable.foldl(Data_List_Lazy_Types.foldableList)(Data_Function.flip($$delete(dictEq)));
  25808. };
  25809. var cycle = function cycle(xs) {
  25810. return Control_Lazy.fix(Data_List_Lazy_Types.lazyList)(function (ys) {
  25811. return Data_Semigroup.append(Data_List_Lazy_Types.semigroupList)(xs)(ys);
  25812. });
  25813. };
  25814. var concatMap = Data_Function.flip(Control_Bind.bind(Data_List_Lazy_Types.bindList));
  25815. var concat = function concat(v) {
  25816. return Control_Bind.bind(Data_List_Lazy_Types.bindList)(v)(Control_Category.identity(Control_Category.categoryFn));
  25817. };
  25818. var catMaybes = mapMaybe(Control_Category.identity(Control_Category.categoryFn));
  25819. var alterAt = function alterAt(n) {
  25820. return function (f) {
  25821. return function (xs) {
  25822. var go = function go(v) {
  25823. return function (v1) {
  25824. if (v1 instanceof Data_List_Lazy_Types.Nil) {
  25825. return Data_List_Lazy_Types.Nil.value;
  25826. }
  25827. ;
  25828. if (v === 0 && v1 instanceof Data_List_Lazy_Types.Cons) {
  25829. var v2 = f(v1.value0);
  25830. if (v2 instanceof Data_Maybe.Nothing) {
  25831. return Data_List_Lazy_Types.step(v1.value1);
  25832. }
  25833. ;
  25834. if (v2 instanceof Data_Maybe.Just) {
  25835. return new Data_List_Lazy_Types.Cons(v2.value0, v1.value1);
  25836. }
  25837. ;
  25838. throw new Error("Failed pattern match at Data.List.Lazy (line 394, column 22 - line 396, column 26): " + [v2.constructor.name]);
  25839. }
  25840. ;
  25841. if (v1 instanceof Data_List_Lazy_Types.Cons) {
  25842. return new Data_List_Lazy_Types.Cons(v1.value0, alterAt(v - 1 | 0)(f)(v1.value1));
  25843. }
  25844. ;
  25845. throw new Error("Failed pattern match at Data.List.Lazy (line 393, column 3 - line 393, column 17): " + [v.constructor.name, v1.constructor.name]);
  25846. };
  25847. };
  25848. return Data_Functor.map(Data_Lazy.functorLazy)(go(n))(Data_Newtype.unwrap(Data_List_Lazy_Types.newtypeList)(xs));
  25849. };
  25850. };
  25851. };
  25852. var modifyAt = function modifyAt(n) {
  25853. return function (f) {
  25854. return alterAt(n)(function ($266) {
  25855. return Data_Maybe.Just.create(f($266));
  25856. });
  25857. };
  25858. };
  25859. module.exports = {
  25860. toUnfoldable: toUnfoldable,
  25861. fromFoldable: fromFoldable,
  25862. singleton: singleton,
  25863. range: range,
  25864. replicate: replicate,
  25865. replicateM: replicateM,
  25866. some: some,
  25867. many: many,
  25868. repeat: repeat,
  25869. iterate: iterate,
  25870. cycle: cycle,
  25871. "null": $$null,
  25872. length: length,
  25873. snoc: snoc,
  25874. insert: insert,
  25875. insertBy: insertBy,
  25876. head: head,
  25877. last: last,
  25878. tail: tail,
  25879. init: init,
  25880. uncons: uncons,
  25881. index: index,
  25882. elemIndex: elemIndex,
  25883. elemLastIndex: elemLastIndex,
  25884. findIndex: findIndex,
  25885. findLastIndex: findLastIndex,
  25886. insertAt: insertAt,
  25887. deleteAt: deleteAt,
  25888. updateAt: updateAt,
  25889. modifyAt: modifyAt,
  25890. alterAt: alterAt,
  25891. reverse: reverse,
  25892. concat: concat,
  25893. concatMap: concatMap,
  25894. filter: filter,
  25895. filterM: filterM,
  25896. mapMaybe: mapMaybe,
  25897. catMaybes: catMaybes,
  25898. Pattern: Pattern,
  25899. stripPrefix: stripPrefix,
  25900. slice: slice,
  25901. take: take,
  25902. takeWhile: takeWhile,
  25903. drop: drop,
  25904. dropWhile: dropWhile,
  25905. span: span,
  25906. group: group,
  25907. groupBy: groupBy,
  25908. partition: partition,
  25909. nub: nub,
  25910. nubBy: nubBy,
  25911. union: union,
  25912. unionBy: unionBy,
  25913. "delete": $$delete,
  25914. deleteBy: deleteBy,
  25915. difference: difference,
  25916. intersect: intersect,
  25917. intersectBy: intersectBy,
  25918. zipWith: zipWith,
  25919. zipWithA: zipWithA,
  25920. zip: zip,
  25921. unzip: unzip,
  25922. transpose: transpose,
  25923. foldM: foldM,
  25924. foldrLazy: foldrLazy,
  25925. scanrLazy: scanrLazy,
  25926. eqPattern: eqPattern,
  25927. ordPattern: ordPattern,
  25928. newtypePattern: newtypePattern,
  25929. showPattern: showPattern
  25930. };
  25931. },{"../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) {
  25932. // Generated by purs version 0.13.6
  25933. "use strict";
  25934. var Control_Applicative = require("../Control.Applicative/index.js");
  25935. var Control_Apply = require("../Control.Apply/index.js");
  25936. var Control_Category = require("../Control.Category/index.js");
  25937. var Data_Eq = require("../Data.Eq/index.js");
  25938. var Data_Foldable = require("../Data.Foldable/index.js");
  25939. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  25940. var Data_Function = require("../Data.Function/index.js");
  25941. var Data_Functor = require("../Data.Functor/index.js");
  25942. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  25943. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  25944. var Data_List = require("../Data.List/index.js");
  25945. var Data_List_Lazy = require("../Data.List.Lazy/index.js");
  25946. var Data_List_Lazy_Types = require("../Data.List.Lazy.Types/index.js");
  25947. var Data_List_Types = require("../Data.List.Types/index.js");
  25948. var Data_Maybe = require("../Data.Maybe/index.js");
  25949. var Data_Monoid = require("../Data.Monoid/index.js");
  25950. var Data_Ord = require("../Data.Ord/index.js");
  25951. var Data_Ordering = require("../Data.Ordering/index.js");
  25952. var Data_Semigroup = require("../Data.Semigroup/index.js");
  25953. var Data_Show = require("../Data.Show/index.js");
  25954. var Data_Traversable = require("../Data.Traversable/index.js");
  25955. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  25956. var Data_Tuple = require("../Data.Tuple/index.js");
  25957. var Data_Unfoldable = require("../Data.Unfoldable/index.js");
  25958. var Leaf = function () {
  25959. function Leaf() {}
  25960. ;
  25961. Leaf.value = new Leaf();
  25962. return Leaf;
  25963. }();
  25964. var Two = function () {
  25965. function Two(value0, value1, value2, value3) {
  25966. this.value0 = value0;
  25967. this.value1 = value1;
  25968. this.value2 = value2;
  25969. this.value3 = value3;
  25970. }
  25971. ;
  25972. Two.create = function (value0) {
  25973. return function (value1) {
  25974. return function (value2) {
  25975. return function (value3) {
  25976. return new Two(value0, value1, value2, value3);
  25977. };
  25978. };
  25979. };
  25980. };
  25981. return Two;
  25982. }();
  25983. var Three = function () {
  25984. function Three(value0, value1, value2, value3, value4, value5, value6) {
  25985. this.value0 = value0;
  25986. this.value1 = value1;
  25987. this.value2 = value2;
  25988. this.value3 = value3;
  25989. this.value4 = value4;
  25990. this.value5 = value5;
  25991. this.value6 = value6;
  25992. }
  25993. ;
  25994. Three.create = function (value0) {
  25995. return function (value1) {
  25996. return function (value2) {
  25997. return function (value3) {
  25998. return function (value4) {
  25999. return function (value5) {
  26000. return function (value6) {
  26001. return new Three(value0, value1, value2, value3, value4, value5, value6);
  26002. };
  26003. };
  26004. };
  26005. };
  26006. };
  26007. };
  26008. };
  26009. return Three;
  26010. }();
  26011. var TwoLeft = function () {
  26012. function TwoLeft(value0, value1, value2) {
  26013. this.value0 = value0;
  26014. this.value1 = value1;
  26015. this.value2 = value2;
  26016. }
  26017. ;
  26018. TwoLeft.create = function (value0) {
  26019. return function (value1) {
  26020. return function (value2) {
  26021. return new TwoLeft(value0, value1, value2);
  26022. };
  26023. };
  26024. };
  26025. return TwoLeft;
  26026. }();
  26027. var TwoRight = function () {
  26028. function TwoRight(value0, value1, value2) {
  26029. this.value0 = value0;
  26030. this.value1 = value1;
  26031. this.value2 = value2;
  26032. }
  26033. ;
  26034. TwoRight.create = function (value0) {
  26035. return function (value1) {
  26036. return function (value2) {
  26037. return new TwoRight(value0, value1, value2);
  26038. };
  26039. };
  26040. };
  26041. return TwoRight;
  26042. }();
  26043. var ThreeLeft = function () {
  26044. function ThreeLeft(value0, value1, value2, value3, value4, value5) {
  26045. this.value0 = value0;
  26046. this.value1 = value1;
  26047. this.value2 = value2;
  26048. this.value3 = value3;
  26049. this.value4 = value4;
  26050. this.value5 = value5;
  26051. }
  26052. ;
  26053. ThreeLeft.create = function (value0) {
  26054. return function (value1) {
  26055. return function (value2) {
  26056. return function (value3) {
  26057. return function (value4) {
  26058. return function (value5) {
  26059. return new ThreeLeft(value0, value1, value2, value3, value4, value5);
  26060. };
  26061. };
  26062. };
  26063. };
  26064. };
  26065. };
  26066. return ThreeLeft;
  26067. }();
  26068. var ThreeMiddle = function () {
  26069. function ThreeMiddle(value0, value1, value2, value3, value4, value5) {
  26070. this.value0 = value0;
  26071. this.value1 = value1;
  26072. this.value2 = value2;
  26073. this.value3 = value3;
  26074. this.value4 = value4;
  26075. this.value5 = value5;
  26076. }
  26077. ;
  26078. ThreeMiddle.create = function (value0) {
  26079. return function (value1) {
  26080. return function (value2) {
  26081. return function (value3) {
  26082. return function (value4) {
  26083. return function (value5) {
  26084. return new ThreeMiddle(value0, value1, value2, value3, value4, value5);
  26085. };
  26086. };
  26087. };
  26088. };
  26089. };
  26090. };
  26091. return ThreeMiddle;
  26092. }();
  26093. var ThreeRight = function () {
  26094. function ThreeRight(value0, value1, value2, value3, value4, value5) {
  26095. this.value0 = value0;
  26096. this.value1 = value1;
  26097. this.value2 = value2;
  26098. this.value3 = value3;
  26099. this.value4 = value4;
  26100. this.value5 = value5;
  26101. }
  26102. ;
  26103. ThreeRight.create = function (value0) {
  26104. return function (value1) {
  26105. return function (value2) {
  26106. return function (value3) {
  26107. return function (value4) {
  26108. return function (value5) {
  26109. return new ThreeRight(value0, value1, value2, value3, value4, value5);
  26110. };
  26111. };
  26112. };
  26113. };
  26114. };
  26115. };
  26116. return ThreeRight;
  26117. }();
  26118. var KickUp = function () {
  26119. function KickUp(value0, value1, value2, value3) {
  26120. this.value0 = value0;
  26121. this.value1 = value1;
  26122. this.value2 = value2;
  26123. this.value3 = value3;
  26124. }
  26125. ;
  26126. KickUp.create = function (value0) {
  26127. return function (value1) {
  26128. return function (value2) {
  26129. return function (value3) {
  26130. return new KickUp(value0, value1, value2, value3);
  26131. };
  26132. };
  26133. };
  26134. };
  26135. return KickUp;
  26136. }();
  26137. var values = function values(v) {
  26138. if (v instanceof Leaf) {
  26139. return Data_List_Types.Nil.value;
  26140. }
  26141. ;
  26142. if (v instanceof Two) {
  26143. 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)));
  26144. }
  26145. ;
  26146. if (v instanceof Three) {
  26147. 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)))));
  26148. }
  26149. ;
  26150. throw new Error("Failed pattern match at Data.Map.Internal (line 612, column 1 - line 612, column 40): " + [v.constructor.name]);
  26151. };
  26152. var size = function size(v) {
  26153. if (v instanceof Leaf) {
  26154. return 0;
  26155. }
  26156. ;
  26157. if (v instanceof Two) {
  26158. return (1 + size(v.value0) | 0) + size(v.value3) | 0;
  26159. }
  26160. ;
  26161. if (v instanceof Three) {
  26162. return ((2 + size(v.value0) | 0) + size(v.value3) | 0) + size(v.value6) | 0;
  26163. }
  26164. ;
  26165. throw new Error("Failed pattern match at Data.Map.Internal (line 662, column 1 - line 662, column 35): " + [v.constructor.name]);
  26166. };
  26167. var singleton = function singleton(k) {
  26168. return function (v) {
  26169. return new Two(Leaf.value, k, v, Leaf.value);
  26170. };
  26171. };
  26172. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  26173. return function (m) {
  26174. var go = function go($copy_v) {
  26175. var $tco_done = false;
  26176. var $tco_result;
  26177. function $tco_loop(v) {
  26178. if (v instanceof Data_List_Types.Nil) {
  26179. $tco_done = true;
  26180. return Data_Maybe.Nothing.value;
  26181. }
  26182. ;
  26183. if (v instanceof Data_List_Types.Cons) {
  26184. if (v.value0 instanceof Leaf) {
  26185. $copy_v = v.value1;
  26186. return;
  26187. }
  26188. ;
  26189. if (v.value0 instanceof Two && v.value0.value0 instanceof Leaf && v.value0.value3 instanceof Leaf) {
  26190. $tco_done = true;
  26191. return Data_Maybe.Just.create(new Data_Tuple.Tuple(new Data_Tuple.Tuple(v.value0.value1, v.value0.value2), v.value1));
  26192. }
  26193. ;
  26194. if (v.value0 instanceof Two && v.value0.value0 instanceof Leaf) {
  26195. $tco_done = true;
  26196. 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)));
  26197. }
  26198. ;
  26199. if (v.value0 instanceof Two) {
  26200. $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)));
  26201. return;
  26202. }
  26203. ;
  26204. if (v.value0 instanceof Three) {
  26205. $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)))));
  26206. return;
  26207. }
  26208. ;
  26209. throw new Error("Failed pattern match at Data.Map.Internal (line 577, column 18 - line 586, column 71): " + [v.value0.constructor.name]);
  26210. }
  26211. ;
  26212. throw new Error("Failed pattern match at Data.Map.Internal (line 576, column 3 - line 576, column 19): " + [v.constructor.name]);
  26213. }
  26214. ;
  26215. while (!$tco_done) {
  26216. $tco_result = $tco_loop($copy_v);
  26217. }
  26218. ;
  26219. return $tco_result;
  26220. };
  26221. return Data_Unfoldable.unfoldr(dictUnfoldable)(go)(new Data_List_Types.Cons(m, Data_List_Types.Nil.value));
  26222. };
  26223. };
  26224. var toAscArray = toUnfoldable(Data_Unfoldable.unfoldableArray);
  26225. var toUnfoldableUnordered = function toUnfoldableUnordered(dictUnfoldable) {
  26226. return function (m) {
  26227. var go = function go($copy_v) {
  26228. var $tco_done = false;
  26229. var $tco_result;
  26230. function $tco_loop(v) {
  26231. if (v instanceof Data_List_Types.Nil) {
  26232. $tco_done = true;
  26233. return Data_Maybe.Nothing.value;
  26234. }
  26235. ;
  26236. if (v instanceof Data_List_Types.Cons) {
  26237. if (v.value0 instanceof Leaf) {
  26238. $copy_v = v.value1;
  26239. return;
  26240. }
  26241. ;
  26242. if (v.value0 instanceof Two) {
  26243. $tco_done = true;
  26244. 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))));
  26245. }
  26246. ;
  26247. if (v.value0 instanceof Three) {
  26248. $tco_done = true;
  26249. 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))))));
  26250. }
  26251. ;
  26252. throw new Error("Failed pattern match at Data.Map.Internal (line 598, column 18 - line 603, column 77): " + [v.value0.constructor.name]);
  26253. }
  26254. ;
  26255. throw new Error("Failed pattern match at Data.Map.Internal (line 597, column 3 - line 597, column 19): " + [v.constructor.name]);
  26256. }
  26257. ;
  26258. while (!$tco_done) {
  26259. $tco_result = $tco_loop($copy_v);
  26260. }
  26261. ;
  26262. return $tco_result;
  26263. };
  26264. return Data_Unfoldable.unfoldr(dictUnfoldable)(go)(new Data_List_Types.Cons(m, Data_List_Types.Nil.value));
  26265. };
  26266. };
  26267. var showTree = function showTree(dictShow) {
  26268. return function (dictShow1) {
  26269. return function (v) {
  26270. if (v instanceof Leaf) {
  26271. return "Leaf";
  26272. }
  26273. ;
  26274. if (v instanceof Two) {
  26275. return "Two (" + (showTree(dictShow)(dictShow1)(v.value0) + (") (" + (Data_Show.show(dictShow)(v.value1) + (") (" + (Data_Show.show(dictShow1)(v.value2) + (") (" + (showTree(dictShow)(dictShow1)(v.value3) + ")")))))));
  26276. }
  26277. ;
  26278. if (v instanceof Three) {
  26279. 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) + ")")))))))))))));
  26280. }
  26281. ;
  26282. throw new Error("Failed pattern match at Data.Map.Internal (line 153, column 1 - line 153, column 62): " + [v.constructor.name]);
  26283. };
  26284. };
  26285. };
  26286. var showMap = function showMap(dictShow) {
  26287. return function (dictShow1) {
  26288. return new Data_Show.Show(function (m) {
  26289. return "(fromFoldable " + (Data_Show.show(Data_Show.showArray(Data_Tuple.showTuple(dictShow)(dictShow1)))(toAscArray(m)) + ")");
  26290. });
  26291. };
  26292. };
  26293. var lookupLE = function lookupLE(dictOrd) {
  26294. return function (k) {
  26295. var comp = Data_Ord.compare(dictOrd);
  26296. var go = function go(v) {
  26297. if (v instanceof Leaf) {
  26298. return Data_Maybe.Nothing.value;
  26299. }
  26300. ;
  26301. if (v instanceof Two) {
  26302. var v2 = comp(k)(v.value1);
  26303. if (v2 instanceof Data_Ordering.EQ) {
  26304. return new Data_Maybe.Just({
  26305. key: v.value1,
  26306. value: v.value2
  26307. });
  26308. }
  26309. ;
  26310. if (v2 instanceof Data_Ordering.GT) {
  26311. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  26312. key: v.value1,
  26313. value: v.value2
  26314. })(go(v.value3)));
  26315. }
  26316. ;
  26317. if (v2 instanceof Data_Ordering.LT) {
  26318. return go(v.value0);
  26319. }
  26320. ;
  26321. throw new Error("Failed pattern match at Data.Map.Internal (line 225, column 33 - line 228, column 20): " + [v2.constructor.name]);
  26322. }
  26323. ;
  26324. if (v instanceof Three) {
  26325. var v3 = comp(k)(v.value4);
  26326. if (v3 instanceof Data_Ordering.EQ) {
  26327. return new Data_Maybe.Just({
  26328. key: v.value4,
  26329. value: v.value5
  26330. });
  26331. }
  26332. ;
  26333. if (v3 instanceof Data_Ordering.GT) {
  26334. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  26335. key: v.value4,
  26336. value: v.value5
  26337. })(go(v.value6)));
  26338. }
  26339. ;
  26340. if (v3 instanceof Data_Ordering.LT) {
  26341. return go(new Two(v.value0, v.value1, v.value2, v.value3));
  26342. }
  26343. ;
  26344. throw new Error("Failed pattern match at Data.Map.Internal (line 229, column 45 - line 232, column 36): " + [v3.constructor.name]);
  26345. }
  26346. ;
  26347. throw new Error("Failed pattern match at Data.Map.Internal (line 224, column 5 - line 224, column 22): " + [v.constructor.name]);
  26348. };
  26349. return go;
  26350. };
  26351. };
  26352. var lookupGE = function lookupGE(dictOrd) {
  26353. return function (k) {
  26354. var comp = Data_Ord.compare(dictOrd);
  26355. var go = function go(v) {
  26356. if (v instanceof Leaf) {
  26357. return Data_Maybe.Nothing.value;
  26358. }
  26359. ;
  26360. if (v instanceof Two) {
  26361. var v2 = comp(k)(v.value1);
  26362. if (v2 instanceof Data_Ordering.EQ) {
  26363. return new Data_Maybe.Just({
  26364. key: v.value1,
  26365. value: v.value2
  26366. });
  26367. }
  26368. ;
  26369. if (v2 instanceof Data_Ordering.LT) {
  26370. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  26371. key: v.value1,
  26372. value: v.value2
  26373. })(go(v.value0)));
  26374. }
  26375. ;
  26376. if (v2 instanceof Data_Ordering.GT) {
  26377. return go(v.value3);
  26378. }
  26379. ;
  26380. throw new Error("Failed pattern match at Data.Map.Internal (line 259, column 33 - line 262, column 21): " + [v2.constructor.name]);
  26381. }
  26382. ;
  26383. if (v instanceof Three) {
  26384. var v3 = comp(k)(v.value1);
  26385. if (v3 instanceof Data_Ordering.EQ) {
  26386. return new Data_Maybe.Just({
  26387. key: v.value1,
  26388. value: v.value2
  26389. });
  26390. }
  26391. ;
  26392. if (v3 instanceof Data_Ordering.LT) {
  26393. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  26394. key: v.value1,
  26395. value: v.value2
  26396. })(go(v.value0)));
  26397. }
  26398. ;
  26399. if (v3 instanceof Data_Ordering.GT) {
  26400. return go(new Two(v.value3, v.value4, v.value5, v.value6));
  26401. }
  26402. ;
  26403. throw new Error("Failed pattern match at Data.Map.Internal (line 263, column 45 - line 266, column 37): " + [v3.constructor.name]);
  26404. }
  26405. ;
  26406. throw new Error("Failed pattern match at Data.Map.Internal (line 258, column 5 - line 258, column 22): " + [v.constructor.name]);
  26407. };
  26408. return go;
  26409. };
  26410. };
  26411. var lookup = function lookup(dictOrd) {
  26412. return function (k) {
  26413. var comp = Data_Ord.compare(dictOrd);
  26414. var go = function go($copy_v) {
  26415. var $tco_done = false;
  26416. var $tco_result;
  26417. function $tco_loop(v) {
  26418. if (v instanceof Leaf) {
  26419. $tco_done = true;
  26420. return Data_Maybe.Nothing.value;
  26421. }
  26422. ;
  26423. if (v instanceof Two) {
  26424. var v2 = comp(k)(v.value1);
  26425. if (v2 instanceof Data_Ordering.EQ) {
  26426. $tco_done = true;
  26427. return new Data_Maybe.Just(v.value2);
  26428. }
  26429. ;
  26430. if (v2 instanceof Data_Ordering.LT) {
  26431. $copy_v = v.value0;
  26432. return;
  26433. }
  26434. ;
  26435. $copy_v = v.value3;
  26436. return;
  26437. }
  26438. ;
  26439. if (v instanceof Three) {
  26440. var v3 = comp(k)(v.value1);
  26441. if (v3 instanceof Data_Ordering.EQ) {
  26442. $tco_done = true;
  26443. return new Data_Maybe.Just(v.value2);
  26444. }
  26445. ;
  26446. var v4 = comp(k)(v.value4);
  26447. if (v4 instanceof Data_Ordering.EQ) {
  26448. $tco_done = true;
  26449. return new Data_Maybe.Just(v.value5);
  26450. }
  26451. ;
  26452. if (v3 instanceof Data_Ordering.LT) {
  26453. $copy_v = v.value0;
  26454. return;
  26455. }
  26456. ;
  26457. if (v4 instanceof Data_Ordering.GT) {
  26458. $copy_v = v.value6;
  26459. return;
  26460. }
  26461. ;
  26462. $copy_v = v.value3;
  26463. return;
  26464. }
  26465. ;
  26466. throw new Error("Failed pattern match at Data.Map.Internal (line 200, column 5 - line 200, column 22): " + [v.constructor.name]);
  26467. }
  26468. ;
  26469. while (!$tco_done) {
  26470. $tco_result = $tco_loop($copy_v);
  26471. }
  26472. ;
  26473. return $tco_result;
  26474. };
  26475. return go;
  26476. };
  26477. };
  26478. var member = function member(dictOrd) {
  26479. return function (k) {
  26480. return function (m) {
  26481. return Data_Maybe.isJust(lookup(dictOrd)(k)(m));
  26482. };
  26483. };
  26484. };
  26485. var keys = function keys(v) {
  26486. if (v instanceof Leaf) {
  26487. return Data_List_Types.Nil.value;
  26488. }
  26489. ;
  26490. if (v instanceof Two) {
  26491. 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)));
  26492. }
  26493. ;
  26494. if (v instanceof Three) {
  26495. 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)))));
  26496. }
  26497. ;
  26498. throw new Error("Failed pattern match at Data.Map.Internal (line 606, column 1 - line 606, column 38): " + [v.constructor.name]);
  26499. };
  26500. var isSubmap = function isSubmap(dictOrd) {
  26501. return function (dictEq) {
  26502. return function (m1) {
  26503. return function (m2) {
  26504. var f = function f(v) {
  26505. return Data_Eq.eq(Data_Maybe.eqMaybe(dictEq))(lookup(dictOrd)(v.value0)(m2))(new Data_Maybe.Just(v.value1));
  26506. };
  26507. return Data_Foldable.all(Data_List_Lazy_Types.foldableList)(Data_HeytingAlgebra.heytingAlgebraBoolean)(f)(toUnfoldable(Data_List_Lazy_Types.unfoldableList)(m1));
  26508. };
  26509. };
  26510. };
  26511. };
  26512. var isEmpty = function isEmpty(v) {
  26513. if (v instanceof Leaf) {
  26514. return true;
  26515. }
  26516. ;
  26517. return false;
  26518. };
  26519. var functorMap = new Data_Functor.Functor(function (v) {
  26520. return function (v1) {
  26521. if (v1 instanceof Leaf) {
  26522. return Leaf.value;
  26523. }
  26524. ;
  26525. if (v1 instanceof Two) {
  26526. return new Two(Data_Functor.map(functorMap)(v)(v1.value0), v1.value1, v(v1.value2), Data_Functor.map(functorMap)(v)(v1.value3));
  26527. }
  26528. ;
  26529. if (v1 instanceof Three) {
  26530. 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));
  26531. }
  26532. ;
  26533. throw new Error("Failed pattern match at Data.Map.Internal (line 96, column 1 - line 99, column 110): " + [v.constructor.name, v1.constructor.name]);
  26534. };
  26535. });
  26536. var functorWithIndexMap = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  26537. return functorMap;
  26538. }, function (v) {
  26539. return function (v1) {
  26540. if (v1 instanceof Leaf) {
  26541. return Leaf.value;
  26542. }
  26543. ;
  26544. if (v1 instanceof Two) {
  26545. return new Two(Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value0), v1.value1, v(v1.value1)(v1.value2), Data_FunctorWithIndex.mapWithIndex(functorWithIndexMap)(v)(v1.value3));
  26546. }
  26547. ;
  26548. if (v1 instanceof Three) {
  26549. 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));
  26550. }
  26551. ;
  26552. throw new Error("Failed pattern match at Data.Map.Internal (line 101, column 1 - line 104, column 152): " + [v.constructor.name, v1.constructor.name]);
  26553. };
  26554. });
  26555. var fromZipper = function fromZipper($copy_dictOrd) {
  26556. return function ($copy_v) {
  26557. return function ($copy_tree) {
  26558. var $tco_var_dictOrd = $copy_dictOrd;
  26559. var $tco_var_v = $copy_v;
  26560. var $tco_done = false;
  26561. var $tco_result;
  26562. function $tco_loop(dictOrd, v, tree) {
  26563. if (v instanceof Data_List_Types.Nil) {
  26564. $tco_done = true;
  26565. return tree;
  26566. }
  26567. ;
  26568. if (v instanceof Data_List_Types.Cons) {
  26569. if (v.value0 instanceof TwoLeft) {
  26570. $tco_var_dictOrd = dictOrd;
  26571. $tco_var_v = v.value1;
  26572. $copy_tree = new Two(tree, v.value0.value0, v.value0.value1, v.value0.value2);
  26573. return;
  26574. }
  26575. ;
  26576. if (v.value0 instanceof TwoRight) {
  26577. $tco_var_dictOrd = dictOrd;
  26578. $tco_var_v = v.value1;
  26579. $copy_tree = new Two(v.value0.value0, v.value0.value1, v.value0.value2, tree);
  26580. return;
  26581. }
  26582. ;
  26583. if (v.value0 instanceof ThreeLeft) {
  26584. $tco_var_dictOrd = dictOrd;
  26585. $tco_var_v = v.value1;
  26586. $copy_tree = new Three(tree, v.value0.value0, v.value0.value1, v.value0.value2, v.value0.value3, v.value0.value4, v.value0.value5);
  26587. return;
  26588. }
  26589. ;
  26590. if (v.value0 instanceof ThreeMiddle) {
  26591. $tco_var_dictOrd = dictOrd;
  26592. $tco_var_v = v.value1;
  26593. $copy_tree = new Three(v.value0.value0, v.value0.value1, v.value0.value2, tree, v.value0.value3, v.value0.value4, v.value0.value5);
  26594. return;
  26595. }
  26596. ;
  26597. if (v.value0 instanceof ThreeRight) {
  26598. $tco_var_dictOrd = dictOrd;
  26599. $tco_var_v = v.value1;
  26600. $copy_tree = new Three(v.value0.value0, v.value0.value1, v.value0.value2, v.value0.value3, v.value0.value4, v.value0.value5, tree);
  26601. return;
  26602. }
  26603. ;
  26604. throw new Error("Failed pattern match at Data.Map.Internal (line 418, column 3 - line 423, column 88): " + [v.value0.constructor.name]);
  26605. }
  26606. ;
  26607. throw new Error("Failed pattern match at Data.Map.Internal (line 415, column 1 - line 415, column 80): " + [v.constructor.name, tree.constructor.name]);
  26608. }
  26609. ;
  26610. while (!$tco_done) {
  26611. $tco_result = $tco_loop($tco_var_dictOrd, $tco_var_v, $copy_tree);
  26612. }
  26613. ;
  26614. return $tco_result;
  26615. };
  26616. };
  26617. };
  26618. var insert = function insert(dictOrd) {
  26619. return function (k) {
  26620. return function (v) {
  26621. var up = function up($copy_v1) {
  26622. return function ($copy_v2) {
  26623. var $tco_var_v1 = $copy_v1;
  26624. var $tco_done = false;
  26625. var $tco_result;
  26626. function $tco_loop(v1, v2) {
  26627. if (v1 instanceof Data_List_Types.Nil) {
  26628. $tco_done = true;
  26629. return new Two(v2.value0, v2.value1, v2.value2, v2.value3);
  26630. }
  26631. ;
  26632. if (v1 instanceof Data_List_Types.Cons) {
  26633. if (v1.value0 instanceof TwoLeft) {
  26634. $tco_done = true;
  26635. return fromZipper(dictOrd)(v1.value1)(new Three(v2.value0, v2.value1, v2.value2, v2.value3, v1.value0.value0, v1.value0.value1, v1.value0.value2));
  26636. }
  26637. ;
  26638. if (v1.value0 instanceof TwoRight) {
  26639. $tco_done = true;
  26640. return fromZipper(dictOrd)(v1.value1)(new Three(v1.value0.value0, v1.value0.value1, v1.value0.value2, v2.value0, v2.value1, v2.value2, v2.value3));
  26641. }
  26642. ;
  26643. if (v1.value0 instanceof ThreeLeft) {
  26644. $tco_var_v1 = v1.value1;
  26645. $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));
  26646. return;
  26647. }
  26648. ;
  26649. if (v1.value0 instanceof ThreeMiddle) {
  26650. $tco_var_v1 = v1.value1;
  26651. $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));
  26652. return;
  26653. }
  26654. ;
  26655. if (v1.value0 instanceof ThreeRight) {
  26656. $tco_var_v1 = v1.value1;
  26657. $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));
  26658. return;
  26659. }
  26660. ;
  26661. 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]);
  26662. }
  26663. ;
  26664. throw new Error("Failed pattern match at Data.Map.Internal (line 451, column 3 - line 451, column 56): " + [v1.constructor.name, v2.constructor.name]);
  26665. }
  26666. ;
  26667. while (!$tco_done) {
  26668. $tco_result = $tco_loop($tco_var_v1, $copy_v2);
  26669. }
  26670. ;
  26671. return $tco_result;
  26672. };
  26673. };
  26674. var comp = Data_Ord.compare(dictOrd);
  26675. var down = function down($copy_ctx) {
  26676. return function ($copy_v1) {
  26677. var $tco_var_ctx = $copy_ctx;
  26678. var $tco_done = false;
  26679. var $tco_result;
  26680. function $tco_loop(ctx, v1) {
  26681. if (v1 instanceof Leaf) {
  26682. $tco_done = true;
  26683. return up(ctx)(new KickUp(Leaf.value, k, v, Leaf.value));
  26684. }
  26685. ;
  26686. if (v1 instanceof Two) {
  26687. var v2 = comp(k)(v1.value1);
  26688. if (v2 instanceof Data_Ordering.EQ) {
  26689. $tco_done = true;
  26690. return fromZipper(dictOrd)(ctx)(new Two(v1.value0, k, v, v1.value3));
  26691. }
  26692. ;
  26693. if (v2 instanceof Data_Ordering.LT) {
  26694. $tco_var_ctx = new Data_List_Types.Cons(new TwoLeft(v1.value1, v1.value2, v1.value3), ctx);
  26695. $copy_v1 = v1.value0;
  26696. return;
  26697. }
  26698. ;
  26699. $tco_var_ctx = new Data_List_Types.Cons(new TwoRight(v1.value0, v1.value1, v1.value2), ctx);
  26700. $copy_v1 = v1.value3;
  26701. return;
  26702. }
  26703. ;
  26704. if (v1 instanceof Three) {
  26705. var v3 = comp(k)(v1.value1);
  26706. if (v3 instanceof Data_Ordering.EQ) {
  26707. $tco_done = true;
  26708. return fromZipper(dictOrd)(ctx)(new Three(v1.value0, k, v, v1.value3, v1.value4, v1.value5, v1.value6));
  26709. }
  26710. ;
  26711. var v4 = comp(k)(v1.value4);
  26712. if (v4 instanceof Data_Ordering.EQ) {
  26713. $tco_done = true;
  26714. return fromZipper(dictOrd)(ctx)(new Three(v1.value0, v1.value1, v1.value2, v1.value3, k, v, v1.value6));
  26715. }
  26716. ;
  26717. if (v3 instanceof Data_Ordering.LT) {
  26718. $tco_var_ctx = new Data_List_Types.Cons(new ThreeLeft(v1.value1, v1.value2, v1.value3, v1.value4, v1.value5, v1.value6), ctx);
  26719. $copy_v1 = v1.value0;
  26720. return;
  26721. }
  26722. ;
  26723. if (v3 instanceof Data_Ordering.GT && v4 instanceof Data_Ordering.LT) {
  26724. $tco_var_ctx = new Data_List_Types.Cons(new ThreeMiddle(v1.value0, v1.value1, v1.value2, v1.value4, v1.value5, v1.value6), ctx);
  26725. $copy_v1 = v1.value3;
  26726. return;
  26727. }
  26728. ;
  26729. $tco_var_ctx = new Data_List_Types.Cons(new ThreeRight(v1.value0, v1.value1, v1.value2, v1.value3, v1.value4, v1.value5), ctx);
  26730. $copy_v1 = v1.value6;
  26731. return;
  26732. }
  26733. ;
  26734. throw new Error("Failed pattern match at Data.Map.Internal (line 434, column 3 - line 434, column 55): " + [ctx.constructor.name, v1.constructor.name]);
  26735. }
  26736. ;
  26737. while (!$tco_done) {
  26738. $tco_result = $tco_loop($tco_var_ctx, $copy_v1);
  26739. }
  26740. ;
  26741. return $tco_result;
  26742. };
  26743. };
  26744. return down(Data_List_Types.Nil.value);
  26745. };
  26746. };
  26747. };
  26748. var pop = function pop(dictOrd) {
  26749. return function (k) {
  26750. var up = function up($copy_ctxs) {
  26751. return function ($copy_tree) {
  26752. var $tco_var_ctxs = $copy_ctxs;
  26753. var $tco_done = false;
  26754. var $tco_result;
  26755. function $tco_loop(ctxs, tree) {
  26756. if (ctxs instanceof Data_List_Types.Nil) {
  26757. $tco_done = true;
  26758. return tree;
  26759. }
  26760. ;
  26761. if (ctxs instanceof Data_List_Types.Cons) {
  26762. if (ctxs.value0 instanceof TwoLeft && ctxs.value0.value2 instanceof Leaf && tree instanceof Leaf) {
  26763. $tco_done = true;
  26764. return fromZipper(dictOrd)(ctxs.value1)(new Two(Leaf.value, ctxs.value0.value0, ctxs.value0.value1, Leaf.value));
  26765. }
  26766. ;
  26767. if (ctxs.value0 instanceof TwoRight && ctxs.value0.value0 instanceof Leaf && tree instanceof Leaf) {
  26768. $tco_done = true;
  26769. return fromZipper(dictOrd)(ctxs.value1)(new Two(Leaf.value, ctxs.value0.value1, ctxs.value0.value2, Leaf.value));
  26770. }
  26771. ;
  26772. if (ctxs.value0 instanceof TwoLeft && ctxs.value0.value2 instanceof Two) {
  26773. $tco_var_ctxs = ctxs.value1;
  26774. $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);
  26775. return;
  26776. }
  26777. ;
  26778. if (ctxs.value0 instanceof TwoRight && ctxs.value0.value0 instanceof Two) {
  26779. $tco_var_ctxs = ctxs.value1;
  26780. $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);
  26781. return;
  26782. }
  26783. ;
  26784. if (ctxs.value0 instanceof TwoLeft && ctxs.value0.value2 instanceof Three) {
  26785. $tco_done = true;
  26786. 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)));
  26787. }
  26788. ;
  26789. if (ctxs.value0 instanceof TwoRight && ctxs.value0.value0 instanceof Three) {
  26790. $tco_done = true;
  26791. 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)));
  26792. }
  26793. ;
  26794. if (ctxs.value0 instanceof ThreeLeft && ctxs.value0.value2 instanceof Leaf && ctxs.value0.value5 instanceof Leaf && tree instanceof Leaf) {
  26795. $tco_done = true;
  26796. 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));
  26797. }
  26798. ;
  26799. if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value0 instanceof Leaf && ctxs.value0.value5 instanceof Leaf && tree instanceof Leaf) {
  26800. $tco_done = true;
  26801. 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));
  26802. }
  26803. ;
  26804. if (ctxs.value0 instanceof ThreeRight && ctxs.value0.value0 instanceof Leaf && ctxs.value0.value3 instanceof Leaf && tree instanceof Leaf) {
  26805. $tco_done = true;
  26806. 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));
  26807. }
  26808. ;
  26809. if (ctxs.value0 instanceof ThreeLeft && ctxs.value0.value2 instanceof Two) {
  26810. $tco_done = true;
  26811. 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));
  26812. }
  26813. ;
  26814. if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value0 instanceof Two) {
  26815. $tco_done = true;
  26816. 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));
  26817. }
  26818. ;
  26819. if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value5 instanceof Two) {
  26820. $tco_done = true;
  26821. 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)));
  26822. }
  26823. ;
  26824. if (ctxs.value0 instanceof ThreeRight && ctxs.value0.value3 instanceof Two) {
  26825. $tco_done = true;
  26826. 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)));
  26827. }
  26828. ;
  26829. if (ctxs.value0 instanceof ThreeLeft && ctxs.value0.value2 instanceof Three) {
  26830. $tco_done = true;
  26831. 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));
  26832. }
  26833. ;
  26834. if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value0 instanceof Three) {
  26835. $tco_done = true;
  26836. 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));
  26837. }
  26838. ;
  26839. if (ctxs.value0 instanceof ThreeMiddle && ctxs.value0.value5 instanceof Three) {
  26840. $tco_done = true;
  26841. 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)));
  26842. }
  26843. ;
  26844. if (ctxs.value0 instanceof ThreeRight && ctxs.value0.value3 instanceof Three) {
  26845. $tco_done = true;
  26846. 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)));
  26847. }
  26848. ;
  26849. 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]);
  26850. }
  26851. ;
  26852. throw new Error("Failed pattern match at Data.Map.Internal (line 508, column 5 - line 528, column 136): " + [ctxs.constructor.name]);
  26853. }
  26854. ;
  26855. while (!$tco_done) {
  26856. $tco_result = $tco_loop($tco_var_ctxs, $copy_tree);
  26857. }
  26858. ;
  26859. return $tco_result;
  26860. };
  26861. };
  26862. var removeMaxNode = function removeMaxNode($copy_ctx) {
  26863. return function ($copy_m) {
  26864. var $tco_var_ctx = $copy_ctx;
  26865. var $tco_done = false;
  26866. var $tco_result;
  26867. function $tco_loop(ctx, m) {
  26868. if (m instanceof Two && m.value0 instanceof Leaf && m.value3 instanceof Leaf) {
  26869. $tco_done = true;
  26870. return up(ctx)(Leaf.value);
  26871. }
  26872. ;
  26873. if (m instanceof Two) {
  26874. $tco_var_ctx = new Data_List_Types.Cons(new TwoRight(m.value0, m.value1, m.value2), ctx);
  26875. $copy_m = m.value3;
  26876. return;
  26877. }
  26878. ;
  26879. if (m instanceof Three && m.value0 instanceof Leaf && m.value3 instanceof Leaf && m.value6 instanceof Leaf) {
  26880. $tco_done = true;
  26881. return up(new Data_List_Types.Cons(new TwoRight(Leaf.value, m.value1, m.value2), ctx))(Leaf.value);
  26882. }
  26883. ;
  26884. if (m instanceof Three) {
  26885. $tco_var_ctx = new Data_List_Types.Cons(new ThreeRight(m.value0, m.value1, m.value2, m.value3, m.value4, m.value5), ctx);
  26886. $copy_m = m.value6;
  26887. return;
  26888. }
  26889. ;
  26890. throw new Error("Failed pattern match at Data.Map.Internal (line 540, column 5 - line 544, column 107): " + [m.constructor.name]);
  26891. }
  26892. ;
  26893. while (!$tco_done) {
  26894. $tco_result = $tco_loop($tco_var_ctx, $copy_m);
  26895. }
  26896. ;
  26897. return $tco_result;
  26898. };
  26899. };
  26900. var maxNode = function maxNode($copy_m) {
  26901. var $tco_done = false;
  26902. var $tco_result;
  26903. function $tco_loop(m) {
  26904. if (m instanceof Two && m.value3 instanceof Leaf) {
  26905. $tco_done = true;
  26906. return {
  26907. key: m.value1,
  26908. value: m.value2
  26909. };
  26910. }
  26911. ;
  26912. if (m instanceof Two) {
  26913. $copy_m = m.value3;
  26914. return;
  26915. }
  26916. ;
  26917. if (m instanceof Three && m.value6 instanceof Leaf) {
  26918. $tco_done = true;
  26919. return {
  26920. key: m.value4,
  26921. value: m.value5
  26922. };
  26923. }
  26924. ;
  26925. if (m instanceof Three) {
  26926. $copy_m = m.value6;
  26927. return;
  26928. }
  26929. ;
  26930. throw new Error("Failed pattern match at Data.Map.Internal (line 531, column 33 - line 535, column 45): " + [m.constructor.name]);
  26931. }
  26932. ;
  26933. while (!$tco_done) {
  26934. $tco_result = $tco_loop($copy_m);
  26935. }
  26936. ;
  26937. return $tco_result;
  26938. };
  26939. var comp = Data_Ord.compare(dictOrd);
  26940. var down = function down($copy_ctx) {
  26941. return function ($copy_m) {
  26942. var $tco_var_ctx = $copy_ctx;
  26943. var $tco_done = false;
  26944. var $tco_result;
  26945. function $tco_loop(ctx, m) {
  26946. if (m instanceof Leaf) {
  26947. $tco_done = true;
  26948. return Data_Maybe.Nothing.value;
  26949. }
  26950. ;
  26951. if (m instanceof Two) {
  26952. var v = comp(k)(m.value1);
  26953. if (m.value3 instanceof Leaf && v instanceof Data_Ordering.EQ) {
  26954. $tco_done = true;
  26955. return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, up(ctx)(Leaf.value)));
  26956. }
  26957. ;
  26958. if (v instanceof Data_Ordering.EQ) {
  26959. var max = maxNode(m.value0);
  26960. $tco_done = true;
  26961. 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)));
  26962. }
  26963. ;
  26964. if (v instanceof Data_Ordering.LT) {
  26965. $tco_var_ctx = new Data_List_Types.Cons(new TwoLeft(m.value1, m.value2, m.value3), ctx);
  26966. $copy_m = m.value0;
  26967. return;
  26968. }
  26969. ;
  26970. $tco_var_ctx = new Data_List_Types.Cons(new TwoRight(m.value0, m.value1, m.value2), ctx);
  26971. $copy_m = m.value3;
  26972. return;
  26973. }
  26974. ;
  26975. if (m instanceof Three) {
  26976. var leaves = function () {
  26977. if (m.value0 instanceof Leaf && m.value3 instanceof Leaf && m.value6 instanceof Leaf) {
  26978. return true;
  26979. }
  26980. ;
  26981. return false;
  26982. }();
  26983. var v = comp(k)(m.value4);
  26984. var v3 = comp(k)(m.value1);
  26985. if (leaves && v3 instanceof Data_Ordering.EQ) {
  26986. $tco_done = true;
  26987. return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value2, fromZipper(dictOrd)(ctx)(new Two(Leaf.value, m.value4, m.value5, Leaf.value))));
  26988. }
  26989. ;
  26990. if (leaves && v instanceof Data_Ordering.EQ) {
  26991. $tco_done = true;
  26992. return new Data_Maybe.Just(new Data_Tuple.Tuple(m.value5, fromZipper(dictOrd)(ctx)(new Two(Leaf.value, m.value1, m.value2, Leaf.value))));
  26993. }
  26994. ;
  26995. if (v3 instanceof Data_Ordering.EQ) {
  26996. var max = maxNode(m.value0);
  26997. $tco_done = true;
  26998. 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)));
  26999. }
  27000. ;
  27001. if (v instanceof Data_Ordering.EQ) {
  27002. var max = maxNode(m.value3);
  27003. $tco_done = true;
  27004. 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)));
  27005. }
  27006. ;
  27007. if (v3 instanceof Data_Ordering.LT) {
  27008. $tco_var_ctx = new Data_List_Types.Cons(new ThreeLeft(m.value1, m.value2, m.value3, m.value4, m.value5, m.value6), ctx);
  27009. $copy_m = m.value0;
  27010. return;
  27011. }
  27012. ;
  27013. if (v3 instanceof Data_Ordering.GT && v instanceof Data_Ordering.LT) {
  27014. $tco_var_ctx = new Data_List_Types.Cons(new ThreeMiddle(m.value0, m.value1, m.value2, m.value4, m.value5, m.value6), ctx);
  27015. $copy_m = m.value3;
  27016. return;
  27017. }
  27018. ;
  27019. $tco_var_ctx = new Data_List_Types.Cons(new ThreeRight(m.value0, m.value1, m.value2, m.value3, m.value4, m.value5), ctx);
  27020. $copy_m = m.value6;
  27021. return;
  27022. }
  27023. ;
  27024. throw new Error("Failed pattern match at Data.Map.Internal (line 481, column 34 - line 504, column 80): " + [m.constructor.name]);
  27025. }
  27026. ;
  27027. while (!$tco_done) {
  27028. $tco_result = $tco_loop($tco_var_ctx, $copy_m);
  27029. }
  27030. ;
  27031. return $tco_result;
  27032. };
  27033. };
  27034. return down(Data_List_Types.Nil.value);
  27035. };
  27036. };
  27037. var foldableMap = new Data_Foldable.Foldable(function (dictMonoid) {
  27038. return function (f) {
  27039. return function (m) {
  27040. return Data_Foldable.foldMap(Data_List_Types.foldableList)(dictMonoid)(f)(values(m));
  27041. };
  27042. };
  27043. }, function (f) {
  27044. return function (z) {
  27045. return function (m) {
  27046. return Data_Foldable.foldl(Data_List_Types.foldableList)(f)(z)(values(m));
  27047. };
  27048. };
  27049. }, function (f) {
  27050. return function (z) {
  27051. return function (m) {
  27052. return Data_Foldable.foldr(Data_List_Types.foldableList)(f)(z)(values(m));
  27053. };
  27054. };
  27055. });
  27056. var traversableMap = new Data_Traversable.Traversable(function () {
  27057. return foldableMap;
  27058. }, function () {
  27059. return functorMap;
  27060. }, function (dictApplicative) {
  27061. return Data_Traversable.traverse(traversableMap)(dictApplicative)(Control_Category.identity(Control_Category.categoryFn));
  27062. }, function (dictApplicative) {
  27063. return function (f) {
  27064. return function (v) {
  27065. if (v instanceof Leaf) {
  27066. return Control_Applicative.pure(dictApplicative)(Leaf.value);
  27067. }
  27068. ;
  27069. if (v instanceof Two) {
  27070. 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));
  27071. }
  27072. ;
  27073. if (v instanceof Three) {
  27074. 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));
  27075. }
  27076. ;
  27077. throw new Error("Failed pattern match at Data.Map.Internal (line 119, column 1 - line 134, column 31): " + [f.constructor.name, v.constructor.name]);
  27078. };
  27079. };
  27080. });
  27081. var foldSubmap = function foldSubmap(dictOrd) {
  27082. return function (dictMonoid) {
  27083. return function (kmin) {
  27084. return function (kmax) {
  27085. return function (f) {
  27086. var tooSmall = function () {
  27087. if (kmin instanceof Data_Maybe.Just) {
  27088. return function (k) {
  27089. return Data_Ord.lessThan(dictOrd)(k)(kmin.value0);
  27090. };
  27091. }
  27092. ;
  27093. if (kmin instanceof Data_Maybe.Nothing) {
  27094. return Data_Function["const"](false);
  27095. }
  27096. ;
  27097. throw new Error("Failed pattern match at Data.Map.Internal (line 319, column 7 - line 323, column 22): " + [kmin.constructor.name]);
  27098. }();
  27099. var tooLarge = function () {
  27100. if (kmax instanceof Data_Maybe.Just) {
  27101. return function (k) {
  27102. return Data_Ord.greaterThan(dictOrd)(k)(kmax.value0);
  27103. };
  27104. }
  27105. ;
  27106. if (kmax instanceof Data_Maybe.Nothing) {
  27107. return Data_Function["const"](false);
  27108. }
  27109. ;
  27110. throw new Error("Failed pattern match at Data.Map.Internal (line 326, column 7 - line 330, column 22): " + [kmax.constructor.name]);
  27111. }();
  27112. var inBounds = function () {
  27113. if (kmin instanceof Data_Maybe.Just && kmax instanceof Data_Maybe.Just) {
  27114. return function (k) {
  27115. return Data_Ord.lessThanOrEq(dictOrd)(kmin.value0)(k) && Data_Ord.lessThanOrEq(dictOrd)(k)(kmax.value0);
  27116. };
  27117. }
  27118. ;
  27119. if (kmin instanceof Data_Maybe.Just && kmax instanceof Data_Maybe.Nothing) {
  27120. return function (k) {
  27121. return Data_Ord.lessThanOrEq(dictOrd)(kmin.value0)(k);
  27122. };
  27123. }
  27124. ;
  27125. if (kmin instanceof Data_Maybe.Nothing && kmax instanceof Data_Maybe.Just) {
  27126. return function (k) {
  27127. return Data_Ord.lessThanOrEq(dictOrd)(k)(kmax.value0);
  27128. };
  27129. }
  27130. ;
  27131. if (kmin instanceof Data_Maybe.Nothing && kmax instanceof Data_Maybe.Nothing) {
  27132. return Data_Function["const"](true);
  27133. }
  27134. ;
  27135. throw new Error("Failed pattern match at Data.Map.Internal (line 333, column 7 - line 341, column 21): " + [kmin.constructor.name, kmax.constructor.name]);
  27136. }();
  27137. var go = function go(v) {
  27138. if (v instanceof Leaf) {
  27139. return Data_Monoid.mempty(dictMonoid);
  27140. }
  27141. ;
  27142. if (v instanceof Two) {
  27143. return Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
  27144. var $633 = tooSmall(v.value1);
  27145. if ($633) {
  27146. return Data_Monoid.mempty(dictMonoid);
  27147. }
  27148. ;
  27149. return go(v.value0);
  27150. }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
  27151. var $634 = inBounds(v.value1);
  27152. if ($634) {
  27153. return f(v.value1)(v.value2);
  27154. }
  27155. ;
  27156. return Data_Monoid.mempty(dictMonoid);
  27157. }())(function () {
  27158. var $635 = tooLarge(v.value1);
  27159. if ($635) {
  27160. return Data_Monoid.mempty(dictMonoid);
  27161. }
  27162. ;
  27163. return go(v.value3);
  27164. }()));
  27165. }
  27166. ;
  27167. if (v instanceof Three) {
  27168. return Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
  27169. var $640 = tooSmall(v.value1);
  27170. if ($640) {
  27171. return Data_Monoid.mempty(dictMonoid);
  27172. }
  27173. ;
  27174. return go(v.value0);
  27175. }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
  27176. var $641 = inBounds(v.value1);
  27177. if ($641) {
  27178. return f(v.value1)(v.value2);
  27179. }
  27180. ;
  27181. return Data_Monoid.mempty(dictMonoid);
  27182. }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
  27183. var $642 = tooSmall(v.value4) || tooLarge(v.value1);
  27184. if ($642) {
  27185. return Data_Monoid.mempty(dictMonoid);
  27186. }
  27187. ;
  27188. return go(v.value3);
  27189. }())(Data_Semigroup.append(dictMonoid.Semigroup0())(function () {
  27190. var $643 = inBounds(v.value4);
  27191. if ($643) {
  27192. return f(v.value4)(v.value5);
  27193. }
  27194. ;
  27195. return Data_Monoid.mempty(dictMonoid);
  27196. }())(function () {
  27197. var $644 = tooLarge(v.value4);
  27198. if ($644) {
  27199. return Data_Monoid.mempty(dictMonoid);
  27200. }
  27201. ;
  27202. return go(v.value6);
  27203. }()))));
  27204. }
  27205. ;
  27206. throw new Error("Failed pattern match at Data.Map.Internal (line 359, column 10 - line 371, column 54): " + [v.constructor.name]);
  27207. };
  27208. return go;
  27209. };
  27210. };
  27211. };
  27212. };
  27213. };
  27214. var findMin = function () {
  27215. var go = function go($copy_v) {
  27216. return function ($copy_v1) {
  27217. var $tco_var_v = $copy_v;
  27218. var $tco_done = false;
  27219. var $tco_result;
  27220. function $tco_loop(v, v1) {
  27221. if (v1 instanceof Leaf) {
  27222. $tco_done = true;
  27223. return v;
  27224. }
  27225. ;
  27226. if (v1 instanceof Two) {
  27227. $tco_var_v = new Data_Maybe.Just({
  27228. key: v1.value1,
  27229. value: v1.value2
  27230. });
  27231. $copy_v1 = v1.value0;
  27232. return;
  27233. }
  27234. ;
  27235. if (v1 instanceof Three) {
  27236. $tco_var_v = new Data_Maybe.Just({
  27237. key: v1.value1,
  27238. value: v1.value2
  27239. });
  27240. $copy_v1 = v1.value0;
  27241. return;
  27242. }
  27243. ;
  27244. throw new Error("Failed pattern match at Data.Map.Internal (line 297, column 5 - line 297, column 22): " + [v.constructor.name, v1.constructor.name]);
  27245. }
  27246. ;
  27247. while (!$tco_done) {
  27248. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  27249. }
  27250. ;
  27251. return $tco_result;
  27252. };
  27253. };
  27254. return go(Data_Maybe.Nothing.value);
  27255. }();
  27256. var lookupGT = function lookupGT(dictOrd) {
  27257. return function (k) {
  27258. var comp = Data_Ord.compare(dictOrd);
  27259. var go = function go(v) {
  27260. if (v instanceof Leaf) {
  27261. return Data_Maybe.Nothing.value;
  27262. }
  27263. ;
  27264. if (v instanceof Two) {
  27265. var v2 = comp(k)(v.value1);
  27266. if (v2 instanceof Data_Ordering.EQ) {
  27267. return findMin(v.value3);
  27268. }
  27269. ;
  27270. if (v2 instanceof Data_Ordering.LT) {
  27271. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  27272. key: v.value1,
  27273. value: v.value2
  27274. })(go(v.value0)));
  27275. }
  27276. ;
  27277. if (v2 instanceof Data_Ordering.GT) {
  27278. return go(v.value3);
  27279. }
  27280. ;
  27281. throw new Error("Failed pattern match at Data.Map.Internal (line 276, column 33 - line 279, column 21): " + [v2.constructor.name]);
  27282. }
  27283. ;
  27284. if (v instanceof Three) {
  27285. var v3 = comp(k)(v.value1);
  27286. if (v3 instanceof Data_Ordering.EQ) {
  27287. return findMin(new Two(v.value3, v.value4, v.value5, v.value6));
  27288. }
  27289. ;
  27290. if (v3 instanceof Data_Ordering.LT) {
  27291. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  27292. key: v.value1,
  27293. value: v.value2
  27294. })(go(v.value0)));
  27295. }
  27296. ;
  27297. if (v3 instanceof Data_Ordering.GT) {
  27298. return go(new Two(v.value3, v.value4, v.value5, v.value6));
  27299. }
  27300. ;
  27301. throw new Error("Failed pattern match at Data.Map.Internal (line 280, column 45 - line 283, column 37): " + [v3.constructor.name]);
  27302. }
  27303. ;
  27304. throw new Error("Failed pattern match at Data.Map.Internal (line 275, column 5 - line 275, column 22): " + [v.constructor.name]);
  27305. };
  27306. return go;
  27307. };
  27308. };
  27309. var findMax = function () {
  27310. var go = function go($copy_v) {
  27311. return function ($copy_v1) {
  27312. var $tco_var_v = $copy_v;
  27313. var $tco_done = false;
  27314. var $tco_result;
  27315. function $tco_loop(v, v1) {
  27316. if (v1 instanceof Leaf) {
  27317. $tco_done = true;
  27318. return v;
  27319. }
  27320. ;
  27321. if (v1 instanceof Two) {
  27322. $tco_var_v = new Data_Maybe.Just({
  27323. key: v1.value1,
  27324. value: v1.value2
  27325. });
  27326. $copy_v1 = v1.value3;
  27327. return;
  27328. }
  27329. ;
  27330. if (v1 instanceof Three) {
  27331. $tco_var_v = new Data_Maybe.Just({
  27332. key: v1.value4,
  27333. value: v1.value5
  27334. });
  27335. $copy_v1 = v1.value6;
  27336. return;
  27337. }
  27338. ;
  27339. throw new Error("Failed pattern match at Data.Map.Internal (line 289, column 5 - line 289, column 22): " + [v.constructor.name, v1.constructor.name]);
  27340. }
  27341. ;
  27342. while (!$tco_done) {
  27343. $tco_result = $tco_loop($tco_var_v, $copy_v1);
  27344. }
  27345. ;
  27346. return $tco_result;
  27347. };
  27348. };
  27349. return go(Data_Maybe.Nothing.value);
  27350. }();
  27351. var lookupLT = function lookupLT(dictOrd) {
  27352. return function (k) {
  27353. var comp = Data_Ord.compare(dictOrd);
  27354. var go = function go(v) {
  27355. if (v instanceof Leaf) {
  27356. return Data_Maybe.Nothing.value;
  27357. }
  27358. ;
  27359. if (v instanceof Two) {
  27360. var v2 = comp(k)(v.value1);
  27361. if (v2 instanceof Data_Ordering.EQ) {
  27362. return findMax(v.value0);
  27363. }
  27364. ;
  27365. if (v2 instanceof Data_Ordering.GT) {
  27366. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  27367. key: v.value1,
  27368. value: v.value2
  27369. })(go(v.value3)));
  27370. }
  27371. ;
  27372. if (v2 instanceof Data_Ordering.LT) {
  27373. return go(v.value0);
  27374. }
  27375. ;
  27376. throw new Error("Failed pattern match at Data.Map.Internal (line 242, column 33 - line 245, column 20): " + [v2.constructor.name]);
  27377. }
  27378. ;
  27379. if (v instanceof Three) {
  27380. var v3 = comp(k)(v.value4);
  27381. if (v3 instanceof Data_Ordering.EQ) {
  27382. return findMax(new Two(v.value0, v.value1, v.value2, v.value3));
  27383. }
  27384. ;
  27385. if (v3 instanceof Data_Ordering.GT) {
  27386. return Data_Maybe.Just.create(Data_Maybe.fromMaybe({
  27387. key: v.value4,
  27388. value: v.value5
  27389. })(go(v.value6)));
  27390. }
  27391. ;
  27392. if (v3 instanceof Data_Ordering.LT) {
  27393. return go(new Two(v.value0, v.value1, v.value2, v.value3));
  27394. }
  27395. ;
  27396. throw new Error("Failed pattern match at Data.Map.Internal (line 246, column 45 - line 249, column 36): " + [v3.constructor.name]);
  27397. }
  27398. ;
  27399. throw new Error("Failed pattern match at Data.Map.Internal (line 241, column 5 - line 241, column 22): " + [v.constructor.name]);
  27400. };
  27401. return go;
  27402. };
  27403. };
  27404. var eqMap = function eqMap(dictEq) {
  27405. return function (dictEq1) {
  27406. return new Data_Eq.Eq(function (m1) {
  27407. return function (m2) {
  27408. return Data_Eq.eq(Data_Eq.eqArray(Data_Tuple.eqTuple(dictEq)(dictEq1)))(toAscArray(m1))(toAscArray(m2));
  27409. };
  27410. });
  27411. };
  27412. };
  27413. var ordMap = function ordMap(dictOrd) {
  27414. return function (dictOrd1) {
  27415. return new Data_Ord.Ord(function () {
  27416. return eqMap(dictOrd.Eq0())(dictOrd1.Eq0());
  27417. }, function (m1) {
  27418. return function (m2) {
  27419. return Data_Ord.compare(Data_Ord.ordArray(Data_Tuple.ordTuple(dictOrd)(dictOrd1)))(toAscArray(m1))(toAscArray(m2));
  27420. };
  27421. });
  27422. };
  27423. };
  27424. var eq1Map = function eq1Map(dictEq) {
  27425. return new Data_Eq.Eq1(function (dictEq1) {
  27426. return Data_Eq.eq(eqMap(dictEq)(dictEq1));
  27427. });
  27428. };
  27429. var ord1Map = function ord1Map(dictOrd) {
  27430. return new Data_Ord.Ord1(function () {
  27431. return eq1Map(dictOrd.Eq0());
  27432. }, function (dictOrd1) {
  27433. return Data_Ord.compare(ordMap(dictOrd)(dictOrd1));
  27434. });
  27435. };
  27436. var empty = Leaf.value;
  27437. var fromFoldable = function fromFoldable(dictOrd) {
  27438. return function (dictFoldable) {
  27439. return Data_Foldable.foldl(dictFoldable)(function (m) {
  27440. return function (v) {
  27441. return insert(dictOrd)(v.value0)(v.value1)(m);
  27442. };
  27443. })(empty);
  27444. };
  27445. };
  27446. var filterWithKey = function filterWithKey(dictOrd) {
  27447. return function (predicate) {
  27448. var $758 = fromFoldable(dictOrd)(Data_List_Lazy_Types.foldableList);
  27449. var $759 = Data_List_Lazy.filter(Data_Tuple.uncurry(predicate));
  27450. var $760 = toUnfoldable(Data_List_Lazy_Types.unfoldableList);
  27451. return function ($761) {
  27452. return $758($759($760($761)));
  27453. };
  27454. };
  27455. };
  27456. var filter = function filter(dictOrd) {
  27457. return function (predicate) {
  27458. return filterWithKey(dictOrd)(Data_Function["const"](predicate));
  27459. };
  27460. };
  27461. var filterKeys = function filterKeys(dictOrd) {
  27462. return function (predicate) {
  27463. return filterWithKey(dictOrd)(function ($762) {
  27464. return Data_Function["const"](predicate($762));
  27465. });
  27466. };
  27467. };
  27468. var fromFoldableWithIndex = function fromFoldableWithIndex(dictOrd) {
  27469. return function (dictFoldableWithIndex) {
  27470. return Data_FoldableWithIndex.foldlWithIndex(dictFoldableWithIndex)(function (k) {
  27471. return function (m) {
  27472. return function (v) {
  27473. return insert(dictOrd)(k)(v)(m);
  27474. };
  27475. };
  27476. })(empty);
  27477. };
  27478. };
  27479. var intersectionWith = function intersectionWith(dictOrd) {
  27480. return function (f) {
  27481. return function (m1) {
  27482. return function (m2) {
  27483. var go = function go($copy_v) {
  27484. return function ($copy_v1) {
  27485. return function ($copy_m) {
  27486. var $tco_var_v = $copy_v;
  27487. var $tco_var_v1 = $copy_v1;
  27488. var $tco_done = false;
  27489. var $tco_result;
  27490. function $tco_loop(v, v1, m) {
  27491. if (v instanceof Data_List_Types.Nil) {
  27492. $tco_done = true;
  27493. return m;
  27494. }
  27495. ;
  27496. if (v1 instanceof Data_List_Types.Nil) {
  27497. $tco_done = true;
  27498. return m;
  27499. }
  27500. ;
  27501. if (v instanceof Data_List_Types.Cons && v1 instanceof Data_List_Types.Cons) {
  27502. var v2 = Data_Ord.compare(dictOrd)(v.value0.value0)(v1.value0.value0);
  27503. if (v2 instanceof Data_Ordering.LT) {
  27504. $tco_var_v = v.value1;
  27505. $tco_var_v1 = v1;
  27506. $copy_m = m;
  27507. return;
  27508. }
  27509. ;
  27510. if (v2 instanceof Data_Ordering.EQ) {
  27511. $tco_var_v = v.value1;
  27512. $tco_var_v1 = v1.value1;
  27513. $copy_m = insert(dictOrd)(v.value0.value0)(f(v.value0.value1)(v1.value0.value1))(m);
  27514. return;
  27515. }
  27516. ;
  27517. if (v2 instanceof Data_Ordering.GT) {
  27518. $tco_var_v = v;
  27519. $tco_var_v1 = v1.value1;
  27520. $copy_m = m;
  27521. return;
  27522. }
  27523. ;
  27524. throw new Error("Failed pattern match at Data.Map.Internal (line 641, column 5 - line 644, column 27): " + [v2.constructor.name]);
  27525. }
  27526. ;
  27527. 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]);
  27528. }
  27529. ;
  27530. while (!$tco_done) {
  27531. $tco_result = $tco_loop($tco_var_v, $tco_var_v1, $copy_m);
  27532. }
  27533. ;
  27534. return $tco_result;
  27535. };
  27536. };
  27537. };
  27538. return go(toUnfoldable(Data_List_Types.unfoldableList)(m1))(toUnfoldable(Data_List_Types.unfoldableList)(m2))(empty);
  27539. };
  27540. };
  27541. };
  27542. };
  27543. var intersection = function intersection(dictOrd) {
  27544. return intersectionWith(dictOrd)(Data_Function["const"]);
  27545. };
  27546. var $$delete = function $$delete(dictOrd) {
  27547. return function (k) {
  27548. return function (m) {
  27549. return Data_Maybe.maybe(m)(Data_Tuple.snd)(pop(dictOrd)(k)(m));
  27550. };
  27551. };
  27552. };
  27553. var difference = function difference(dictOrd) {
  27554. return function (m1) {
  27555. return function (m2) {
  27556. return Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip($$delete(dictOrd)))(m1)(keys(m2));
  27557. };
  27558. };
  27559. };
  27560. var checkValid = function checkValid(tree) {
  27561. var allHeights = function allHeights(v) {
  27562. if (v instanceof Leaf) {
  27563. return Control_Applicative.pure(Data_List_Types.applicativeList)(0);
  27564. }
  27565. ;
  27566. if (v instanceof Two) {
  27567. return Data_Functor.map(Data_List_Types.functorList)(function (n) {
  27568. return n + 1 | 0;
  27569. })(Data_Semigroup.append(Data_List_Types.semigroupList)(allHeights(v.value0))(allHeights(v.value3)));
  27570. }
  27571. ;
  27572. if (v instanceof Three) {
  27573. return Data_Functor.map(Data_List_Types.functorList)(function (n) {
  27574. return n + 1 | 0;
  27575. })(Data_Semigroup.append(Data_List_Types.semigroupList)(allHeights(v.value0))(Data_Semigroup.append(Data_List_Types.semigroupList)(allHeights(v.value3))(allHeights(v.value6))));
  27576. }
  27577. ;
  27578. throw new Error("Failed pattern match at Data.Map.Internal (line 188, column 3 - line 188, column 36): " + [v.constructor.name]);
  27579. };
  27580. return Data_List.length(Data_List.nub(Data_Eq.eqInt)(allHeights(tree))) === 1;
  27581. };
  27582. var asList = Control_Category.identity(Control_Category.categoryFn);
  27583. var foldableWithIndexMap = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  27584. return foldableMap;
  27585. }, function (dictMonoid) {
  27586. return function (f) {
  27587. return function (m) {
  27588. return Data_Foldable.foldMap(Data_List_Types.foldableList)(dictMonoid)(Data_Tuple.uncurry(f))(asList(toUnfoldable(Data_List_Types.unfoldableList)(m)));
  27589. };
  27590. };
  27591. }, function (f) {
  27592. return function (z) {
  27593. return function (m) {
  27594. return Data_Foldable.foldl(Data_List_Types.foldableList)(function () {
  27595. var $763 = Data_Function.flip(f);
  27596. return function ($764) {
  27597. return Data_Tuple.uncurry($763($764));
  27598. };
  27599. }())(z)(asList(toUnfoldable(Data_List_Types.unfoldableList)(m)));
  27600. };
  27601. };
  27602. }, function (f) {
  27603. return function (z) {
  27604. return function (m) {
  27605. return Data_Foldable.foldr(Data_List_Types.foldableList)(Data_Tuple.uncurry(f))(z)(asList(toUnfoldable(Data_List_Types.unfoldableList)(m)));
  27606. };
  27607. };
  27608. });
  27609. var mapMaybeWithKey = function mapMaybeWithKey(dictOrd) {
  27610. return function (f) {
  27611. return Data_FoldableWithIndex.foldrWithIndex(foldableWithIndexMap)(function (k) {
  27612. return function (a) {
  27613. return function (acc) {
  27614. return Data_Maybe.maybe(acc)(function (b) {
  27615. return insert(dictOrd)(k)(b)(acc);
  27616. })(f(k)(a));
  27617. };
  27618. };
  27619. })(empty);
  27620. };
  27621. };
  27622. var mapMaybe = function mapMaybe(dictOrd) {
  27623. var $765 = mapMaybeWithKey(dictOrd);
  27624. return function ($766) {
  27625. return $765(Data_Function["const"]($766));
  27626. };
  27627. };
  27628. var traversableWithIndexMap = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  27629. return foldableWithIndexMap;
  27630. }, function () {
  27631. return functorWithIndexMap;
  27632. }, function () {
  27633. return traversableMap;
  27634. }, function (dictApplicative) {
  27635. return function (f) {
  27636. return function (v) {
  27637. if (v instanceof Leaf) {
  27638. return Control_Applicative.pure(dictApplicative)(Leaf.value);
  27639. }
  27640. ;
  27641. if (v instanceof Two) {
  27642. 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));
  27643. }
  27644. ;
  27645. if (v instanceof Three) {
  27646. 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));
  27647. }
  27648. ;
  27649. throw new Error("Failed pattern match at Data.Map.Internal (line 136, column 1 - line 150, column 40): " + [f.constructor.name, v.constructor.name]);
  27650. };
  27651. };
  27652. });
  27653. var alter = function alter(dictOrd) {
  27654. return function (f) {
  27655. return function (k) {
  27656. return function (m) {
  27657. var v = f(lookup(dictOrd)(k)(m));
  27658. if (v instanceof Data_Maybe.Nothing) {
  27659. return $$delete(dictOrd)(k)(m);
  27660. }
  27661. ;
  27662. if (v instanceof Data_Maybe.Just) {
  27663. return insert(dictOrd)(k)(v.value0)(m);
  27664. }
  27665. ;
  27666. throw new Error("Failed pattern match at Data.Map.Internal (line 549, column 15 - line 551, column 25): " + [v.constructor.name]);
  27667. };
  27668. };
  27669. };
  27670. };
  27671. var fromFoldableWith = function fromFoldableWith(dictOrd) {
  27672. return function (dictFoldable) {
  27673. return function (f) {
  27674. var combine = function combine(v) {
  27675. return function (v1) {
  27676. if (v1 instanceof Data_Maybe.Just) {
  27677. return Data_Maybe.Just.create(f(v)(v1.value0));
  27678. }
  27679. ;
  27680. if (v1 instanceof Data_Maybe.Nothing) {
  27681. return new Data_Maybe.Just(v);
  27682. }
  27683. ;
  27684. throw new Error("Failed pattern match at Data.Map.Internal (line 566, column 3 - line 566, column 38): " + [v.constructor.name, v1.constructor.name]);
  27685. };
  27686. };
  27687. return Data_Foldable.foldl(dictFoldable)(function (m) {
  27688. return function (v) {
  27689. return alter(dictOrd)(combine(v.value1))(v.value0)(m);
  27690. };
  27691. })(empty);
  27692. };
  27693. };
  27694. };
  27695. var insertWith = function insertWith(dictOrd) {
  27696. return function (f) {
  27697. return function (k) {
  27698. return function (v) {
  27699. return alter(dictOrd)(function () {
  27700. var $767 = Data_Maybe.maybe(v)(Data_Function.flip(f)(v));
  27701. return function ($768) {
  27702. return Data_Maybe.Just.create($767($768));
  27703. };
  27704. }())(k);
  27705. };
  27706. };
  27707. };
  27708. };
  27709. var unionWith = function unionWith(dictOrd) {
  27710. return function (f) {
  27711. return function (m1) {
  27712. return function (m2) {
  27713. var go = function go(m) {
  27714. return function (v) {
  27715. return alter(dictOrd)(function () {
  27716. var $769 = Data_Maybe.maybe(v.value1)(f(v.value1));
  27717. return function ($770) {
  27718. return Data_Maybe.Just.create($769($770));
  27719. };
  27720. }())(v.value0)(m);
  27721. };
  27722. };
  27723. return Data_Foldable.foldl(Data_List_Types.foldableList)(go)(m2)(toUnfoldable(Data_List_Types.unfoldableList)(m1));
  27724. };
  27725. };
  27726. };
  27727. };
  27728. var union = function union(dictOrd) {
  27729. return unionWith(dictOrd)(Data_Function["const"]);
  27730. };
  27731. var semigroupMap = function semigroupMap(dictOrd) {
  27732. return new Data_Semigroup.Semigroup(union(dictOrd));
  27733. };
  27734. var monoidMap = function monoidMap(dictOrd) {
  27735. return new Data_Monoid.Monoid(function () {
  27736. return semigroupMap(dictOrd);
  27737. }, empty);
  27738. };
  27739. var submap = function submap(dictOrd) {
  27740. return function (kmin) {
  27741. return function (kmax) {
  27742. return foldSubmap(dictOrd)(monoidMap(dictOrd))(kmin)(kmax)(singleton);
  27743. };
  27744. };
  27745. };
  27746. var unions = function unions(dictOrd) {
  27747. return function (dictFoldable) {
  27748. return Data_Foldable.foldl(dictFoldable)(union(dictOrd))(empty);
  27749. };
  27750. };
  27751. var update = function update(dictOrd) {
  27752. return function (f) {
  27753. return function (k) {
  27754. return function (m) {
  27755. return alter(dictOrd)(Data_Maybe.maybe(Data_Maybe.Nothing.value)(f))(k)(m);
  27756. };
  27757. };
  27758. };
  27759. };
  27760. module.exports = {
  27761. showTree: showTree,
  27762. empty: empty,
  27763. isEmpty: isEmpty,
  27764. singleton: singleton,
  27765. checkValid: checkValid,
  27766. insert: insert,
  27767. insertWith: insertWith,
  27768. lookup: lookup,
  27769. lookupLE: lookupLE,
  27770. lookupLT: lookupLT,
  27771. lookupGE: lookupGE,
  27772. lookupGT: lookupGT,
  27773. findMin: findMin,
  27774. findMax: findMax,
  27775. foldSubmap: foldSubmap,
  27776. submap: submap,
  27777. fromFoldable: fromFoldable,
  27778. fromFoldableWith: fromFoldableWith,
  27779. fromFoldableWithIndex: fromFoldableWithIndex,
  27780. toUnfoldable: toUnfoldable,
  27781. toUnfoldableUnordered: toUnfoldableUnordered,
  27782. "delete": $$delete,
  27783. pop: pop,
  27784. member: member,
  27785. alter: alter,
  27786. update: update,
  27787. keys: keys,
  27788. values: values,
  27789. union: union,
  27790. unionWith: unionWith,
  27791. unions: unions,
  27792. intersection: intersection,
  27793. intersectionWith: intersectionWith,
  27794. difference: difference,
  27795. isSubmap: isSubmap,
  27796. size: size,
  27797. filterWithKey: filterWithKey,
  27798. filterKeys: filterKeys,
  27799. filter: filter,
  27800. mapMaybeWithKey: mapMaybeWithKey,
  27801. mapMaybe: mapMaybe,
  27802. eq1Map: eq1Map,
  27803. eqMap: eqMap,
  27804. ord1Map: ord1Map,
  27805. ordMap: ordMap,
  27806. showMap: showMap,
  27807. semigroupMap: semigroupMap,
  27808. monoidMap: monoidMap,
  27809. functorMap: functorMap,
  27810. functorWithIndexMap: functorWithIndexMap,
  27811. foldableMap: foldableMap,
  27812. foldableWithIndexMap: foldableWithIndexMap,
  27813. traversableMap: traversableMap,
  27814. traversableWithIndexMap: traversableWithIndexMap
  27815. };
  27816. },{"../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) {
  27817. // Generated by purs version 0.13.6
  27818. "use strict";
  27819. var Control_Applicative = require("../Control.Applicative/index.js");
  27820. var Control_Bind = require("../Control.Bind/index.js");
  27821. var Control_Monad_Rec_Class = require("../Control.Monad.Rec.Class/index.js");
  27822. var Control_Monad_ST_Internal = require("../Control.Monad.ST.Internal/index.js");
  27823. var Data_Array = require("../Data.Array/index.js");
  27824. var Data_Array_ST = require("../Data.Array.ST/index.js");
  27825. var Data_Eq = require("../Data.Eq/index.js");
  27826. var Data_Foldable = require("../Data.Foldable/index.js");
  27827. var Data_Function = require("../Data.Function/index.js");
  27828. var Data_Functor = require("../Data.Functor/index.js");
  27829. var Data_List = require("../Data.List/index.js");
  27830. var Data_List_Types = require("../Data.List.Types/index.js");
  27831. var Data_Map_Internal = require("../Data.Map.Internal/index.js");
  27832. var Data_Maybe = require("../Data.Maybe/index.js");
  27833. var Data_Monoid = require("../Data.Monoid/index.js");
  27834. var Data_Ord = require("../Data.Ord/index.js");
  27835. var Data_Ordering = require("../Data.Ordering/index.js");
  27836. var Data_Semigroup = require("../Data.Semigroup/index.js");
  27837. var Data_Show = require("../Data.Show/index.js");
  27838. var Data_Unit = require("../Data.Unit/index.js");
  27839. var $$Set = function $$Set(x) {
  27840. return x;
  27841. };
  27842. var union = function union(dictOrd) {
  27843. return function (v) {
  27844. return function (v1) {
  27845. return Data_Map_Internal.union(dictOrd)(v)(v1);
  27846. };
  27847. };
  27848. };
  27849. var toList = function toList(v) {
  27850. return Data_Map_Internal.keys(v);
  27851. };
  27852. var toUnfoldable = function toUnfoldable(dictUnfoldable) {
  27853. var $63 = Data_List.toUnfoldable(dictUnfoldable);
  27854. return function ($64) {
  27855. return $63(toList($64));
  27856. };
  27857. };
  27858. var size = function size(v) {
  27859. return Data_Map_Internal.size(v);
  27860. };
  27861. var singleton = function singleton(a) {
  27862. return Data_Map_Internal.singleton(a)(Data_Unit.unit);
  27863. };
  27864. var showSet = function showSet(dictShow) {
  27865. return new Data_Show.Show(function (s) {
  27866. return "(fromFoldable " + (Data_Show.show(Data_List_Types.showList(dictShow))(toList(s)) + ")");
  27867. });
  27868. };
  27869. var semigroupSet = function semigroupSet(dictOrd) {
  27870. return new Data_Semigroup.Semigroup(union(dictOrd));
  27871. };
  27872. var member = function member(dictOrd) {
  27873. return function (a) {
  27874. return function (v) {
  27875. return Data_Map_Internal.member(dictOrd)(a)(v);
  27876. };
  27877. };
  27878. };
  27879. var isEmpty = function isEmpty(v) {
  27880. return Data_Map_Internal.isEmpty(v);
  27881. };
  27882. var insert = function insert(dictOrd) {
  27883. return function (a) {
  27884. return function (v) {
  27885. return Data_Map_Internal.insert(dictOrd)(a)(Data_Unit.unit)(v);
  27886. };
  27887. };
  27888. };
  27889. var foldableSet = new Data_Foldable.Foldable(function (dictMonoid) {
  27890. return function (f) {
  27891. var $65 = Data_Foldable.foldMap(Data_List_Types.foldableList)(dictMonoid)(f);
  27892. return function ($66) {
  27893. return $65(toList($66));
  27894. };
  27895. };
  27896. }, function (f) {
  27897. return function (x) {
  27898. var $67 = Data_Foldable.foldl(Data_List_Types.foldableList)(f)(x);
  27899. return function ($68) {
  27900. return $67(toList($68));
  27901. };
  27902. };
  27903. }, function (f) {
  27904. return function (x) {
  27905. var $69 = Data_Foldable.foldr(Data_List_Types.foldableList)(f)(x);
  27906. return function ($70) {
  27907. return $69(toList($70));
  27908. };
  27909. };
  27910. });
  27911. var findMin = function findMin(v) {
  27912. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v1) {
  27913. return v1.key;
  27914. })(Data_Map_Internal.findMin(v));
  27915. };
  27916. var findMax = function findMax(v) {
  27917. return Data_Functor.map(Data_Maybe.functorMaybe)(function (v1) {
  27918. return v1.key;
  27919. })(Data_Map_Internal.findMax(v));
  27920. };
  27921. var filter = function filter(dictOrd) {
  27922. return function (f) {
  27923. return function (v) {
  27924. return Data_Map_Internal.filterWithKey(dictOrd)(function (k) {
  27925. return function (v1) {
  27926. return f(k);
  27927. };
  27928. })(v);
  27929. };
  27930. };
  27931. };
  27932. var eqSet = function eqSet(dictEq) {
  27933. return new Data_Eq.Eq(function (v) {
  27934. return function (v1) {
  27935. return Data_Eq.eq(Data_Map_Internal.eqMap(dictEq)(Data_Eq.eqUnit))(v)(v1);
  27936. };
  27937. });
  27938. };
  27939. var ordSet = function ordSet(dictOrd) {
  27940. return new Data_Ord.Ord(function () {
  27941. return eqSet(dictOrd.Eq0());
  27942. }, function (s1) {
  27943. return function (s2) {
  27944. return Data_Ord.compare(Data_List_Types.ordList(dictOrd))(toList(s1))(toList(s2));
  27945. };
  27946. });
  27947. };
  27948. var eq1Set = new Data_Eq.Eq1(function (dictEq) {
  27949. return Data_Eq.eq(eqSet(dictEq));
  27950. });
  27951. var ord1Set = new Data_Ord.Ord1(function () {
  27952. return eq1Set;
  27953. }, function (dictOrd) {
  27954. return Data_Ord.compare(ordSet(dictOrd));
  27955. });
  27956. var empty = Data_Map_Internal.empty;
  27957. var fromFoldable = function fromFoldable(dictFoldable) {
  27958. return function (dictOrd) {
  27959. return Data_Foldable.foldl(dictFoldable)(function (m) {
  27960. return function (a) {
  27961. return insert(dictOrd)(a)(m);
  27962. };
  27963. })(empty);
  27964. };
  27965. };
  27966. var intersection = function intersection(dictOrd) {
  27967. return function (s1) {
  27968. return function (s2) {
  27969. var toArray = function () {
  27970. var $71 = Data_Array.fromFoldable(Data_List_Types.foldableList);
  27971. return function ($72) {
  27972. return $71(toList($72));
  27973. };
  27974. }();
  27975. var rs = toArray(s2);
  27976. var rl = Data_Array.length(rs);
  27977. var ls = toArray(s1);
  27978. var ll = Data_Array.length(ls);
  27979. var intersect = function intersect(acc) {
  27980. var go = function go(l) {
  27981. return function (r) {
  27982. var $58 = l < ll && r < rl;
  27983. if ($58) {
  27984. var v = Data_Ord.compare(dictOrd)(ls[l])(rs[r]);
  27985. if (v instanceof Data_Ordering.EQ) {
  27986. return function __do() {
  27987. Data_Array_ST.push(ls[l])(acc)();
  27988. return new Control_Monad_Rec_Class.Loop({
  27989. a: l + 1 | 0,
  27990. b: r + 1 | 0
  27991. });
  27992. };
  27993. }
  27994. ;
  27995. if (v instanceof Data_Ordering.LT) {
  27996. return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(new Control_Monad_Rec_Class.Loop({
  27997. a: l + 1 | 0,
  27998. b: r
  27999. }));
  28000. }
  28001. ;
  28002. if (v instanceof Data_Ordering.GT) {
  28003. return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(new Control_Monad_Rec_Class.Loop({
  28004. a: l,
  28005. b: r + 1 | 0
  28006. }));
  28007. }
  28008. ;
  28009. throw new Error("Failed pattern match at Data.Set (line 176, column 12 - line 181, column 43): " + [v.constructor.name]);
  28010. }
  28011. ;
  28012. return Control_Applicative.pure(Control_Monad_ST_Internal.applicativeST)(new Control_Monad_Rec_Class.Done(acc));
  28013. };
  28014. };
  28015. return Control_Monad_Rec_Class.tailRecM2(Control_Monad_ST_Internal.monadRecST)(go)(0)(0);
  28016. };
  28017. 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)());
  28018. };
  28019. };
  28020. };
  28021. var map = function map(dictOrd) {
  28022. return function (f) {
  28023. return Data_Foldable.foldl(foldableSet)(function (m) {
  28024. return function (a) {
  28025. return insert(dictOrd)(f(a))(m);
  28026. };
  28027. })(empty);
  28028. };
  28029. };
  28030. var mapMaybe = function mapMaybe(dictOrd) {
  28031. return function (f) {
  28032. return Data_Foldable.foldr(foldableSet)(function (a) {
  28033. return function (acc) {
  28034. return Data_Maybe.maybe(acc)(function (b) {
  28035. return insert(dictOrd)(b)(acc);
  28036. })(f(a));
  28037. };
  28038. })(empty);
  28039. };
  28040. };
  28041. var monoidSet = function monoidSet(dictOrd) {
  28042. return new Data_Monoid.Monoid(function () {
  28043. return semigroupSet(dictOrd);
  28044. }, empty);
  28045. };
  28046. var unions = function unions(dictFoldable) {
  28047. return function (dictOrd) {
  28048. return Data_Foldable.foldl(dictFoldable)(union(dictOrd))(empty);
  28049. };
  28050. };
  28051. var $$delete = function $$delete(dictOrd) {
  28052. return function (a) {
  28053. return function (v) {
  28054. return Data_Map_Internal["delete"](dictOrd)(a)(v);
  28055. };
  28056. };
  28057. };
  28058. var difference = function difference(dictOrd) {
  28059. return function (s1) {
  28060. return function (s2) {
  28061. return Data_Foldable.foldl(Data_List_Types.foldableList)(Data_Function.flip($$delete(dictOrd)))(s1)(toList(s2));
  28062. };
  28063. };
  28064. };
  28065. var subset = function subset(dictOrd) {
  28066. return function (s1) {
  28067. return function (s2) {
  28068. return isEmpty(difference(dictOrd)(s1)(s2));
  28069. };
  28070. };
  28071. };
  28072. var properSubset = function properSubset(dictOrd) {
  28073. return function (s1) {
  28074. return function (s2) {
  28075. return subset(dictOrd)(s1)(s2) && Data_Eq.notEq(eqSet(dictOrd.Eq0()))(s1)(s2);
  28076. };
  28077. };
  28078. };
  28079. var checkValid = function checkValid(v) {
  28080. return Data_Map_Internal.checkValid(v);
  28081. };
  28082. module.exports = {
  28083. fromFoldable: fromFoldable,
  28084. toUnfoldable: toUnfoldable,
  28085. empty: empty,
  28086. isEmpty: isEmpty,
  28087. singleton: singleton,
  28088. map: map,
  28089. checkValid: checkValid,
  28090. insert: insert,
  28091. member: member,
  28092. "delete": $$delete,
  28093. size: size,
  28094. findMin: findMin,
  28095. findMax: findMax,
  28096. union: union,
  28097. unions: unions,
  28098. difference: difference,
  28099. subset: subset,
  28100. properSubset: properSubset,
  28101. intersection: intersection,
  28102. filter: filter,
  28103. mapMaybe: mapMaybe,
  28104. eqSet: eqSet,
  28105. eq1Set: eq1Set,
  28106. showSet: showSet,
  28107. ordSet: ordSet,
  28108. ord1Set: ord1Set,
  28109. monoidSet: monoidSet,
  28110. semigroupSet: semigroupSet,
  28111. foldableSet: foldableSet
  28112. };
  28113. },{"../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) {
  28114. // Generated by purs version 0.13.6
  28115. "use strict";
  28116. var Control_Applicative = require("../Control.Applicative/index.js");
  28117. var Data_Array = require("../Data.Array/index.js");
  28118. var Data_Array_NonEmpty = require("../Data.Array.NonEmpty/index.js");
  28119. var Data_Boolean = require("../Data.Boolean/index.js");
  28120. var Data_Eq = require("../Data.Eq/index.js");
  28121. var Data_Functor = require("../Data.Functor/index.js");
  28122. var Data_Identity = require("../Data.Identity/index.js");
  28123. var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js");
  28124. var Data_List_Types = require("../Data.List.Types/index.js");
  28125. var Data_Map_Internal = require("../Data.Map.Internal/index.js");
  28126. var Data_Maybe = require("../Data.Maybe/index.js");
  28127. var Data_Set = require("../Data.Set/index.js");
  28128. var Data_Traversable = require("../Data.Traversable/index.js");
  28129. var Foreign_Object = require("../Foreign.Object/index.js");
  28130. var Index = function Index(ix) {
  28131. this.ix = ix;
  28132. };
  28133. var ix = function ix(dict) {
  28134. return dict.ix;
  28135. };
  28136. var indexSet = function indexSet(dictOrd) {
  28137. return new Index(function (x) {
  28138. return function (dictWander) {
  28139. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  28140. return function (coalg) {
  28141. var $40 = Control_Applicative.pure(dictApplicative);
  28142. var $41 = Data_Set.insert(dictOrd)(x);
  28143. return function ($42) {
  28144. return $40($41($42));
  28145. };
  28146. };
  28147. });
  28148. };
  28149. });
  28150. };
  28151. var indexNonEmptyArray = new Index(function (n) {
  28152. return function (dictWander) {
  28153. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  28154. return function (coalg) {
  28155. return function (xs) {
  28156. return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(xs))(function () {
  28157. var $43 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (x) {
  28158. return Data_Maybe.fromMaybe(xs)(Data_Array_NonEmpty.updateAt(n)(x)(xs));
  28159. });
  28160. return function ($44) {
  28161. return $43(coalg($44));
  28162. };
  28163. }())(Data_Array_NonEmpty.index(xs)(n));
  28164. };
  28165. };
  28166. });
  28167. };
  28168. });
  28169. var indexMaybe = new Index(function (v) {
  28170. return function (dictWander) {
  28171. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  28172. return Data_Traversable.traverse(Data_Traversable.traversableMaybe)(dictApplicative);
  28173. });
  28174. };
  28175. });
  28176. var indexMap = function indexMap(dictOrd) {
  28177. return new Index(function (k) {
  28178. return function (dictWander) {
  28179. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  28180. return function (coalg) {
  28181. return function (m) {
  28182. return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(m))(function () {
  28183. var $45 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (v) {
  28184. return Data_Map_Internal.insert(dictOrd)(k)(v)(m);
  28185. });
  28186. return function ($46) {
  28187. return $45(coalg($46));
  28188. };
  28189. }())(Data_Map_Internal.lookup(dictOrd)(k)(m));
  28190. };
  28191. };
  28192. });
  28193. };
  28194. });
  28195. };
  28196. var indexList = new Index(function (n) {
  28197. return function (dictWander) {
  28198. if (n < 0) {
  28199. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  28200. return function (v) {
  28201. return function (xs) {
  28202. return Control_Applicative.pure(dictApplicative)(xs);
  28203. };
  28204. };
  28205. });
  28206. }
  28207. ;
  28208. if (Data_Boolean.otherwise) {
  28209. var go = function go(dictApplicative) {
  28210. return function (v) {
  28211. return function (v1) {
  28212. return function (v2) {
  28213. if (v instanceof Data_List_Types.Nil) {
  28214. return Control_Applicative.pure(dictApplicative)(Data_List_Types.Nil.value);
  28215. }
  28216. ;
  28217. if (v instanceof Data_List_Types.Cons && v1 === 0) {
  28218. return Data_Functor.mapFlipped(dictApplicative.Apply0().Functor0())(v2(v.value0))(function (v3) {
  28219. return new Data_List_Types.Cons(v3, v.value1);
  28220. });
  28221. }
  28222. ;
  28223. if (v instanceof Data_List_Types.Cons) {
  28224. return Data_Functor.map(dictApplicative.Apply0().Functor0())(function (v3) {
  28225. return new Data_List_Types.Cons(v.value0, v3);
  28226. })(go(dictApplicative)(v.value1)(v1 - 1 | 0)(v2));
  28227. }
  28228. ;
  28229. 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]);
  28230. };
  28231. };
  28232. };
  28233. };
  28234. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  28235. return function (coalg) {
  28236. return function (xs) {
  28237. return go(dictApplicative)(xs)(n)(coalg);
  28238. };
  28239. };
  28240. });
  28241. }
  28242. ;
  28243. throw new Error("Failed pattern match at Data.Lens.Index (line 80, column 1 - line 86, column 56): " + [n.constructor.name]);
  28244. };
  28245. });
  28246. var indexIdentity = new Index(function (v) {
  28247. return function (dictWander) {
  28248. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  28249. return Data_Traversable.traverse(Data_Identity.traversableIdentity)(dictApplicative);
  28250. });
  28251. };
  28252. });
  28253. var indexForeignObject = new Index(function (k) {
  28254. return function (dictWander) {
  28255. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  28256. return function (coalg) {
  28257. return function (m) {
  28258. return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(m))(function () {
  28259. var $47 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (v) {
  28260. return Foreign_Object.insert(k)(v)(m);
  28261. });
  28262. return function ($48) {
  28263. return $47(coalg($48));
  28264. };
  28265. }())(Foreign_Object.lookup(k)(m));
  28266. };
  28267. };
  28268. });
  28269. };
  28270. });
  28271. var indexArray = new Index(function (n) {
  28272. return function (dictWander) {
  28273. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  28274. return function (coalg) {
  28275. return function (xs) {
  28276. return Data_Maybe.maybe(Control_Applicative.pure(dictApplicative)(xs))(function () {
  28277. var $49 = Data_Functor.map(dictApplicative.Apply0().Functor0())(function (x) {
  28278. return Data_Maybe.fromMaybe(xs)(Data_Array.updateAt(n)(x)(xs));
  28279. });
  28280. return function ($50) {
  28281. return $49(coalg($50));
  28282. };
  28283. }())(Data_Array.index(xs)(n));
  28284. };
  28285. };
  28286. });
  28287. };
  28288. });
  28289. var indexArr = function indexArr(dictEq) {
  28290. return new Index(function (i) {
  28291. return function (dictWander) {
  28292. return Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  28293. return function (coalg) {
  28294. return function (f) {
  28295. return Data_Functor.mapFlipped(dictApplicative.Apply0().Functor0())(coalg(f(i)))(function (a) {
  28296. return function (j) {
  28297. var $39 = Data_Eq.eq(dictEq)(i)(j);
  28298. if ($39) {
  28299. return a;
  28300. }
  28301. ;
  28302. return f(j);
  28303. };
  28304. });
  28305. };
  28306. };
  28307. });
  28308. };
  28309. });
  28310. };
  28311. module.exports = {
  28312. Index: Index,
  28313. ix: ix,
  28314. indexArr: indexArr,
  28315. indexMaybe: indexMaybe,
  28316. indexIdentity: indexIdentity,
  28317. indexArray: indexArray,
  28318. indexNonEmptyArray: indexNonEmptyArray,
  28319. indexList: indexList,
  28320. indexSet: indexSet,
  28321. indexMap: indexMap,
  28322. indexForeignObject: indexForeignObject
  28323. };
  28324. },{"../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) {
  28325. // Generated by purs version 0.13.6
  28326. "use strict";
  28327. var Data_Either = require("../Data.Either/index.js");
  28328. var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js");
  28329. var Data_Newtype = require("../Data.Newtype/index.js");
  28330. var Data_Profunctor = require("../Data.Profunctor/index.js");
  28331. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  28332. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  28333. var Data_Tuple = require("../Data.Tuple/index.js");
  28334. var Indexed = function Indexed(x) {
  28335. return x;
  28336. };
  28337. var profunctorIndexed = function profunctorIndexed(dictProfunctor) {
  28338. return new Data_Profunctor.Profunctor(function (f) {
  28339. return function (g) {
  28340. return function (v) {
  28341. return Data_Profunctor.dimap(dictProfunctor)(Data_Profunctor_Strong.second(Data_Profunctor_Strong.strongFn)(f))(g)(v);
  28342. };
  28343. };
  28344. });
  28345. };
  28346. var strongIndexed = function strongIndexed(dictStrong) {
  28347. return new Data_Profunctor_Strong.Strong(function () {
  28348. return profunctorIndexed(dictStrong.Profunctor0());
  28349. }, function (v) {
  28350. return Indexed(Data_Profunctor.lcmap(dictStrong.Profunctor0())(function (v1) {
  28351. return new Data_Tuple.Tuple(new Data_Tuple.Tuple(v1.value0, v1.value1.value0), v1.value1.value1);
  28352. })(Data_Profunctor_Strong.first(dictStrong)(v)));
  28353. }, function (v) {
  28354. return Indexed(Data_Profunctor.lcmap(dictStrong.Profunctor0())(function (v1) {
  28355. return new Data_Tuple.Tuple(v1.value1.value0, new Data_Tuple.Tuple(v1.value0, v1.value1.value1));
  28356. })(Data_Profunctor_Strong.second(dictStrong)(v)));
  28357. });
  28358. };
  28359. var newtypeIndexed = new Data_Newtype.Newtype(function (n) {
  28360. return n;
  28361. }, Indexed);
  28362. var choiceIndexed = function choiceIndexed(dictChoice) {
  28363. return new Data_Profunctor_Choice.Choice(function () {
  28364. return profunctorIndexed(dictChoice.Profunctor0());
  28365. }, function (v) {
  28366. return Indexed(Data_Profunctor.lcmap(dictChoice.Profunctor0())(function (v1) {
  28367. return Data_Either.either(function () {
  28368. var $47 = Data_Tuple.Tuple.create(v1.value0);
  28369. return function ($48) {
  28370. return Data_Either.Left.create($47($48));
  28371. };
  28372. }())(Data_Either.Right.create)(v1.value1);
  28373. })(Data_Profunctor_Choice.left(dictChoice)(v)));
  28374. }, function (v) {
  28375. return Indexed(Data_Profunctor.lcmap(dictChoice.Profunctor0())(function (v1) {
  28376. return Data_Either.either(Data_Either.Left.create)(function () {
  28377. var $49 = Data_Tuple.Tuple.create(v1.value0);
  28378. return function ($50) {
  28379. return Data_Either.Right.create($49($50));
  28380. };
  28381. }())(v1.value1);
  28382. })(Data_Profunctor_Choice.right(dictChoice)(v)));
  28383. });
  28384. };
  28385. var wanderIndexed = function wanderIndexed(dictWander) {
  28386. return new Data_Lens_Internal_Wander.Wander(function () {
  28387. return choiceIndexed(dictWander.Choice1());
  28388. }, function () {
  28389. return strongIndexed(dictWander.Strong0());
  28390. }, function (trav) {
  28391. return function (v) {
  28392. return Indexed(Data_Lens_Internal_Wander.wander(dictWander)(function (dictApplicative) {
  28393. return function (ia2fb) {
  28394. return function (v1) {
  28395. return trav(dictApplicative)(function () {
  28396. var $51 = Data_Tuple.Tuple.create(v1.value0);
  28397. return function ($52) {
  28398. return ia2fb($51($52));
  28399. };
  28400. }())(v1.value1);
  28401. };
  28402. };
  28403. })(v));
  28404. };
  28405. });
  28406. };
  28407. module.exports = {
  28408. Indexed: Indexed,
  28409. newtypeIndexed: newtypeIndexed,
  28410. profunctorIndexed: profunctorIndexed,
  28411. strongIndexed: strongIndexed,
  28412. choiceIndexed: choiceIndexed,
  28413. wanderIndexed: wanderIndexed
  28414. };
  28415. },{"../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) {
  28416. // Generated by purs version 0.13.6
  28417. "use strict";
  28418. var Data_Profunctor = require("../Data.Profunctor/index.js");
  28419. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  28420. var Data_Tuple = require("../Data.Tuple/index.js");
  28421. var Shop = function () {
  28422. function Shop(value0, value1) {
  28423. this.value0 = value0;
  28424. this.value1 = value1;
  28425. }
  28426. ;
  28427. Shop.create = function (value0) {
  28428. return function (value1) {
  28429. return new Shop(value0, value1);
  28430. };
  28431. };
  28432. return Shop;
  28433. }();
  28434. var profunctorShop = new Data_Profunctor.Profunctor(function (f) {
  28435. return function (g) {
  28436. return function (v) {
  28437. return new Shop(function ($30) {
  28438. return v.value0(f($30));
  28439. }, function (s) {
  28440. var $31 = v.value1(f(s));
  28441. return function ($32) {
  28442. return g($31($32));
  28443. };
  28444. });
  28445. };
  28446. };
  28447. });
  28448. var strongShop = new Data_Profunctor_Strong.Strong(function () {
  28449. return profunctorShop;
  28450. }, function (v) {
  28451. return new Shop(function (v1) {
  28452. return v.value0(v1.value0);
  28453. }, function (v1) {
  28454. return function (b) {
  28455. return new Data_Tuple.Tuple(v.value1(v1.value0)(b), v1.value1);
  28456. };
  28457. });
  28458. }, function (v) {
  28459. return new Shop(function (v1) {
  28460. return v.value0(v1.value1);
  28461. }, function (v1) {
  28462. return function (b) {
  28463. return new Data_Tuple.Tuple(v1.value0, v.value1(v1.value1)(b));
  28464. };
  28465. });
  28466. });
  28467. module.exports = {
  28468. Shop: Shop,
  28469. profunctorShop: profunctorShop,
  28470. strongShop: strongShop
  28471. };
  28472. },{"../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) {
  28473. // Generated by purs version 0.13.6
  28474. "use strict";
  28475. var Control_Apply = require("../Control.Apply/index.js");
  28476. var Control_Category = require("../Control.Category/index.js");
  28477. var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js");
  28478. var Data_Lens_Internal_Shop = require("../Data.Lens.Internal.Shop/index.js");
  28479. var Data_Newtype = require("../Data.Newtype/index.js");
  28480. var Data_Profunctor = require("../Data.Profunctor/index.js");
  28481. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  28482. var Data_Tuple = require("../Data.Tuple/index.js");
  28483. var withLens = function withLens(l) {
  28484. return function (f) {
  28485. var v = l(new Data_Lens_Internal_Shop.Shop(Control_Category.identity(Control_Category.categoryFn), function (v1) {
  28486. return function (b) {
  28487. return b;
  28488. };
  28489. }));
  28490. return f(v.value0)(v.value1);
  28491. };
  28492. };
  28493. var withIndexedLens = function withIndexedLens(l) {
  28494. return function (f) {
  28495. var v = l(new Data_Lens_Internal_Shop.Shop(Control_Category.identity(Control_Category.categoryFn), function (v1) {
  28496. return function (b) {
  28497. return b;
  28498. };
  28499. }));
  28500. return f(v.value0)(v.value1);
  28501. };
  28502. };
  28503. var lensStore = function lensStore(l) {
  28504. return withLens(l)(Control_Apply.lift2(Control_Apply.applyFn)(Data_Tuple.Tuple.create));
  28505. };
  28506. var lens$prime = function lens$prime(to) {
  28507. return function (dictStrong) {
  28508. return function (pab) {
  28509. return Data_Profunctor.dimap(dictStrong.Profunctor0())(to)(function (v) {
  28510. return v.value1(v.value0);
  28511. })(Data_Profunctor_Strong.first(dictStrong)(pab));
  28512. };
  28513. };
  28514. };
  28515. var lens = function lens(get) {
  28516. return function (set) {
  28517. return function (dictStrong) {
  28518. return lens$prime(function (s) {
  28519. return new Data_Tuple.Tuple(get(s), function (b) {
  28520. return set(s)(b);
  28521. });
  28522. })(dictStrong);
  28523. };
  28524. };
  28525. };
  28526. var ilens$prime = function ilens$prime(to) {
  28527. return function (dictStrong) {
  28528. return function (pab) {
  28529. return Data_Profunctor.dimap(dictStrong.Profunctor0())(to)(function (v) {
  28530. return v.value1(v.value0);
  28531. })(Data_Profunctor_Strong.first(dictStrong)(Data_Newtype.un(Data_Lens_Internal_Indexed.newtypeIndexed)(Data_Lens_Internal_Indexed.Indexed)(pab)));
  28532. };
  28533. };
  28534. };
  28535. var ilens = function ilens(get) {
  28536. return function (set) {
  28537. return function (dictStrong) {
  28538. return ilens$prime(function (s) {
  28539. return new Data_Tuple.Tuple(get(s), function (b) {
  28540. return set(s)(b);
  28541. });
  28542. })(dictStrong);
  28543. };
  28544. };
  28545. };
  28546. var cloneLens = function cloneLens(l) {
  28547. return function (dictStrong) {
  28548. return withLens(l)(function (x) {
  28549. return function (y) {
  28550. return function (p) {
  28551. return lens(x)(y)(dictStrong)(p);
  28552. };
  28553. };
  28554. });
  28555. };
  28556. };
  28557. var cloneIndexedLens = function cloneIndexedLens(l) {
  28558. return function (dictStrong) {
  28559. return withIndexedLens(l)(function (x) {
  28560. return function (y) {
  28561. return function (p) {
  28562. return ilens(x)(y)(dictStrong)(p);
  28563. };
  28564. };
  28565. });
  28566. };
  28567. };
  28568. module.exports = {
  28569. lens: lens,
  28570. "lens'": lens$prime,
  28571. withLens: withLens,
  28572. cloneLens: cloneLens,
  28573. ilens: ilens,
  28574. "ilens'": ilens$prime,
  28575. withIndexedLens: withIndexedLens,
  28576. cloneIndexedLens: cloneIndexedLens,
  28577. lensStore: lensStore
  28578. };
  28579. },{"../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) {
  28580. // Generated by purs version 0.13.6
  28581. "use strict";
  28582. var Control_Category = require("../Control.Category/index.js");
  28583. var Data_Function = require("../Data.Function/index.js");
  28584. var Data_Identity = require("../Data.Identity/index.js");
  28585. var Data_Lens_Index = require("../Data.Lens.Index/index.js");
  28586. var Data_Lens_Lens = require("../Data.Lens.Lens/index.js");
  28587. var Data_Map_Internal = require("../Data.Map.Internal/index.js");
  28588. var Data_Maybe = require("../Data.Maybe/index.js");
  28589. var Data_Newtype = require("../Data.Newtype/index.js");
  28590. var Data_Set = require("../Data.Set/index.js");
  28591. var Data_Unit = require("../Data.Unit/index.js");
  28592. var Foreign_Object = require("../Foreign.Object/index.js");
  28593. var At = function At(Index0, at) {
  28594. this.Index0 = Index0;
  28595. this.at = at;
  28596. };
  28597. var atSet = function atSet(dictOrd) {
  28598. return new At(function () {
  28599. return Data_Lens_Index.indexSet(dictOrd);
  28600. }, function (x) {
  28601. return function (dictStrong) {
  28602. var update = function update(v) {
  28603. if (v instanceof Data_Maybe.Nothing) {
  28604. return Data_Set["delete"](dictOrd)(x);
  28605. }
  28606. ;
  28607. if (v instanceof Data_Maybe.Just) {
  28608. return Data_Set.insert(dictOrd)(x);
  28609. }
  28610. ;
  28611. throw new Error("Failed pattern match at Data.Lens.At (line 51, column 7 - line 51, column 34): " + [v.constructor.name]);
  28612. };
  28613. var get = function get(xs) {
  28614. var $13 = Data_Set.member(dictOrd)(x)(xs);
  28615. if ($13) {
  28616. return new Data_Maybe.Just(Data_Unit.unit);
  28617. }
  28618. ;
  28619. return Data_Maybe.Nothing.value;
  28620. };
  28621. return Data_Lens_Lens.lens(get)(Data_Function.flip(update))(dictStrong);
  28622. };
  28623. });
  28624. };
  28625. var atMaybe = new At(function () {
  28626. return Data_Lens_Index.indexMaybe;
  28627. }, function (v) {
  28628. return function (dictStrong) {
  28629. return Data_Lens_Lens.lens(Control_Category.identity(Control_Category.categoryFn))(function (v1) {
  28630. return Control_Category.identity(Control_Category.categoryFn);
  28631. })(dictStrong);
  28632. };
  28633. });
  28634. var atMap = function atMap(dictOrd) {
  28635. return new At(function () {
  28636. return Data_Lens_Index.indexMap(dictOrd);
  28637. }, function (k) {
  28638. return function (dictStrong) {
  28639. return Data_Lens_Lens.lens(Data_Map_Internal.lookup(dictOrd)(k))(function (m) {
  28640. return Data_Maybe.maybe(Data_Map_Internal["delete"](dictOrd)(k)(m))(function (v) {
  28641. return Data_Map_Internal.insert(dictOrd)(k)(v)(m);
  28642. });
  28643. })(dictStrong);
  28644. };
  28645. });
  28646. };
  28647. var atIdentity = new At(function () {
  28648. return Data_Lens_Index.indexIdentity;
  28649. }, function (v) {
  28650. return function (dictStrong) {
  28651. return Data_Lens_Lens.lens(function () {
  28652. var $14 = Data_Newtype.unwrap(Data_Identity.newtypeIdentity);
  28653. return function ($15) {
  28654. return Data_Maybe.Just.create($14($15));
  28655. };
  28656. }())(Data_Function.flip(Data_Maybe.maybe)(Data_Identity.Identity))(dictStrong);
  28657. };
  28658. });
  28659. var atForeignObject = new At(function () {
  28660. return Data_Lens_Index.indexForeignObject;
  28661. }, function (k) {
  28662. return function (dictStrong) {
  28663. return Data_Lens_Lens.lens(Foreign_Object.lookup(k))(function (m) {
  28664. return Data_Maybe.maybe(Foreign_Object["delete"](k)(m))(function (v) {
  28665. return Foreign_Object.insert(k)(v)(m);
  28666. });
  28667. })(dictStrong);
  28668. };
  28669. });
  28670. var at = function at(dict) {
  28671. return dict.at;
  28672. };
  28673. module.exports = {
  28674. At: At,
  28675. at: at,
  28676. atIdentity: atIdentity,
  28677. atMaybe: atMaybe,
  28678. atSet: atSet,
  28679. atMap: atMap,
  28680. atForeignObject: atForeignObject
  28681. };
  28682. },{"../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) {
  28683. // Generated by purs version 0.13.6
  28684. "use strict";
  28685. var Data_Functor = require("../Data.Functor/index.js");
  28686. var Data_Void = require("../Data.Void/index.js");
  28687. var Contravariant = function Contravariant(cmap) {
  28688. this.cmap = cmap;
  28689. };
  28690. var cmap = function cmap(dict) {
  28691. return dict.cmap;
  28692. };
  28693. var cmapFlipped = function cmapFlipped(dictContravariant) {
  28694. return function (x) {
  28695. return function (f) {
  28696. return cmap(dictContravariant)(f)(x);
  28697. };
  28698. };
  28699. };
  28700. var coerce = function coerce(dictContravariant) {
  28701. return function (dictFunctor) {
  28702. return function (a) {
  28703. return Data_Functor.map(dictFunctor)(Data_Void.absurd)(cmap(dictContravariant)(Data_Void.absurd)(a));
  28704. };
  28705. };
  28706. };
  28707. var imapC = function imapC(dictContravariant) {
  28708. return function (v) {
  28709. return function (f) {
  28710. return cmap(dictContravariant)(f);
  28711. };
  28712. };
  28713. };
  28714. module.exports = {
  28715. cmap: cmap,
  28716. Contravariant: Contravariant,
  28717. cmapFlipped: cmapFlipped,
  28718. coerce: coerce,
  28719. imapC: imapC
  28720. };
  28721. },{"../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) {
  28722. // Generated by purs version 0.13.6
  28723. "use strict";
  28724. var Control_Applicative = require("../Control.Applicative/index.js");
  28725. var Control_Apply = require("../Control.Apply/index.js");
  28726. var Control_Semigroupoid = require("../Control.Semigroupoid/index.js");
  28727. var Data_Bifoldable = require("../Data.Bifoldable/index.js");
  28728. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  28729. var Data_Bitraversable = require("../Data.Bitraversable/index.js");
  28730. var Data_Eq = require("../Data.Eq/index.js");
  28731. var Data_Foldable = require("../Data.Foldable/index.js");
  28732. var Data_FoldableWithIndex = require("../Data.FoldableWithIndex/index.js");
  28733. var Data_Functor = require("../Data.Functor/index.js");
  28734. var Data_Functor_Contravariant = require("../Data.Functor.Contravariant/index.js");
  28735. var Data_Functor_Invariant = require("../Data.Functor.Invariant/index.js");
  28736. var Data_FunctorWithIndex = require("../Data.FunctorWithIndex/index.js");
  28737. var Data_Monoid = require("../Data.Monoid/index.js");
  28738. var Data_Newtype = require("../Data.Newtype/index.js");
  28739. var Data_Ord = require("../Data.Ord/index.js");
  28740. var Data_Semigroup = require("../Data.Semigroup/index.js");
  28741. var Data_Show = require("../Data.Show/index.js");
  28742. var Data_Traversable = require("../Data.Traversable/index.js");
  28743. var Data_TraversableWithIndex = require("../Data.TraversableWithIndex/index.js");
  28744. var Const = function Const(x) {
  28745. return x;
  28746. };
  28747. var showConst = function showConst(dictShow) {
  28748. return new Data_Show.Show(function (v) {
  28749. return "(Const " + (Data_Show.show(dictShow)(v) + ")");
  28750. });
  28751. };
  28752. var semiringConst = function semiringConst(dictSemiring) {
  28753. return dictSemiring;
  28754. };
  28755. var semigroupoidConst = new Control_Semigroupoid.Semigroupoid(function (v) {
  28756. return function (v1) {
  28757. return v1;
  28758. };
  28759. });
  28760. var semigroupConst = function semigroupConst(dictSemigroup) {
  28761. return dictSemigroup;
  28762. };
  28763. var ringConst = function ringConst(dictRing) {
  28764. return dictRing;
  28765. };
  28766. var ordConst = function ordConst(dictOrd) {
  28767. return dictOrd;
  28768. };
  28769. var newtypeConst = new Data_Newtype.Newtype(function (n) {
  28770. return n;
  28771. }, Const);
  28772. var monoidConst = function monoidConst(dictMonoid) {
  28773. return dictMonoid;
  28774. };
  28775. var heytingAlgebraConst = function heytingAlgebraConst(dictHeytingAlgebra) {
  28776. return dictHeytingAlgebra;
  28777. };
  28778. var functorConst = new Data_Functor.Functor(function (f) {
  28779. return function (m) {
  28780. return m;
  28781. };
  28782. });
  28783. var functorWithIndexConst = new Data_FunctorWithIndex.FunctorWithIndex(function () {
  28784. return functorConst;
  28785. }, function (v) {
  28786. return function (v1) {
  28787. return v1;
  28788. };
  28789. });
  28790. var invariantConst = new Data_Functor_Invariant.Invariant(Data_Functor_Invariant.imapF(functorConst));
  28791. var foldableConst = new Data_Foldable.Foldable(function (dictMonoid) {
  28792. return function (v) {
  28793. return function (v1) {
  28794. return Data_Monoid.mempty(dictMonoid);
  28795. };
  28796. };
  28797. }, function (v) {
  28798. return function (z) {
  28799. return function (v1) {
  28800. return z;
  28801. };
  28802. };
  28803. }, function (v) {
  28804. return function (z) {
  28805. return function (v1) {
  28806. return z;
  28807. };
  28808. };
  28809. });
  28810. var foldableWithIndexConst = new Data_FoldableWithIndex.FoldableWithIndex(function () {
  28811. return foldableConst;
  28812. }, function (dictMonoid) {
  28813. return function (v) {
  28814. return function (v1) {
  28815. return Data_Monoid.mempty(dictMonoid);
  28816. };
  28817. };
  28818. }, function (v) {
  28819. return function (z) {
  28820. return function (v1) {
  28821. return z;
  28822. };
  28823. };
  28824. }, function (v) {
  28825. return function (z) {
  28826. return function (v1) {
  28827. return z;
  28828. };
  28829. };
  28830. });
  28831. var traversableConst = new Data_Traversable.Traversable(function () {
  28832. return foldableConst;
  28833. }, function () {
  28834. return functorConst;
  28835. }, function (dictApplicative) {
  28836. return function (v) {
  28837. return Control_Applicative.pure(dictApplicative)(v);
  28838. };
  28839. }, function (dictApplicative) {
  28840. return function (v) {
  28841. return function (v1) {
  28842. return Control_Applicative.pure(dictApplicative)(v1);
  28843. };
  28844. };
  28845. });
  28846. var traversableWithIndexConst = new Data_TraversableWithIndex.TraversableWithIndex(function () {
  28847. return foldableWithIndexConst;
  28848. }, function () {
  28849. return functorWithIndexConst;
  28850. }, function () {
  28851. return traversableConst;
  28852. }, function (dictApplicative) {
  28853. return function (v) {
  28854. return function (v1) {
  28855. return Control_Applicative.pure(dictApplicative)(v1);
  28856. };
  28857. };
  28858. });
  28859. var euclideanRingConst = function euclideanRingConst(dictEuclideanRing) {
  28860. return dictEuclideanRing;
  28861. };
  28862. var eqConst = function eqConst(dictEq) {
  28863. return dictEq;
  28864. };
  28865. var eq1Const = function eq1Const(dictEq) {
  28866. return new Data_Eq.Eq1(function (dictEq1) {
  28867. return Data_Eq.eq(eqConst(dictEq));
  28868. });
  28869. };
  28870. var ord1Const = function ord1Const(dictOrd) {
  28871. return new Data_Ord.Ord1(function () {
  28872. return eq1Const(dictOrd.Eq0());
  28873. }, function (dictOrd1) {
  28874. return Data_Ord.compare(ordConst(dictOrd));
  28875. });
  28876. };
  28877. var contravariantConst = new Data_Functor_Contravariant.Contravariant(function (v) {
  28878. return function (v1) {
  28879. return v1;
  28880. };
  28881. });
  28882. var commutativeRingConst = function commutativeRingConst(dictCommutativeRing) {
  28883. return dictCommutativeRing;
  28884. };
  28885. var boundedConst = function boundedConst(dictBounded) {
  28886. return dictBounded;
  28887. };
  28888. var booleanAlgebraConst = function booleanAlgebraConst(dictBooleanAlgebra) {
  28889. return dictBooleanAlgebra;
  28890. };
  28891. var bifunctorConst = new Data_Bifunctor.Bifunctor(function (f) {
  28892. return function (v) {
  28893. return function (v1) {
  28894. return f(v1);
  28895. };
  28896. };
  28897. });
  28898. var bifoldableConst = new Data_Bifoldable.Bifoldable(function (dictMonoid) {
  28899. return function (f) {
  28900. return function (v) {
  28901. return function (v1) {
  28902. return f(v1);
  28903. };
  28904. };
  28905. };
  28906. }, function (f) {
  28907. return function (v) {
  28908. return function (z) {
  28909. return function (v1) {
  28910. return f(z)(v1);
  28911. };
  28912. };
  28913. };
  28914. }, function (f) {
  28915. return function (v) {
  28916. return function (z) {
  28917. return function (v1) {
  28918. return f(v1)(z);
  28919. };
  28920. };
  28921. };
  28922. });
  28923. var bitraversableConst = new Data_Bitraversable.Bitraversable(function () {
  28924. return bifoldableConst;
  28925. }, function () {
  28926. return bifunctorConst;
  28927. }, function (dictApplicative) {
  28928. return function (v) {
  28929. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Const)(v);
  28930. };
  28931. }, function (dictApplicative) {
  28932. return function (f) {
  28933. return function (v) {
  28934. return function (v1) {
  28935. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Const)(f(v1));
  28936. };
  28937. };
  28938. };
  28939. });
  28940. var applyConst = function applyConst(dictSemigroup) {
  28941. return new Control_Apply.Apply(function () {
  28942. return functorConst;
  28943. }, function (v) {
  28944. return function (v1) {
  28945. return Data_Semigroup.append(dictSemigroup)(v)(v1);
  28946. };
  28947. });
  28948. };
  28949. var applicativeConst = function applicativeConst(dictMonoid) {
  28950. return new Control_Applicative.Applicative(function () {
  28951. return applyConst(dictMonoid.Semigroup0());
  28952. }, function (v) {
  28953. return Data_Monoid.mempty(dictMonoid);
  28954. });
  28955. };
  28956. module.exports = {
  28957. Const: Const,
  28958. newtypeConst: newtypeConst,
  28959. eqConst: eqConst,
  28960. eq1Const: eq1Const,
  28961. ordConst: ordConst,
  28962. ord1Const: ord1Const,
  28963. boundedConst: boundedConst,
  28964. showConst: showConst,
  28965. semigroupoidConst: semigroupoidConst,
  28966. semigroupConst: semigroupConst,
  28967. monoidConst: monoidConst,
  28968. semiringConst: semiringConst,
  28969. ringConst: ringConst,
  28970. euclideanRingConst: euclideanRingConst,
  28971. commutativeRingConst: commutativeRingConst,
  28972. heytingAlgebraConst: heytingAlgebraConst,
  28973. booleanAlgebraConst: booleanAlgebraConst,
  28974. functorConst: functorConst,
  28975. bifunctorConst: bifunctorConst,
  28976. functorWithIndexConst: functorWithIndexConst,
  28977. invariantConst: invariantConst,
  28978. contravariantConst: contravariantConst,
  28979. applyConst: applyConst,
  28980. applicativeConst: applicativeConst,
  28981. foldableConst: foldableConst,
  28982. foldableWithIndexConst: foldableWithIndexConst,
  28983. bifoldableConst: bifoldableConst,
  28984. traversableConst: traversableConst,
  28985. traversableWithIndexConst: traversableWithIndexConst,
  28986. bitraversableConst: bitraversableConst
  28987. };
  28988. },{"../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) {
  28989. // Generated by purs version 0.13.6
  28990. "use strict";
  28991. var Cochoice = function Cochoice(Profunctor0, unleft, unright) {
  28992. this.Profunctor0 = Profunctor0;
  28993. this.unleft = unleft;
  28994. this.unright = unright;
  28995. };
  28996. var unright = function unright(dict) {
  28997. return dict.unright;
  28998. };
  28999. var unleft = function unleft(dict) {
  29000. return dict.unleft;
  29001. };
  29002. module.exports = {
  29003. unleft: unleft,
  29004. unright: unright,
  29005. Cochoice: Cochoice
  29006. };
  29007. },{}],"../output/Data.Lens.Internal.Forget/index.js":[function(require,module,exports) {
  29008. // Generated by purs version 0.13.6
  29009. "use strict";
  29010. var Data_Const = require("../Data.Const/index.js");
  29011. var Data_Either = require("../Data.Either/index.js");
  29012. var Data_Functor = require("../Data.Functor/index.js");
  29013. var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js");
  29014. var Data_Monoid = require("../Data.Monoid/index.js");
  29015. var Data_Newtype = require("../Data.Newtype/index.js");
  29016. var Data_Profunctor = require("../Data.Profunctor/index.js");
  29017. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  29018. var Data_Profunctor_Cochoice = require("../Data.Profunctor.Cochoice/index.js");
  29019. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  29020. var Data_Semigroup = require("../Data.Semigroup/index.js");
  29021. var Data_Tuple = require("../Data.Tuple/index.js");
  29022. var Forget = function Forget(x) {
  29023. return x;
  29024. };
  29025. var semigroupForget = function semigroupForget(dictSemigroup) {
  29026. return Data_Semigroup.semigroupFn(dictSemigroup);
  29027. };
  29028. var profunctorForget = new Data_Profunctor.Profunctor(function (f) {
  29029. return function (v) {
  29030. return function (v1) {
  29031. return function ($27) {
  29032. return v1(f($27));
  29033. };
  29034. };
  29035. };
  29036. });
  29037. var strongForget = new Data_Profunctor_Strong.Strong(function () {
  29038. return profunctorForget;
  29039. }, function (v) {
  29040. return function ($28) {
  29041. return v(Data_Tuple.fst($28));
  29042. };
  29043. }, function (v) {
  29044. return function ($29) {
  29045. return v(Data_Tuple.snd($29));
  29046. };
  29047. });
  29048. var newtypeForget = new Data_Newtype.Newtype(function (n) {
  29049. return n;
  29050. }, Forget);
  29051. var monoidForget = function monoidForget(dictMonoid) {
  29052. return Data_Monoid.monoidFn(dictMonoid);
  29053. };
  29054. var cochoiceForget = new Data_Profunctor_Cochoice.Cochoice(function () {
  29055. return profunctorForget;
  29056. }, function (v) {
  29057. return function ($30) {
  29058. return v(Data_Either.Left.create($30));
  29059. };
  29060. }, function (v) {
  29061. return function ($31) {
  29062. return v(Data_Either.Right.create($31));
  29063. };
  29064. });
  29065. var choiceForget = function choiceForget(dictMonoid) {
  29066. return new Data_Profunctor_Choice.Choice(function () {
  29067. return profunctorForget;
  29068. }, function (v) {
  29069. return Data_Either.either(v)(Data_Monoid.mempty(Data_Monoid.monoidFn(dictMonoid)));
  29070. }, function (v) {
  29071. return Data_Either.either(Data_Monoid.mempty(Data_Monoid.monoidFn(dictMonoid)))(v);
  29072. });
  29073. };
  29074. var wanderForget = function wanderForget(dictMonoid) {
  29075. return new Data_Lens_Internal_Wander.Wander(function () {
  29076. return choiceForget(dictMonoid);
  29077. }, function () {
  29078. return strongForget;
  29079. }, function (f) {
  29080. return function (v) {
  29081. 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);
  29082. };
  29083. });
  29084. };
  29085. module.exports = {
  29086. Forget: Forget,
  29087. newtypeForget: newtypeForget,
  29088. semigroupForget: semigroupForget,
  29089. monoidForget: monoidForget,
  29090. profunctorForget: profunctorForget,
  29091. choiceForget: choiceForget,
  29092. strongForget: strongForget,
  29093. cochoiceForget: cochoiceForget,
  29094. wanderForget: wanderForget
  29095. };
  29096. },{"../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) {
  29097. // Generated by purs version 0.13.6
  29098. "use strict";
  29099. var Control_Applicative = require("../Control.Applicative/index.js");
  29100. var Control_Apply = require("../Control.Apply/index.js");
  29101. var Control_Category = require("../Control.Category/index.js");
  29102. var Data_Array = require("../Data.Array/index.js");
  29103. var Data_Either = require("../Data.Either/index.js");
  29104. var Data_Eq = require("../Data.Eq/index.js");
  29105. var Data_Foldable = require("../Data.Foldable/index.js");
  29106. var Data_Function = require("../Data.Function/index.js");
  29107. var Data_Functor = require("../Data.Functor/index.js");
  29108. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  29109. var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js");
  29110. var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js");
  29111. var Data_List_Types = require("../Data.List.Types/index.js");
  29112. var Data_Maybe = require("../Data.Maybe/index.js");
  29113. var Data_Maybe_First = require("../Data.Maybe.First/index.js");
  29114. var Data_Maybe_Last = require("../Data.Maybe.Last/index.js");
  29115. var Data_Monoid = require("../Data.Monoid/index.js");
  29116. var Data_Monoid_Additive = require("../Data.Monoid.Additive/index.js");
  29117. var Data_Monoid_Conj = require("../Data.Monoid.Conj/index.js");
  29118. var Data_Monoid_Disj = require("../Data.Monoid.Disj/index.js");
  29119. var Data_Monoid_Dual = require("../Data.Monoid.Dual/index.js");
  29120. var Data_Monoid_Endo = require("../Data.Monoid.Endo/index.js");
  29121. var Data_Monoid_Multiplicative = require("../Data.Monoid.Multiplicative/index.js");
  29122. var Data_Newtype = require("../Data.Newtype/index.js");
  29123. var Data_Ord = require("../Data.Ord/index.js");
  29124. var Data_Profunctor = require("../Data.Profunctor/index.js");
  29125. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  29126. var Data_Semigroup = require("../Data.Semigroup/index.js");
  29127. var Data_Tuple = require("../Data.Tuple/index.js");
  29128. var Data_Unit = require("../Data.Unit/index.js");
  29129. var unfolded = function unfolded(dictMonoid) {
  29130. return function (f) {
  29131. return function (p) {
  29132. var go = function () {
  29133. var $43 = Data_Maybe.maybe(Data_Monoid.mempty(dictMonoid))(function (v) {
  29134. return Data_Semigroup.append(dictMonoid.Semigroup0())(Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(p)(v.value0))(go(v.value1));
  29135. });
  29136. return function ($44) {
  29137. return $43(f($44));
  29138. };
  29139. }();
  29140. return go;
  29141. };
  29142. };
  29143. };
  29144. var replicated = function replicated(dictMonoid) {
  29145. return function (i) {
  29146. return function (v) {
  29147. var go = function go(v1) {
  29148. return function (x) {
  29149. if (v1 === 0) {
  29150. return Data_Monoid.mempty(Data_Monoid.monoidFn(dictMonoid));
  29151. }
  29152. ;
  29153. return Data_Semigroup.append(Data_Semigroup.semigroupFn(dictMonoid.Semigroup0()))(x)(go(v1 - 1 | 0)(x));
  29154. };
  29155. };
  29156. return go(i)(v);
  29157. };
  29158. };
  29159. };
  29160. var ifoldMapOf = function ifoldMapOf(p) {
  29161. return function (f) {
  29162. return Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(p(Data_Lens_Internal_Indexed.Indexed(Data_Tuple.uncurry(f))));
  29163. };
  29164. };
  29165. var ifoldlOf = function ifoldlOf(p) {
  29166. return function (f) {
  29167. return function (r) {
  29168. var $45 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r);
  29169. var $46 = Data_Newtype.unwrap(Data_Newtype.newtypeDual);
  29170. var $47 = ifoldMapOf(p)(function (i) {
  29171. var $49 = Data_Function.flip(f(i));
  29172. return function ($50) {
  29173. return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($49($50)));
  29174. };
  29175. });
  29176. return function ($48) {
  29177. return $45($46($47($48)));
  29178. };
  29179. };
  29180. };
  29181. };
  29182. var ifoldrOf = function ifoldrOf(p) {
  29183. return function (f) {
  29184. return function (r) {
  29185. var $51 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r);
  29186. var $52 = ifoldMapOf(p)(function (i) {
  29187. var $54 = f(i);
  29188. return function ($55) {
  29189. return Data_Monoid_Endo.Endo($54($55));
  29190. };
  29191. });
  29192. return function ($53) {
  29193. return $51($52($53));
  29194. };
  29195. };
  29196. };
  29197. };
  29198. var itoListOf = function itoListOf(p) {
  29199. return ifoldrOf(p)(function (i) {
  29200. return function (x) {
  29201. return function (xs) {
  29202. return new Data_List_Types.Cons(new Data_Tuple.Tuple(i, x), xs);
  29203. };
  29204. };
  29205. })(Data_List_Types.Nil.value);
  29206. };
  29207. var itraverseOf_ = function itraverseOf_(dictApplicative) {
  29208. return function (p) {
  29209. return function (f) {
  29210. return ifoldrOf(p)(function (i) {
  29211. return function (a) {
  29212. return function (fu) {
  29213. return Control_Apply.applySecond(dictApplicative.Apply0())(Data_Functor["void"](dictApplicative.Apply0().Functor0())(f(i)(a)))(fu);
  29214. };
  29215. };
  29216. })(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
  29217. };
  29218. };
  29219. };
  29220. var iforOf_ = function iforOf_(dictApplicative) {
  29221. var $56 = itraverseOf_(dictApplicative);
  29222. return function ($57) {
  29223. return Data_Function.flip($56($57));
  29224. };
  29225. };
  29226. var ifindOf = function ifindOf(p) {
  29227. return function (f) {
  29228. return ifoldrOf(p)(function (i) {
  29229. return function (a) {
  29230. return Data_Maybe.maybe(function () {
  29231. var $37 = f(i)(a);
  29232. if ($37) {
  29233. return new Data_Maybe.Just(a);
  29234. }
  29235. ;
  29236. return Data_Maybe.Nothing.value;
  29237. }())(Data_Maybe.Just.create);
  29238. };
  29239. })(Data_Maybe.Nothing.value);
  29240. };
  29241. };
  29242. var ianyOf = function ianyOf(dictHeytingAlgebra) {
  29243. return function (p) {
  29244. return function (f) {
  29245. var $58 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
  29246. var $59 = ifoldMapOf(p)(function (i) {
  29247. var $61 = f(i);
  29248. return function ($62) {
  29249. return Data_Monoid_Disj.Disj($61($62));
  29250. };
  29251. });
  29252. return function ($60) {
  29253. return $58($59($60));
  29254. };
  29255. };
  29256. };
  29257. };
  29258. var iallOf = function iallOf(dictHeytingAlgebra) {
  29259. return function (p) {
  29260. return function (f) {
  29261. var $63 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
  29262. var $64 = ifoldMapOf(p)(function (i) {
  29263. var $66 = f(i);
  29264. return function ($67) {
  29265. return Data_Monoid_Conj.Conj($66($67));
  29266. };
  29267. });
  29268. return function ($65) {
  29269. return $63($64($65));
  29270. };
  29271. };
  29272. };
  29273. };
  29274. var folded = function folded(dictMonoid) {
  29275. return function (dictFoldable) {
  29276. return function (v) {
  29277. return Data_Foldable.foldMap(dictFoldable)(dictMonoid)(v);
  29278. };
  29279. };
  29280. };
  29281. var foldMapOf = Data_Newtype.under(Data_Lens_Internal_Forget.newtypeForget)(Data_Lens_Internal_Forget.newtypeForget)(Data_Lens_Internal_Forget.Forget);
  29282. var foldOf = function foldOf(p) {
  29283. return foldMapOf(p)(Control_Category.identity(Control_Category.categoryFn));
  29284. };
  29285. var foldlOf = function foldlOf(p) {
  29286. return function (f) {
  29287. return function (r) {
  29288. var $68 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r);
  29289. var $69 = Data_Newtype.unwrap(Data_Newtype.newtypeDual);
  29290. var $70 = foldMapOf(p)(function () {
  29291. var $72 = Data_Function.flip(f);
  29292. return function ($73) {
  29293. return Data_Monoid_Dual.Dual(Data_Monoid_Endo.Endo($72($73)));
  29294. };
  29295. }());
  29296. return function ($71) {
  29297. return $68($69($70($71)));
  29298. };
  29299. };
  29300. };
  29301. };
  29302. var foldrOf = function foldrOf(p) {
  29303. return function (f) {
  29304. return function (r) {
  29305. var $74 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(r);
  29306. var $75 = foldMapOf(p)(function ($77) {
  29307. return Data_Monoid_Endo.Endo(f($77));
  29308. });
  29309. return function ($76) {
  29310. return $74($75($76));
  29311. };
  29312. };
  29313. };
  29314. };
  29315. var maximumOf = function maximumOf(dictOrd) {
  29316. return function (p) {
  29317. var max = function max(a) {
  29318. return function (b) {
  29319. var $39 = Data_Ord.greaterThan(dictOrd)(a)(b);
  29320. if ($39) {
  29321. return a;
  29322. }
  29323. ;
  29324. return b;
  29325. };
  29326. };
  29327. return foldrOf(p)(function (a) {
  29328. var $78 = Data_Maybe.maybe(a)(max(a));
  29329. return function ($79) {
  29330. return Data_Maybe.Just.create($78($79));
  29331. };
  29332. })(Data_Maybe.Nothing.value);
  29333. };
  29334. };
  29335. var minimumOf = function minimumOf(dictOrd) {
  29336. return function (p) {
  29337. var min = function min(a) {
  29338. return function (b) {
  29339. var $40 = Data_Ord.lessThan(dictOrd)(a)(b);
  29340. if ($40) {
  29341. return a;
  29342. }
  29343. ;
  29344. return b;
  29345. };
  29346. };
  29347. return foldrOf(p)(function (a) {
  29348. var $80 = Data_Maybe.maybe(a)(min(a));
  29349. return function ($81) {
  29350. return Data_Maybe.Just.create($80($81));
  29351. };
  29352. })(Data_Maybe.Nothing.value);
  29353. };
  29354. };
  29355. var toListOf = function toListOf(p) {
  29356. return foldrOf(p)(Data_List_Types.Cons.create)(Data_List_Types.Nil.value);
  29357. };
  29358. var toArrayOf = function toArrayOf(p) {
  29359. var $82 = Data_Array.fromFoldable(Data_List_Types.foldableList);
  29360. var $83 = toListOf(p);
  29361. return function ($84) {
  29362. return $82($83($84));
  29363. };
  29364. };
  29365. var toArrayOfOn = function toArrayOfOn(s) {
  29366. return function (p) {
  29367. return toArrayOf(p)(s);
  29368. };
  29369. };
  29370. var toListOfOn = function toListOfOn(s) {
  29371. return function (p) {
  29372. return toListOf(p)(s);
  29373. };
  29374. };
  29375. var traverseOf_ = function traverseOf_(dictApplicative) {
  29376. return function (p) {
  29377. return function (f) {
  29378. return foldrOf(p)(function (a) {
  29379. return function (fu) {
  29380. return Control_Apply.applySecond(dictApplicative.Apply0())(Data_Functor["void"](dictApplicative.Apply0().Functor0())(f(a)))(fu);
  29381. };
  29382. })(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
  29383. };
  29384. };
  29385. };
  29386. var has = function has(dictHeytingAlgebra) {
  29387. return function (p) {
  29388. var $85 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
  29389. var $86 = foldMapOf(p)(Data_Function["const"](Data_HeytingAlgebra.tt(dictHeytingAlgebra)));
  29390. return function ($87) {
  29391. return $85($86($87));
  29392. };
  29393. };
  29394. };
  29395. var hasn$primet = function hasn$primet(dictHeytingAlgebra) {
  29396. return function (p) {
  29397. var $88 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
  29398. var $89 = foldMapOf(p)(Data_Function["const"](Data_HeytingAlgebra.ff(dictHeytingAlgebra)));
  29399. return function ($90) {
  29400. return $88($89($90));
  29401. };
  29402. };
  29403. };
  29404. var lastOf = function lastOf(p) {
  29405. var $91 = Data_Newtype.unwrap(Data_Maybe_Last.newtypeLast);
  29406. var $92 = foldMapOf(p)(function ($94) {
  29407. return Data_Maybe_Last.Last(Data_Maybe.Just.create($94));
  29408. });
  29409. return function ($93) {
  29410. return $91($92($93));
  29411. };
  29412. };
  29413. var lengthOf = function lengthOf(p) {
  29414. var $95 = Data_Newtype.unwrap(Data_Newtype.newtypeAdditive);
  29415. var $96 = foldMapOf(p)(Data_Function["const"](1));
  29416. return function ($97) {
  29417. return $95($96($97));
  29418. };
  29419. };
  29420. var preview = function preview(p) {
  29421. var $98 = Data_Newtype.unwrap(Data_Maybe_First.newtypeFirst);
  29422. var $99 = foldMapOf(p)(function ($101) {
  29423. return Data_Maybe_First.First(Data_Maybe.Just.create($101));
  29424. });
  29425. return function ($100) {
  29426. return $98($99($100));
  29427. };
  29428. };
  29429. var previewOn = function previewOn(s) {
  29430. return function (p) {
  29431. return preview(p)(s);
  29432. };
  29433. };
  29434. var productOf = function productOf(dictSemiring) {
  29435. return function (p) {
  29436. var $102 = Data_Newtype.unwrap(Data_Newtype.newtypeMultiplicative);
  29437. var $103 = foldMapOf(p)(Data_Monoid_Multiplicative.Multiplicative);
  29438. return function ($104) {
  29439. return $102($103($104));
  29440. };
  29441. };
  29442. };
  29443. var sequenceOf_ = function sequenceOf_(dictApplicative) {
  29444. return function (p) {
  29445. var $105 = Data_Function.flip(Data_Newtype.unwrap(Data_Newtype.newtypeEndo))(Control_Applicative.pure(dictApplicative)(Data_Unit.unit));
  29446. var $106 = foldMapOf(p)(function (f) {
  29447. return function (v) {
  29448. return Control_Apply.applySecond(dictApplicative.Apply0())(f)(v);
  29449. };
  29450. });
  29451. return function ($107) {
  29452. return $105($106($107));
  29453. };
  29454. };
  29455. };
  29456. var sumOf = function sumOf(dictSemiring) {
  29457. return function (p) {
  29458. var $108 = Data_Newtype.unwrap(Data_Newtype.newtypeAdditive);
  29459. var $109 = foldMapOf(p)(Data_Monoid_Additive.Additive);
  29460. return function ($110) {
  29461. return $108($109($110));
  29462. };
  29463. };
  29464. };
  29465. var firstOf = function firstOf(p) {
  29466. var $111 = Data_Newtype.unwrap(Data_Maybe_First.newtypeFirst);
  29467. var $112 = foldMapOf(p)(function ($114) {
  29468. return Data_Maybe_First.First(Data_Maybe.Just.create($114));
  29469. });
  29470. return function ($113) {
  29471. return $111($112($113));
  29472. };
  29473. };
  29474. var findOf = function findOf(p) {
  29475. return function (f) {
  29476. return foldrOf(p)(function (a) {
  29477. return Data_Maybe.maybe(function () {
  29478. var $41 = f(a);
  29479. if ($41) {
  29480. return new Data_Maybe.Just(a);
  29481. }
  29482. ;
  29483. return Data_Maybe.Nothing.value;
  29484. }())(Data_Maybe.Just.create);
  29485. })(Data_Maybe.Nothing.value);
  29486. };
  29487. };
  29488. var filtered = function filtered(dictChoice) {
  29489. return function (f) {
  29490. var $115 = Data_Profunctor.dimap(dictChoice.Profunctor0())(function (x) {
  29491. var $42 = f(x);
  29492. if ($42) {
  29493. return new Data_Either.Right(x);
  29494. }
  29495. ;
  29496. return new Data_Either.Left(x);
  29497. })(Data_Either.either(Control_Category.identity(Control_Category.categoryFn))(Control_Category.identity(Control_Category.categoryFn)));
  29498. var $116 = Data_Profunctor_Choice.right(dictChoice);
  29499. return function ($117) {
  29500. return $115($116($117));
  29501. };
  29502. };
  29503. };
  29504. var anyOf = function anyOf(dictHeytingAlgebra) {
  29505. return function (p) {
  29506. return function (f) {
  29507. var $118 = Data_Newtype.unwrap(Data_Newtype.newtypeDisj);
  29508. var $119 = foldMapOf(p)(function ($121) {
  29509. return Data_Monoid_Disj.Disj(f($121));
  29510. });
  29511. return function ($120) {
  29512. return $118($119($120));
  29513. };
  29514. };
  29515. };
  29516. };
  29517. var elemOf = function elemOf(dictEq) {
  29518. return function (p) {
  29519. return function (a) {
  29520. return anyOf(Data_HeytingAlgebra.heytingAlgebraBoolean)(p)(function (v) {
  29521. return Data_Eq.eq(dictEq)(v)(a);
  29522. });
  29523. };
  29524. };
  29525. };
  29526. var orOf = function orOf(dictHeytingAlgebra) {
  29527. return function (p) {
  29528. return anyOf(dictHeytingAlgebra)(p)(Control_Category.identity(Control_Category.categoryFn));
  29529. };
  29530. };
  29531. var allOf = function allOf(dictHeytingAlgebra) {
  29532. return function (p) {
  29533. return function (f) {
  29534. var $122 = Data_Newtype.unwrap(Data_Newtype.newtypeConj);
  29535. var $123 = foldMapOf(p)(function ($125) {
  29536. return Data_Monoid_Conj.Conj(f($125));
  29537. });
  29538. return function ($124) {
  29539. return $122($123($124));
  29540. };
  29541. };
  29542. };
  29543. };
  29544. var andOf = function andOf(dictHeytingAlgebra) {
  29545. return function (p) {
  29546. return allOf(dictHeytingAlgebra)(p)(Control_Category.identity(Control_Category.categoryFn));
  29547. };
  29548. };
  29549. var notElemOf = function notElemOf(dictEq) {
  29550. return function (p) {
  29551. return function (a) {
  29552. return allOf(Data_HeytingAlgebra.heytingAlgebraBoolean)(p)(function (v) {
  29553. return Data_Eq.notEq(dictEq)(v)(a);
  29554. });
  29555. };
  29556. };
  29557. };
  29558. module.exports = {
  29559. previewOn: previewOn,
  29560. toListOfOn: toListOfOn,
  29561. preview: preview,
  29562. foldOf: foldOf,
  29563. foldMapOf: foldMapOf,
  29564. foldrOf: foldrOf,
  29565. foldlOf: foldlOf,
  29566. toListOf: toListOf,
  29567. firstOf: firstOf,
  29568. lastOf: lastOf,
  29569. maximumOf: maximumOf,
  29570. minimumOf: minimumOf,
  29571. allOf: allOf,
  29572. anyOf: anyOf,
  29573. andOf: andOf,
  29574. orOf: orOf,
  29575. elemOf: elemOf,
  29576. notElemOf: notElemOf,
  29577. sumOf: sumOf,
  29578. productOf: productOf,
  29579. lengthOf: lengthOf,
  29580. findOf: findOf,
  29581. sequenceOf_: sequenceOf_,
  29582. traverseOf_: traverseOf_,
  29583. has: has,
  29584. "hasn't": hasn$primet,
  29585. replicated: replicated,
  29586. filtered: filtered,
  29587. folded: folded,
  29588. unfolded: unfolded,
  29589. toArrayOf: toArrayOf,
  29590. toArrayOfOn: toArrayOfOn,
  29591. ifoldMapOf: ifoldMapOf,
  29592. ifoldrOf: ifoldrOf,
  29593. ifoldlOf: ifoldlOf,
  29594. iallOf: iallOf,
  29595. ianyOf: ianyOf,
  29596. itoListOf: itoListOf,
  29597. itraverseOf_: itraverseOf_
  29598. };
  29599. },{"../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) {
  29600. // Generated by purs version 0.13.6
  29601. "use strict";
  29602. var Data_Bifunctor = require("../Data.Bifunctor/index.js");
  29603. var Data_Either = require("../Data.Either/index.js");
  29604. var Data_Functor = require("../Data.Functor/index.js");
  29605. var Data_Profunctor = require("../Data.Profunctor/index.js");
  29606. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  29607. var Market = function () {
  29608. function Market(value0, value1) {
  29609. this.value0 = value0;
  29610. this.value1 = value1;
  29611. }
  29612. ;
  29613. Market.create = function (value0) {
  29614. return function (value1) {
  29615. return new Market(value0, value1);
  29616. };
  29617. };
  29618. return Market;
  29619. }();
  29620. var profunctorMarket = new Data_Profunctor.Profunctor(function (f) {
  29621. return function (g) {
  29622. return function (v) {
  29623. return new Market(function ($19) {
  29624. return g(v.value0($19));
  29625. }, function () {
  29626. var $20 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(g);
  29627. return function ($21) {
  29628. return $20(v.value1(f($21)));
  29629. };
  29630. }());
  29631. };
  29632. };
  29633. });
  29634. var functorMarket = new Data_Functor.Functor(function (f) {
  29635. return function (v) {
  29636. return new Market(function ($22) {
  29637. return f(v.value0($22));
  29638. }, function () {
  29639. var $23 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(f);
  29640. return function ($24) {
  29641. return $23(v.value1($24));
  29642. };
  29643. }());
  29644. };
  29645. });
  29646. var choiceMarket = new Data_Profunctor_Choice.Choice(function () {
  29647. return profunctorMarket;
  29648. }, function (v) {
  29649. return new Market(function ($25) {
  29650. return Data_Either.Left.create(v.value0($25));
  29651. }, Data_Either.either(function () {
  29652. var $26 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Either.Left.create);
  29653. return function ($27) {
  29654. return $26(v.value1($27));
  29655. };
  29656. }())(function ($28) {
  29657. return Data_Either.Left.create(Data_Either.Right.create($28));
  29658. }));
  29659. }, function (v) {
  29660. return new Market(function ($29) {
  29661. return Data_Either.Right.create(v.value0($29));
  29662. }, Data_Either.either(function ($30) {
  29663. return Data_Either.Left.create(Data_Either.Left.create($30));
  29664. })(function () {
  29665. var $31 = Data_Bifunctor.lmap(Data_Either.bifunctorEither)(Data_Either.Right.create);
  29666. return function ($32) {
  29667. return $31(v.value1($32));
  29668. };
  29669. }()));
  29670. });
  29671. module.exports = {
  29672. Market: Market,
  29673. functorMarket: functorMarket,
  29674. profunctorMarket: profunctorMarket,
  29675. choiceMarket: choiceMarket
  29676. };
  29677. },{"../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) {
  29678. // Generated by purs version 0.13.6
  29679. "use strict";
  29680. var Costrong = function Costrong(Profunctor0, unfirst, unsecond) {
  29681. this.Profunctor0 = Profunctor0;
  29682. this.unfirst = unfirst;
  29683. this.unsecond = unsecond;
  29684. };
  29685. var unsecond = function unsecond(dict) {
  29686. return dict.unsecond;
  29687. };
  29688. var unfirst = function unfirst(dict) {
  29689. return dict.unfirst;
  29690. };
  29691. module.exports = {
  29692. unfirst: unfirst,
  29693. unsecond: unsecond,
  29694. Costrong: Costrong
  29695. };
  29696. },{}],"../output/Data.Lens.Internal.Tagged/index.js":[function(require,module,exports) {
  29697. // Generated by purs version 0.13.6
  29698. "use strict";
  29699. var Data_Either = require("../Data.Either/index.js");
  29700. var Data_Eq = require("../Data.Eq/index.js");
  29701. var Data_Foldable = require("../Data.Foldable/index.js");
  29702. var Data_Function = require("../Data.Function/index.js");
  29703. var Data_Functor = require("../Data.Functor/index.js");
  29704. var Data_Newtype = require("../Data.Newtype/index.js");
  29705. var Data_Ord = require("../Data.Ord/index.js");
  29706. var Data_Profunctor = require("../Data.Profunctor/index.js");
  29707. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  29708. var Data_Profunctor_Closed = require("../Data.Profunctor.Closed/index.js");
  29709. var Data_Profunctor_Costrong = require("../Data.Profunctor.Costrong/index.js");
  29710. var Data_Traversable = require("../Data.Traversable/index.js");
  29711. var Tagged = function Tagged(x) {
  29712. return x;
  29713. };
  29714. var taggedProfunctor = new Data_Profunctor.Profunctor(function (v) {
  29715. return function (g) {
  29716. return function (v1) {
  29717. return g(v1);
  29718. };
  29719. };
  29720. });
  29721. var taggedCostrong = new Data_Profunctor_Costrong.Costrong(function () {
  29722. return taggedProfunctor;
  29723. }, function (v) {
  29724. return v.value0;
  29725. }, function (v) {
  29726. return v.value1;
  29727. });
  29728. var taggedClosed = new Data_Profunctor_Closed.Closed(function () {
  29729. return taggedProfunctor;
  29730. }, function (v) {
  29731. return Data_Function["const"](v);
  29732. });
  29733. var taggedChoice = new Data_Profunctor_Choice.Choice(function () {
  29734. return taggedProfunctor;
  29735. }, function (v) {
  29736. return new Data_Either.Left(v);
  29737. }, function (v) {
  29738. return new Data_Either.Right(v);
  29739. });
  29740. var newtypeTagged = new Data_Newtype.Newtype(function (n) {
  29741. return n;
  29742. }, Tagged);
  29743. var functorTagged = new Data_Functor.Functor(function (f) {
  29744. return function (m) {
  29745. return f(m);
  29746. };
  29747. });
  29748. var foldableTagged = new Data_Foldable.Foldable(function (dictMonoid) {
  29749. return function (f) {
  29750. return function (v) {
  29751. return f(v);
  29752. };
  29753. };
  29754. }, function (f) {
  29755. return function (b) {
  29756. return function (v) {
  29757. return f(b)(v);
  29758. };
  29759. };
  29760. }, function (f) {
  29761. return function (b) {
  29762. return function (v) {
  29763. return f(v)(b);
  29764. };
  29765. };
  29766. });
  29767. var traversableTagged = new Data_Traversable.Traversable(function () {
  29768. return foldableTagged;
  29769. }, function () {
  29770. return functorTagged;
  29771. }, function (dictApplicative) {
  29772. return function (v) {
  29773. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tagged)(v);
  29774. };
  29775. }, function (dictApplicative) {
  29776. return function (f) {
  29777. return function (v) {
  29778. return Data_Functor.map(dictApplicative.Apply0().Functor0())(Tagged)(f(v));
  29779. };
  29780. };
  29781. });
  29782. var eqTagged = function eqTagged(dictEq) {
  29783. return new Data_Eq.Eq(function (x) {
  29784. return function (y) {
  29785. return Data_Eq.eq(dictEq)(x)(y);
  29786. };
  29787. });
  29788. };
  29789. var ordTagged = function ordTagged(dictOrd) {
  29790. return new Data_Ord.Ord(function () {
  29791. return eqTagged(dictOrd.Eq0());
  29792. }, function (x) {
  29793. return function (y) {
  29794. return Data_Ord.compare(dictOrd)(x)(y);
  29795. };
  29796. });
  29797. };
  29798. var eq1Tagged = new Data_Eq.Eq1(function (dictEq) {
  29799. return Data_Eq.eq(eqTagged(dictEq));
  29800. });
  29801. var ord1Tagged = new Data_Ord.Ord1(function () {
  29802. return eq1Tagged;
  29803. }, function (dictOrd) {
  29804. return Data_Ord.compare(ordTagged(dictOrd));
  29805. });
  29806. module.exports = {
  29807. Tagged: Tagged,
  29808. newtypeTagged: newtypeTagged,
  29809. eqTagged: eqTagged,
  29810. eq1Tagged: eq1Tagged,
  29811. ordTagged: ordTagged,
  29812. ord1Tagged: ord1Tagged,
  29813. functorTagged: functorTagged,
  29814. taggedProfunctor: taggedProfunctor,
  29815. taggedChoice: taggedChoice,
  29816. taggedCostrong: taggedCostrong,
  29817. taggedClosed: taggedClosed,
  29818. foldableTagged: foldableTagged,
  29819. traversableTagged: traversableTagged
  29820. };
  29821. },{"../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) {
  29822. // Generated by purs version 0.13.6
  29823. "use strict";
  29824. var Control_Category = require("../Control.Category/index.js");
  29825. var Control_MonadZero = require("../Control.MonadZero/index.js");
  29826. var Data_Either = require("../Data.Either/index.js");
  29827. var Data_Eq = require("../Data.Eq/index.js");
  29828. var Data_Function = require("../Data.Function/index.js");
  29829. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  29830. var Data_Lens_Internal_Market = require("../Data.Lens.Internal.Market/index.js");
  29831. var Data_Lens_Internal_Tagged = require("../Data.Lens.Internal.Tagged/index.js");
  29832. var Data_Maybe = require("../Data.Maybe/index.js");
  29833. var Data_Newtype = require("../Data.Newtype/index.js");
  29834. var Data_Profunctor = require("../Data.Profunctor/index.js");
  29835. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  29836. var withPrism = function withPrism(l) {
  29837. return function (f) {
  29838. var v = l(new Data_Lens_Internal_Market.Market(Control_Category.identity(Control_Category.categoryFn), Data_Either.Right.create));
  29839. return f(v.value0)(v.value1);
  29840. };
  29841. };
  29842. var review = Data_Newtype.under(Data_Lens_Internal_Tagged.newtypeTagged)(Data_Lens_Internal_Tagged.newtypeTagged)(Data_Lens_Internal_Tagged.Tagged);
  29843. var prism = function prism(to) {
  29844. return function (fro) {
  29845. return function (dictChoice) {
  29846. return function (pab) {
  29847. 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)));
  29848. };
  29849. };
  29850. };
  29851. };
  29852. var prism$prime = function prism$prime(to) {
  29853. return function (fro) {
  29854. return function (dictChoice) {
  29855. return prism(to)(function (s) {
  29856. return Data_Maybe.maybe(new Data_Either.Left(s))(Data_Either.Right.create)(fro(s));
  29857. })(dictChoice);
  29858. };
  29859. };
  29860. };
  29861. var nearly = function nearly(x) {
  29862. return function (f) {
  29863. return function (dictChoice) {
  29864. return prism$prime(Data_Function["const"](x))(function () {
  29865. var $14 = Control_MonadZero.guard(Data_Maybe.monadZeroMaybe);
  29866. return function ($15) {
  29867. return $14(f($15));
  29868. };
  29869. }())(dictChoice);
  29870. };
  29871. };
  29872. };
  29873. var only = function only(dictEq) {
  29874. return function (x) {
  29875. return function (dictChoice) {
  29876. return nearly(x)(function (v) {
  29877. return Data_Eq.eq(dictEq)(v)(x);
  29878. })(dictChoice);
  29879. };
  29880. };
  29881. };
  29882. var matching = function matching(l) {
  29883. return withPrism(l)(function (v) {
  29884. return function (f) {
  29885. return f;
  29886. };
  29887. });
  29888. };
  29889. var is = function is(dictHeytingAlgebra) {
  29890. return function (l) {
  29891. var $16 = Data_Either.either(Data_Function["const"](Data_HeytingAlgebra.ff(dictHeytingAlgebra)))(Data_Function["const"](Data_HeytingAlgebra.tt(dictHeytingAlgebra)));
  29892. var $17 = matching(l);
  29893. return function ($18) {
  29894. return $16($17($18));
  29895. };
  29896. };
  29897. };
  29898. var isn$primet = function isn$primet(dictHeytingAlgebra) {
  29899. return function (l) {
  29900. var $19 = Data_HeytingAlgebra.not(dictHeytingAlgebra);
  29901. var $20 = is(dictHeytingAlgebra)(l);
  29902. return function ($21) {
  29903. return $19($20($21));
  29904. };
  29905. };
  29906. };
  29907. var clonePrism = function clonePrism(l) {
  29908. return function (dictChoice) {
  29909. return withPrism(l)(function (x) {
  29910. return function (y) {
  29911. return function (p) {
  29912. return prism(x)(y)(dictChoice)(p);
  29913. };
  29914. };
  29915. });
  29916. };
  29917. };
  29918. module.exports = {
  29919. "prism'": prism$prime,
  29920. prism: prism,
  29921. only: only,
  29922. nearly: nearly,
  29923. review: review,
  29924. is: is,
  29925. "isn't": isn$primet,
  29926. matching: matching,
  29927. clonePrism: clonePrism,
  29928. withPrism: withPrism
  29929. };
  29930. },{"../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) {
  29931. // Generated by purs version 0.13.6
  29932. "use strict";
  29933. var Data_Either = require("../Data.Either/index.js");
  29934. var Data_Function = require("../Data.Function/index.js");
  29935. var Data_Lens_Prism = require("../Data.Lens.Prism/index.js");
  29936. var Data_Maybe = require("../Data.Maybe/index.js");
  29937. var Data_Unit = require("../Data.Unit/index.js");
  29938. var _Nothing = function _Nothing(dictChoice) {
  29939. 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);
  29940. };
  29941. var _Just = function _Just(dictChoice) {
  29942. 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);
  29943. };
  29944. module.exports = {
  29945. "_Nothing": _Nothing,
  29946. "_Just": _Just
  29947. };
  29948. },{"../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) {
  29949. // Generated by purs version 0.13.6
  29950. "use strict";
  29951. var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
  29952. var Data_EuclideanRing = require("../Data.EuclideanRing/index.js");
  29953. var Data_Function = require("../Data.Function/index.js");
  29954. var Data_Functor = require("../Data.Functor/index.js");
  29955. var Data_HeytingAlgebra = require("../Data.HeytingAlgebra/index.js");
  29956. var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js");
  29957. var Data_Maybe = require("../Data.Maybe/index.js");
  29958. var Data_Ring = require("../Data.Ring/index.js");
  29959. var Data_Semigroup = require("../Data.Semigroup/index.js");
  29960. var Data_Semiring = require("../Data.Semiring/index.js");
  29961. var Data_Tuple = require("../Data.Tuple/index.js");
  29962. var over = function over(l) {
  29963. return l;
  29964. };
  29965. var set = function set(l) {
  29966. return function (b) {
  29967. return over(l)(Data_Function["const"](b));
  29968. };
  29969. };
  29970. var setJust = function setJust(p) {
  29971. var $24 = set(p);
  29972. return function ($25) {
  29973. return $24(Data_Maybe.Just.create($25));
  29974. };
  29975. };
  29976. var subOver = function subOver(dictRing) {
  29977. return function (p) {
  29978. var $26 = over(p);
  29979. var $27 = Data_Function.flip(Data_Ring.sub(dictRing));
  29980. return function ($28) {
  29981. return $26($27($28));
  29982. };
  29983. };
  29984. };
  29985. var mulOver = function mulOver(dictSemiring) {
  29986. return function (p) {
  29987. var $29 = over(p);
  29988. var $30 = Data_Function.flip(Data_Semiring.mul(dictSemiring));
  29989. return function ($31) {
  29990. return $29($30($31));
  29991. };
  29992. };
  29993. };
  29994. var modifying = function modifying(dictMonadState) {
  29995. return function (p) {
  29996. return function (f) {
  29997. return Data_Functor["void"](dictMonadState.Monad0().Bind1().Apply0().Functor0())(Control_Monad_State_Class.modify(dictMonadState)(over(p)(f)));
  29998. };
  29999. };
  30000. };
  30001. var mulModifying = function mulModifying(dictMonadState) {
  30002. return function (dictSemiring) {
  30003. return function (p) {
  30004. var $32 = modifying(dictMonadState)(p);
  30005. var $33 = Data_Function.flip(Data_Semiring.mul(dictSemiring));
  30006. return function ($34) {
  30007. return $32($33($34));
  30008. };
  30009. };
  30010. };
  30011. };
  30012. var subModifying = function subModifying(dictMonadState) {
  30013. return function (dictRing) {
  30014. return function (p) {
  30015. var $35 = modifying(dictMonadState)(p);
  30016. var $36 = Data_Function.flip(Data_Ring.sub(dictRing));
  30017. return function ($37) {
  30018. return $35($36($37));
  30019. };
  30020. };
  30021. };
  30022. };
  30023. var iover = function iover(l) {
  30024. return function (f) {
  30025. return l(Data_Lens_Internal_Indexed.Indexed(Data_Tuple.uncurry(f)));
  30026. };
  30027. };
  30028. var divOver = function divOver(dictEuclideanRing) {
  30029. return function (p) {
  30030. var $38 = over(p);
  30031. var $39 = Data_Function.flip(Data_EuclideanRing.div(dictEuclideanRing));
  30032. return function ($40) {
  30033. return $38($39($40));
  30034. };
  30035. };
  30036. };
  30037. var divModifying = function divModifying(dictMonadState) {
  30038. return function (dictEuclideanRing) {
  30039. return function (p) {
  30040. var $41 = modifying(dictMonadState)(p);
  30041. var $42 = Data_Function.flip(Data_EuclideanRing.div(dictEuclideanRing));
  30042. return function ($43) {
  30043. return $41($42($43));
  30044. };
  30045. };
  30046. };
  30047. };
  30048. var disjOver = function disjOver(dictHeytingAlgebra) {
  30049. return function (p) {
  30050. var $44 = over(p);
  30051. var $45 = Data_Function.flip(Data_HeytingAlgebra.disj(dictHeytingAlgebra));
  30052. return function ($46) {
  30053. return $44($45($46));
  30054. };
  30055. };
  30056. };
  30057. var disjModifying = function disjModifying(dictMonadState) {
  30058. return function (dictHeytingAlgebra) {
  30059. return function (p) {
  30060. var $47 = modifying(dictMonadState)(p);
  30061. var $48 = Data_Function.flip(Data_HeytingAlgebra.disj(dictHeytingAlgebra));
  30062. return function ($49) {
  30063. return $47($48($49));
  30064. };
  30065. };
  30066. };
  30067. };
  30068. var conjOver = function conjOver(dictHeytingAlgebra) {
  30069. return function (p) {
  30070. var $50 = over(p);
  30071. var $51 = Data_Function.flip(Data_HeytingAlgebra.conj(dictHeytingAlgebra));
  30072. return function ($52) {
  30073. return $50($51($52));
  30074. };
  30075. };
  30076. };
  30077. var conjModifying = function conjModifying(dictMonadState) {
  30078. return function (dictHeytingAlgebra) {
  30079. return function (p) {
  30080. var $53 = modifying(dictMonadState)(p);
  30081. var $54 = Data_Function.flip(Data_HeytingAlgebra.conj(dictHeytingAlgebra));
  30082. return function ($55) {
  30083. return $53($54($55));
  30084. };
  30085. };
  30086. };
  30087. };
  30088. var assign = function assign(dictMonadState) {
  30089. return function (p) {
  30090. return function (b) {
  30091. return Data_Functor["void"](dictMonadState.Monad0().Bind1().Apply0().Functor0())(Control_Monad_State_Class.modify(dictMonadState)(set(p)(b)));
  30092. };
  30093. };
  30094. };
  30095. var assignJust = function assignJust(dictMonadState) {
  30096. return function (p) {
  30097. var $56 = assign(dictMonadState)(p);
  30098. return function ($57) {
  30099. return $56(Data_Maybe.Just.create($57));
  30100. };
  30101. };
  30102. };
  30103. var appendOver = function appendOver(dictSemigroup) {
  30104. return function (p) {
  30105. var $58 = over(p);
  30106. var $59 = Data_Function.flip(Data_Semigroup.append(dictSemigroup));
  30107. return function ($60) {
  30108. return $58($59($60));
  30109. };
  30110. };
  30111. };
  30112. var appendModifying = function appendModifying(dictMonadState) {
  30113. return function (dictSemigroup) {
  30114. return function (p) {
  30115. var $61 = modifying(dictMonadState)(p);
  30116. var $62 = Data_Function.flip(Data_Semigroup.append(dictSemigroup));
  30117. return function ($63) {
  30118. return $61($62($63));
  30119. };
  30120. };
  30121. };
  30122. };
  30123. var addOver = function addOver(dictSemiring) {
  30124. return function (p) {
  30125. var $64 = over(p);
  30126. var $65 = Data_Semiring.add(dictSemiring);
  30127. return function ($66) {
  30128. return $64($65($66));
  30129. };
  30130. };
  30131. };
  30132. var addModifying = function addModifying(dictMonadState) {
  30133. return function (dictSemiring) {
  30134. return function (p) {
  30135. var $67 = modifying(dictMonadState)(p);
  30136. var $68 = Data_Semiring.add(dictSemiring);
  30137. return function ($69) {
  30138. return $67($68($69));
  30139. };
  30140. };
  30141. };
  30142. };
  30143. module.exports = {
  30144. over: over,
  30145. iover: iover,
  30146. set: set,
  30147. addOver: addOver,
  30148. subOver: subOver,
  30149. mulOver: mulOver,
  30150. divOver: divOver,
  30151. disjOver: disjOver,
  30152. conjOver: conjOver,
  30153. appendOver: appendOver,
  30154. setJust: setJust,
  30155. assign: assign,
  30156. modifying: modifying,
  30157. addModifying: addModifying,
  30158. mulModifying: mulModifying,
  30159. subModifying: subModifying,
  30160. divModifying: divModifying,
  30161. disjModifying: disjModifying,
  30162. conjModifying: conjModifying,
  30163. appendModifying: appendModifying,
  30164. assignJust: assignJust
  30165. };
  30166. },{"../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) {
  30167. // Generated by purs version 0.13.6
  30168. "use strict";
  30169. var Control_Category = require("../Control.Category/index.js");
  30170. var Control_Monad_State_Class = require("../Control.Monad.State.Class/index.js");
  30171. var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js");
  30172. var Data_Lens_Internal_Indexed = require("../Data.Lens.Internal.Indexed/index.js");
  30173. var Data_Newtype = require("../Data.Newtype/index.js");
  30174. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  30175. var view = function view(l) {
  30176. return Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(l(Control_Category.identity(Control_Category.categoryFn)));
  30177. };
  30178. var viewOn = function viewOn(s) {
  30179. return function (l) {
  30180. return view(l)(s);
  30181. };
  30182. };
  30183. var use = function use(dictMonadState) {
  30184. return function (p) {
  30185. return Control_Monad_State_Class.gets(dictMonadState)(function (v) {
  30186. return viewOn(v)(p);
  30187. });
  30188. };
  30189. };
  30190. var to = function to(f) {
  30191. return function (p) {
  30192. var $3 = Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(p);
  30193. return function ($4) {
  30194. return $3(f($4));
  30195. };
  30196. };
  30197. };
  30198. var takeBoth = function takeBoth(l) {
  30199. return function (r) {
  30200. return to(Data_Profunctor_Strong.fanout(Control_Category.categoryFn)(Data_Profunctor_Strong.strongFn)(view(l))(view(r)));
  30201. };
  30202. };
  30203. var iview = function iview(l) {
  30204. return Data_Newtype.unwrap(Data_Lens_Internal_Forget.newtypeForget)(l(Data_Lens_Internal_Indexed.Indexed(Control_Category.identity(Control_Category.categoryFn))));
  30205. };
  30206. var iuse = function iuse(dictMonadState) {
  30207. return function (p) {
  30208. return Control_Monad_State_Class.gets(dictMonadState)(iview(p));
  30209. };
  30210. };
  30211. var cloneGetter = function cloneGetter(g) {
  30212. return to(view(g));
  30213. };
  30214. module.exports = {
  30215. viewOn: viewOn,
  30216. view: view,
  30217. to: to,
  30218. takeBoth: takeBoth,
  30219. use: use,
  30220. iview: iview,
  30221. iuse: iuse,
  30222. cloneGetter: cloneGetter
  30223. };
  30224. },{"../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.Internal.Exchange/index.js":[function(require,module,exports) {
  30225. // Generated by purs version 0.13.6
  30226. "use strict";
  30227. var Data_Functor = require("../Data.Functor/index.js");
  30228. var Data_Profunctor = require("../Data.Profunctor/index.js");
  30229. var Exchange = function () {
  30230. function Exchange(value0, value1) {
  30231. this.value0 = value0;
  30232. this.value1 = value1;
  30233. }
  30234. ;
  30235. Exchange.create = function (value0) {
  30236. return function (value1) {
  30237. return new Exchange(value0, value1);
  30238. };
  30239. };
  30240. return Exchange;
  30241. }();
  30242. var profunctorExchange = new Data_Profunctor.Profunctor(function (f) {
  30243. return function (g) {
  30244. return function (v) {
  30245. return new Exchange(function ($11) {
  30246. return v.value0(f($11));
  30247. }, function ($12) {
  30248. return g(v.value1($12));
  30249. });
  30250. };
  30251. };
  30252. });
  30253. var functorExchange = new Data_Functor.Functor(function (f) {
  30254. return function (v) {
  30255. return new Exchange(v.value0, function ($13) {
  30256. return f(v.value1($13));
  30257. });
  30258. };
  30259. });
  30260. module.exports = {
  30261. Exchange: Exchange,
  30262. functorExchange: functorExchange,
  30263. profunctorExchange: profunctorExchange
  30264. };
  30265. },{"../Data.Functor/index.js":"../output/Data.Functor/index.js","../Data.Profunctor/index.js":"../output/Data.Profunctor/index.js"}],"../output/Data.Lens.Internal.Re/index.js":[function(require,module,exports) {
  30266. // Generated by purs version 0.13.6
  30267. "use strict";
  30268. var Data_Newtype = require("../Data.Newtype/index.js");
  30269. var Data_Profunctor = require("../Data.Profunctor/index.js");
  30270. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  30271. var Data_Profunctor_Cochoice = require("../Data.Profunctor.Cochoice/index.js");
  30272. var Data_Profunctor_Costrong = require("../Data.Profunctor.Costrong/index.js");
  30273. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  30274. var Re = function Re(x) {
  30275. return x;
  30276. };
  30277. var profunctorRe = function profunctorRe(dictProfunctor) {
  30278. return new Data_Profunctor.Profunctor(function (f) {
  30279. return function (g) {
  30280. return function (v) {
  30281. var $28 = Data_Profunctor.dimap(dictProfunctor)(g)(f);
  30282. return function ($29) {
  30283. return v($28($29));
  30284. };
  30285. };
  30286. };
  30287. });
  30288. };
  30289. var strongRe = function strongRe(dictStrong) {
  30290. return new Data_Profunctor_Costrong.Costrong(function () {
  30291. return profunctorRe(dictStrong.Profunctor0());
  30292. }, function (v) {
  30293. var $30 = Data_Profunctor_Strong.first(dictStrong);
  30294. return function ($31) {
  30295. return v($30($31));
  30296. };
  30297. }, function (v) {
  30298. var $32 = Data_Profunctor_Strong.second(dictStrong);
  30299. return function ($33) {
  30300. return v($32($33));
  30301. };
  30302. });
  30303. };
  30304. var newtypeRe = new Data_Newtype.Newtype(function (n) {
  30305. return n;
  30306. }, Re);
  30307. var costrongRe = function costrongRe(dictCostrong) {
  30308. return new Data_Profunctor_Strong.Strong(function () {
  30309. return profunctorRe(dictCostrong.Profunctor0());
  30310. }, function (v) {
  30311. var $34 = Data_Profunctor_Costrong.unfirst(dictCostrong);
  30312. return function ($35) {
  30313. return v($34($35));
  30314. };
  30315. }, function (v) {
  30316. var $36 = Data_Profunctor_Costrong.unsecond(dictCostrong);
  30317. return function ($37) {
  30318. return v($36($37));
  30319. };
  30320. });
  30321. };
  30322. var cochoiceRe = function cochoiceRe(dictCochoice) {
  30323. return new Data_Profunctor_Choice.Choice(function () {
  30324. return profunctorRe(dictCochoice.Profunctor0());
  30325. }, function (v) {
  30326. var $38 = Data_Profunctor_Cochoice.unleft(dictCochoice);
  30327. return function ($39) {
  30328. return v($38($39));
  30329. };
  30330. }, function (v) {
  30331. var $40 = Data_Profunctor_Cochoice.unright(dictCochoice);
  30332. return function ($41) {
  30333. return v($40($41));
  30334. };
  30335. });
  30336. };
  30337. var choiceRe = function choiceRe(dictChoice) {
  30338. return new Data_Profunctor_Cochoice.Cochoice(function () {
  30339. return profunctorRe(dictChoice.Profunctor0());
  30340. }, function (v) {
  30341. var $42 = Data_Profunctor_Choice.left(dictChoice);
  30342. return function ($43) {
  30343. return v($42($43));
  30344. };
  30345. }, function (v) {
  30346. var $44 = Data_Profunctor_Choice.right(dictChoice);
  30347. return function ($45) {
  30348. return v($44($45));
  30349. };
  30350. });
  30351. };
  30352. module.exports = {
  30353. Re: Re,
  30354. newtypeRe: newtypeRe,
  30355. profunctorRe: profunctorRe,
  30356. choiceRe: choiceRe,
  30357. cochoiceRe: cochoiceRe,
  30358. strongRe: strongRe,
  30359. costrongRe: costrongRe
  30360. };
  30361. },{"../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.Costrong/index.js":"../output/Data.Profunctor.Costrong/index.js","../Data.Profunctor.Strong/index.js":"../output/Data.Profunctor.Strong/index.js"}],"../output/Data.Lens.Iso/index.js":[function(require,module,exports) {
  30362. // Generated by purs version 0.13.6
  30363. "use strict";
  30364. var Control_Category = require("../Control.Category/index.js");
  30365. var Data_Boolean = require("../Data.Boolean/index.js");
  30366. var Data_Eq = require("../Data.Eq/index.js");
  30367. var Data_Function = require("../Data.Function/index.js");
  30368. var Data_Functor = require("../Data.Functor/index.js");
  30369. var Data_Lens_Internal_Exchange = require("../Data.Lens.Internal.Exchange/index.js");
  30370. var Data_Lens_Internal_Re = require("../Data.Lens.Internal.Re/index.js");
  30371. var Data_Maybe = require("../Data.Maybe/index.js");
  30372. var Data_Newtype = require("../Data.Newtype/index.js");
  30373. var Data_Profunctor = require("../Data.Profunctor/index.js");
  30374. var Data_Tuple = require("../Data.Tuple/index.js");
  30375. var withIso = function withIso(l) {
  30376. return function (f) {
  30377. var v = l(new Data_Lens_Internal_Exchange.Exchange(Control_Category.identity(Control_Category.categoryFn), Control_Category.identity(Control_Category.categoryFn)));
  30378. return f(v.value0)(v.value1);
  30379. };
  30380. };
  30381. var under = function under(l) {
  30382. return withIso(l)(function (sa) {
  30383. return function (bt) {
  30384. return function (ts) {
  30385. return function ($19) {
  30386. return sa(ts(bt($19)));
  30387. };
  30388. };
  30389. };
  30390. });
  30391. };
  30392. var re = function re(t) {
  30393. return Data_Newtype.unwrap(Data_Lens_Internal_Re.newtypeRe)(t(Control_Category.identity(Control_Category.categoryFn)));
  30394. };
  30395. var iso = function iso(f) {
  30396. return function (g) {
  30397. return function (dictProfunctor) {
  30398. return function (pab) {
  30399. return Data_Profunctor.dimap(dictProfunctor)(f)(g)(pab);
  30400. };
  30401. };
  30402. };
  30403. };
  30404. var mapping = function mapping(dictFunctor) {
  30405. return function (dictFunctor1) {
  30406. return function (l) {
  30407. return function (dictProfunctor) {
  30408. return withIso(l)(function (sa) {
  30409. return function (bt) {
  30410. return iso(Data_Functor.map(dictFunctor)(sa))(Data_Functor.map(dictFunctor1)(bt))(dictProfunctor);
  30411. };
  30412. });
  30413. };
  30414. };
  30415. };
  30416. };
  30417. var non = function non(dictEq) {
  30418. return function (def) {
  30419. return function (dictProfunctor) {
  30420. var g = function g(a) {
  30421. if (Data_Eq.eq(dictEq)(a)(def)) {
  30422. return Data_Maybe.Nothing.value;
  30423. }
  30424. ;
  30425. if (Data_Boolean.otherwise) {
  30426. return new Data_Maybe.Just(a);
  30427. }
  30428. ;
  30429. throw new Error("Failed pattern match at Data.Lens.Iso (line 45, column 9 - line 46, column 33): " + [a.constructor.name]);
  30430. };
  30431. return iso(Data_Maybe.fromMaybe(def))(g)(dictProfunctor);
  30432. };
  30433. };
  30434. };
  30435. var uncurried = function uncurried(dictProfunctor) {
  30436. return iso(Data_Tuple.uncurry)(Data_Tuple.curry)(dictProfunctor);
  30437. };
  30438. var flipped = function flipped(dictProfunctor) {
  30439. return iso(Data_Function.flip)(Data_Function.flip)(dictProfunctor);
  30440. };
  30441. var dimapping = function dimapping(dictProfunctor) {
  30442. return function (dictProfunctor1) {
  30443. return function (f) {
  30444. return function (g) {
  30445. return function (dictProfunctor2) {
  30446. return withIso(f)(function (sa) {
  30447. return function (bt) {
  30448. return withIso(g)(function (ssaa) {
  30449. return function (bbtt) {
  30450. return iso(Data_Profunctor.dimap(dictProfunctor)(sa)(ssaa))(Data_Profunctor.dimap(dictProfunctor1)(bt)(bbtt))(dictProfunctor2);
  30451. };
  30452. });
  30453. };
  30454. });
  30455. };
  30456. };
  30457. };
  30458. };
  30459. };
  30460. var curried = function curried(dictProfunctor) {
  30461. return iso(Data_Tuple.curry)(Data_Tuple.uncurry)(dictProfunctor);
  30462. };
  30463. var cloneIso = function cloneIso(l) {
  30464. return function (dictProfunctor) {
  30465. return withIso(l)(function (x) {
  30466. return function (y) {
  30467. return function (p) {
  30468. return iso(x)(y)(dictProfunctor)(p);
  30469. };
  30470. };
  30471. });
  30472. };
  30473. };
  30474. var auf = function auf(dictProfunctor) {
  30475. return function (l) {
  30476. return withIso(l)(function (sa) {
  30477. return function (bt) {
  30478. return function (f) {
  30479. return function (g) {
  30480. return function (e) {
  30481. return bt(f(Data_Profunctor.rmap(dictProfunctor)(sa)(g))(e));
  30482. };
  30483. };
  30484. };
  30485. };
  30486. });
  30487. };
  30488. };
  30489. var au = function au(l) {
  30490. return withIso(l)(function (sa) {
  30491. return function (bt) {
  30492. return function (f) {
  30493. return function (e) {
  30494. return sa(f(bt)(e));
  30495. };
  30496. };
  30497. };
  30498. });
  30499. };
  30500. module.exports = {
  30501. iso: iso,
  30502. withIso: withIso,
  30503. cloneIso: cloneIso,
  30504. re: re,
  30505. au: au,
  30506. auf: auf,
  30507. under: under,
  30508. non: non,
  30509. curried: curried,
  30510. uncurried: uncurried,
  30511. flipped: flipped,
  30512. mapping: mapping,
  30513. dimapping: dimapping
  30514. };
  30515. },{"../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.Lens.Internal.Exchange/index.js":"../output/Data.Lens.Internal.Exchange/index.js","../Data.Lens.Internal.Re/index.js":"../output/Data.Lens.Internal.Re/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.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/Data.Lens.Iso.Newtype/index.js":[function(require,module,exports) {
  30516. // Generated by purs version 0.13.6
  30517. "use strict";
  30518. var Data_Lens_Iso = require("../Data.Lens.Iso/index.js");
  30519. var Data_Newtype = require("../Data.Newtype/index.js");
  30520. var _Newtype = function _Newtype(dictNewtype) {
  30521. return function (dictNewtype1) {
  30522. return function (dictProfunctor) {
  30523. return Data_Lens_Iso.iso(Data_Newtype.unwrap(dictNewtype))(Data_Newtype.wrap(dictNewtype1))(dictProfunctor);
  30524. };
  30525. };
  30526. };
  30527. module.exports = {
  30528. "_Newtype": _Newtype
  30529. };
  30530. },{"../Data.Lens.Iso/index.js":"../output/Data.Lens.Iso/index.js","../Data.Newtype/index.js":"../output/Data.Newtype/index.js"}],"../output/Data.Lens.Record/index.js":[function(require,module,exports) {
  30531. // Generated by purs version 0.13.6
  30532. "use strict";
  30533. var Data_Function = require("../Data.Function/index.js");
  30534. var Data_Lens_Lens = require("../Data.Lens.Lens/index.js");
  30535. var Record = require("../Record/index.js");
  30536. var prop = function prop(dictIsSymbol) {
  30537. return function (dictCons) {
  30538. return function (dictCons1) {
  30539. return function (l) {
  30540. return function (dictStrong) {
  30541. return Data_Lens_Lens.lens(Record.get(dictIsSymbol)()(l))(Data_Function.flip(Record.set(dictIsSymbol)()()(l)))(dictStrong);
  30542. };
  30543. };
  30544. };
  30545. };
  30546. };
  30547. module.exports = {
  30548. prop: prop
  30549. };
  30550. },{"../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) {
  30551. // Generated by purs version 0.13.6
  30552. "use strict";
  30553. var Browser_Tabs = require("../Browser.Tabs/index.js");
  30554. var Data_Functor = require("../Data.Functor/index.js");
  30555. var Data_Generic_Rep = require("../Data.Generic.Rep/index.js");
  30556. var Data_Generic_Rep_Show = require("../Data.Generic.Rep.Show/index.js");
  30557. var Data_Lens_At = require("../Data.Lens.At/index.js");
  30558. var Data_Lens_Getter = require("../Data.Lens.Getter/index.js");
  30559. var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js");
  30560. var Data_Lens_Iso_Newtype = require("../Data.Lens.Iso.Newtype/index.js");
  30561. var Data_Lens_Prism_Maybe = require("../Data.Lens.Prism.Maybe/index.js");
  30562. var Data_Lens_Record = require("../Data.Lens.Record/index.js");
  30563. var Data_List = require("../Data.List/index.js");
  30564. var Data_List_Types = require("../Data.List.Types/index.js");
  30565. var Data_Map_Internal = require("../Data.Map.Internal/index.js");
  30566. var Data_Maybe = require("../Data.Maybe/index.js");
  30567. var Data_Newtype = require("../Data.Newtype/index.js");
  30568. var Data_Show = require("../Data.Show/index.js");
  30569. var Data_Symbol = require("../Data.Symbol/index.js");
  30570. var Data_Tuple = require("../Data.Tuple/index.js");
  30571. var SbTabDeleted = function () {
  30572. function SbTabDeleted(value0) {
  30573. this.value0 = value0;
  30574. }
  30575. ;
  30576. SbTabDeleted.create = function (value0) {
  30577. return new SbTabDeleted(value0);
  30578. };
  30579. return SbTabDeleted;
  30580. }();
  30581. var SbTabCreated = function () {
  30582. function SbTabCreated() {}
  30583. ;
  30584. SbTabCreated.value = new SbTabCreated();
  30585. return SbTabCreated;
  30586. }();
  30587. var SbTabMoved = function () {
  30588. function SbTabMoved() {}
  30589. ;
  30590. SbTabMoved.value = new SbTabMoved();
  30591. return SbTabMoved;
  30592. }();
  30593. var SbTabDetached = function () {
  30594. function SbTabDetached() {}
  30595. ;
  30596. SbTabDetached.value = new SbTabDetached();
  30597. return SbTabDetached;
  30598. }();
  30599. var SbGroupCreated = function () {
  30600. function SbGroupCreated() {}
  30601. ;
  30602. SbGroupCreated.value = new SbGroupCreated();
  30603. return SbGroupCreated;
  30604. }();
  30605. var SbGroupDeleted = function () {
  30606. function SbGroupDeleted() {}
  30607. ;
  30608. SbGroupDeleted.value = new SbGroupDeleted();
  30609. return SbGroupDeleted;
  30610. }();
  30611. var SbGroupRenamed = function () {
  30612. function SbGroupRenamed() {}
  30613. ;
  30614. SbGroupRenamed.value = new SbGroupRenamed();
  30615. return SbGroupRenamed;
  30616. }();
  30617. var SbHasWindowId = function () {
  30618. function SbHasWindowId(value0) {
  30619. this.value0 = value0;
  30620. }
  30621. ;
  30622. SbHasWindowId.create = function (value0) {
  30623. return new SbHasWindowId(value0);
  30624. };
  30625. return SbHasWindowId;
  30626. }();
  30627. var BgInitialTabList = function () {
  30628. function BgInitialTabList(value0) {
  30629. this.value0 = value0;
  30630. }
  30631. ;
  30632. BgInitialTabList.create = function (value0) {
  30633. return new BgInitialTabList(value0);
  30634. };
  30635. return BgInitialTabList;
  30636. }();
  30637. var BgTabCreated = function () {
  30638. function BgTabCreated(value0) {
  30639. this.value0 = value0;
  30640. }
  30641. ;
  30642. BgTabCreated.create = function (value0) {
  30643. return new BgTabCreated(value0);
  30644. };
  30645. return BgTabCreated;
  30646. }();
  30647. var BgTabDeleted = function () {
  30648. function BgTabDeleted(value0) {
  30649. this.value0 = value0;
  30650. }
  30651. ;
  30652. BgTabDeleted.create = function (value0) {
  30653. return new BgTabDeleted(value0);
  30654. };
  30655. return BgTabDeleted;
  30656. }();
  30657. var BgTabMoved = function () {
  30658. function BgTabMoved() {}
  30659. ;
  30660. BgTabMoved.value = new BgTabMoved();
  30661. return BgTabMoved;
  30662. }();
  30663. var BgTabActived = function () {
  30664. function BgTabActived(value0) {
  30665. this.value0 = value0;
  30666. }
  30667. ;
  30668. BgTabActived.create = function (value0) {
  30669. return new BgTabActived(value0);
  30670. };
  30671. return BgTabActived;
  30672. }();
  30673. var BgTabAttached = function () {
  30674. function BgTabAttached(value0) {
  30675. this.value0 = value0;
  30676. }
  30677. ;
  30678. BgTabAttached.create = function (value0) {
  30679. return new BgTabAttached(value0);
  30680. };
  30681. return BgTabAttached;
  30682. }();
  30683. var BgTabDetached = function () {
  30684. function BgTabDetached(value0) {
  30685. this.value0 = value0;
  30686. }
  30687. ;
  30688. BgTabDetached.create = function (value0) {
  30689. return new BgTabDetached(value0);
  30690. };
  30691. return BgTabDetached;
  30692. }();
  30693. var BgTabHighlighted = function () {
  30694. function BgTabHighlighted() {}
  30695. ;
  30696. BgTabHighlighted.value = new BgTabHighlighted();
  30697. return BgTabHighlighted;
  30698. }();
  30699. var BgTabReplaced = function () {
  30700. function BgTabReplaced() {}
  30701. ;
  30702. BgTabReplaced.value = new BgTabReplaced();
  30703. return BgTabReplaced;
  30704. }();
  30705. var BgTabZoomChanged = function () {
  30706. function BgTabZoomChanged() {}
  30707. ;
  30708. BgTabZoomChanged.value = new BgTabZoomChanged();
  30709. return BgTabZoomChanged;
  30710. }();
  30711. var initialGlobalState = {
  30712. windows: Data_Map_Internal.empty
  30713. };
  30714. var genSidebarEvent = new Data_Generic_Rep.Generic(function (x) {
  30715. if (x instanceof SbTabDeleted) {
  30716. return new Data_Generic_Rep.Inl(x.value0);
  30717. }
  30718. ;
  30719. if (x instanceof SbTabCreated) {
  30720. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value));
  30721. }
  30722. ;
  30723. if (x instanceof SbTabMoved) {
  30724. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value)));
  30725. }
  30726. ;
  30727. if (x instanceof SbTabDetached) {
  30728. 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))));
  30729. }
  30730. ;
  30731. if (x instanceof SbGroupCreated) {
  30732. 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)))));
  30733. }
  30734. ;
  30735. if (x instanceof SbGroupDeleted) {
  30736. 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))))));
  30737. }
  30738. ;
  30739. if (x instanceof SbGroupRenamed) {
  30740. 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)))))));
  30741. }
  30742. ;
  30743. if (x instanceof SbHasWindowId) {
  30744. 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)))))));
  30745. }
  30746. ;
  30747. throw new Error("Failed pattern match at PureTabs.Model (line 141, column 1 - line 141, column 58): " + [x.constructor.name]);
  30748. }, function (x) {
  30749. if (x instanceof Data_Generic_Rep.Inl) {
  30750. return new SbTabDeleted(x.value0);
  30751. }
  30752. ;
  30753. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inl) {
  30754. return SbTabCreated.value;
  30755. }
  30756. ;
  30757. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inl) {
  30758. return SbTabMoved.value;
  30759. }
  30760. ;
  30761. 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) {
  30762. return SbTabDetached.value;
  30763. }
  30764. ;
  30765. 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) {
  30766. return SbGroupCreated.value;
  30767. }
  30768. ;
  30769. 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) {
  30770. return SbGroupDeleted.value;
  30771. }
  30772. ;
  30773. 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) {
  30774. return SbGroupRenamed.value;
  30775. }
  30776. ;
  30777. 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) {
  30778. return new SbHasWindowId(x.value0.value0.value0.value0.value0.value0.value0);
  30779. }
  30780. ;
  30781. throw new Error("Failed pattern match at PureTabs.Model (line 141, column 1 - line 141, column 58): " + [x.constructor.name]);
  30782. });
  30783. 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 () {
  30784. return "SbTabDeleted";
  30785. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  30786. return "SbTabCreated";
  30787. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  30788. return "SbTabMoved";
  30789. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  30790. return "SbTabDetached";
  30791. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  30792. return "SbGroupCreated";
  30793. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  30794. return "SbGroupDeleted";
  30795. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  30796. return "SbGroupRenamed";
  30797. })))(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showWindowId))(new Data_Symbol.IsSymbol(function () {
  30798. return "SbHasWindowId";
  30799. })))))))))));
  30800. var genBackgroundEvent = new Data_Generic_Rep.Generic(function (x) {
  30801. if (x instanceof BgInitialTabList) {
  30802. return new Data_Generic_Rep.Inl(x.value0);
  30803. }
  30804. ;
  30805. if (x instanceof BgTabCreated) {
  30806. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0));
  30807. }
  30808. ;
  30809. if (x instanceof BgTabDeleted) {
  30810. return new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inr(new Data_Generic_Rep.Inl(x.value0)));
  30811. }
  30812. ;
  30813. if (x instanceof BgTabMoved) {
  30814. 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))));
  30815. }
  30816. ;
  30817. if (x instanceof BgTabActived) {
  30818. 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)))));
  30819. }
  30820. ;
  30821. if (x instanceof BgTabAttached) {
  30822. 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))))));
  30823. }
  30824. ;
  30825. if (x instanceof BgTabDetached) {
  30826. 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(x.value0)))))));
  30827. }
  30828. ;
  30829. if (x instanceof BgTabHighlighted) {
  30830. 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))))))));
  30831. }
  30832. ;
  30833. if (x instanceof BgTabReplaced) {
  30834. 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(new Data_Generic_Rep.Inl(Data_Generic_Rep.NoArguments.value)))))))));
  30835. }
  30836. ;
  30837. if (x instanceof BgTabZoomChanged) {
  30838. 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(new Data_Generic_Rep.Inr(Data_Generic_Rep.NoArguments.value)))))))));
  30839. }
  30840. ;
  30841. throw new Error("Failed pattern match at PureTabs.Model (line 126, column 1 - line 126, column 64): " + [x.constructor.name]);
  30842. }, function (x) {
  30843. if (x instanceof Data_Generic_Rep.Inl) {
  30844. return new BgInitialTabList(x.value0);
  30845. }
  30846. ;
  30847. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inl) {
  30848. return new BgTabCreated(x.value0.value0);
  30849. }
  30850. ;
  30851. if (x instanceof Data_Generic_Rep.Inr && x.value0 instanceof Data_Generic_Rep.Inr && x.value0.value0 instanceof Data_Generic_Rep.Inl) {
  30852. return new BgTabDeleted(x.value0.value0.value0);
  30853. }
  30854. ;
  30855. 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) {
  30856. return BgTabMoved.value;
  30857. }
  30858. ;
  30859. 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) {
  30860. return new BgTabActived(x.value0.value0.value0.value0.value0);
  30861. }
  30862. ;
  30863. 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) {
  30864. return new BgTabAttached(x.value0.value0.value0.value0.value0.value0);
  30865. }
  30866. ;
  30867. 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) {
  30868. return new BgTabDetached(x.value0.value0.value0.value0.value0.value0.value0);
  30869. }
  30870. ;
  30871. 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) {
  30872. return BgTabHighlighted.value;
  30873. }
  30874. ;
  30875. 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 && x.value0.value0.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inl) {
  30876. return BgTabReplaced.value;
  30877. }
  30878. ;
  30879. 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 && x.value0.value0.value0.value0.value0.value0.value0.value0 instanceof Data_Generic_Rep.Inr) {
  30880. return BgTabZoomChanged.value;
  30881. }
  30882. ;
  30883. throw new Error("Failed pattern match at PureTabs.Model (line 126, column 1 - line 126, column 64): " + [x.constructor.name]);
  30884. });
  30885. 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(Data_Show.showArray(Browser_Tabs.showTab)))(new Data_Symbol.IsSymbol(function () {
  30886. return "BgInitialTabList";
  30887. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTab))(new Data_Symbol.IsSymbol(function () {
  30888. return "BgTabCreated";
  30889. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTabId))(new Data_Symbol.IsSymbol(function () {
  30890. return "BgTabDeleted";
  30891. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  30892. return "BgTabMoved";
  30893. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTabId))(new Data_Symbol.IsSymbol(function () {
  30894. return "BgTabActived";
  30895. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTab))(new Data_Symbol.IsSymbol(function () {
  30896. return "BgTabAttached";
  30897. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsArgument(Browser_Tabs.showTabId))(new Data_Symbol.IsSymbol(function () {
  30898. return "BgTabDetached";
  30899. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  30900. return "BgTabHighlighted";
  30901. })))(Data_Generic_Rep_Show.genericShowSum(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  30902. return "BgTabReplaced";
  30903. })))(Data_Generic_Rep_Show.genericShowConstructor(Data_Generic_Rep_Show.genericShowArgsNoArguments)(new Data_Symbol.IsSymbol(function () {
  30904. return "BgTabZoomChanged";
  30905. })))))))))))));
  30906. var _windows = function _windows(dictStrong) {
  30907. return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
  30908. return "windows";
  30909. }))()()(Data_Symbol.SProxy.value)(dictStrong);
  30910. };
  30911. var _windowId = function _windowId(dictStrong) {
  30912. return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
  30913. return "windowId";
  30914. }))()()(Data_Symbol.SProxy.value)(dictStrong);
  30915. };
  30916. var _title = function _title(dictStrong) {
  30917. return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
  30918. return "title";
  30919. }))()()(Data_Symbol.SProxy.value)(dictStrong);
  30920. };
  30921. var _tabs = function _tabs(dictStrong) {
  30922. return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
  30923. return "tabs";
  30924. }))()()(Data_Symbol.SProxy.value)(dictStrong);
  30925. };
  30926. var _tabWindowId = function _tabWindowId(dictStrong) {
  30927. var $122 = Data_Lens_Iso_Newtype["_Newtype"](Browser_Tabs.newtypeTab)(Browser_Tabs.newtypeTab)(dictStrong.Profunctor0());
  30928. var $123 = _windowId(dictStrong);
  30929. return function ($124) {
  30930. return $122($123($124));
  30931. };
  30932. };
  30933. var _tabTitle = function _tabTitle(dictStrong) {
  30934. var $125 = Data_Lens_Iso_Newtype["_Newtype"](Browser_Tabs.newtypeTab)(Browser_Tabs.newtypeTab)(dictStrong.Profunctor0());
  30935. var $126 = _title(dictStrong);
  30936. return function ($127) {
  30937. return $125($126($127));
  30938. };
  30939. };
  30940. var _tabFromWindow = function _tabFromWindow(tab$prime) {
  30941. return function (dictWander) {
  30942. var tab = Data_Newtype.unwrap(Browser_Tabs.newtypeTab)(tab$prime);
  30943. var $128 = _windows(dictWander.Strong0());
  30944. var $129 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(tab.windowId)(dictWander.Strong0());
  30945. var $130 = Data_Lens_Prism_Maybe["_Just"](dictWander.Choice1());
  30946. var $131 = _tabs(dictWander.Strong0());
  30947. var $132 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordTabId))(tab.id)(dictWander.Strong0());
  30948. return function ($133) {
  30949. return $128($129($130($131($132($133)))));
  30950. };
  30951. };
  30952. };
  30953. var _tabFromTabIdAndWindow = function _tabFromTabIdAndWindow(s) {
  30954. return function (tabId) {
  30955. var allWindows = Data_Map_Internal.values(s.windows);
  30956. var allTabs = Data_Functor.map(Data_List_Types.functorList)(Data_Lens_Getter.view(_tabs(Data_Lens_Internal_Forget.strongForget)))(allWindows);
  30957. var matchingTabId = Data_Functor.map(Data_List_Types.functorList)(Data_Map_Internal.lookup(Browser_Tabs.ordTabId)(tabId))(allTabs);
  30958. return Data_List.catMaybes(matchingTabId);
  30959. };
  30960. };
  30961. var _port = function _port(dictStrong) {
  30962. return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
  30963. return "port";
  30964. }))()()(Data_Symbol.SProxy.value)(dictStrong);
  30965. };
  30966. var _portFromWindow = function _portFromWindow(tab$prime) {
  30967. return function (dictWander) {
  30968. var tab = Data_Newtype.unwrap(Browser_Tabs.newtypeTab)(tab$prime);
  30969. var $134 = _windows(dictWander.Strong0());
  30970. var $135 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(tab.windowId)(dictWander.Strong0());
  30971. var $136 = Data_Lens_Prism_Maybe["_Just"](dictWander.Choice1());
  30972. var $137 = _port(dictWander.Strong0());
  30973. var $138 = Data_Lens_Prism_Maybe["_Just"](dictWander.Choice1());
  30974. return function ($139) {
  30975. return $134($135($136($137($138($139)))));
  30976. };
  30977. };
  30978. };
  30979. var _id = function _id(dictStrong) {
  30980. return Data_Lens_Record.prop(new Data_Symbol.IsSymbol(function () {
  30981. return "id";
  30982. }))()()(Data_Symbol.SProxy.value)(dictStrong);
  30983. };
  30984. var _tabId = function _tabId(dictStrong) {
  30985. var $140 = Data_Lens_Iso_Newtype["_Newtype"](Browser_Tabs.newtypeTab)(Browser_Tabs.newtypeTab)(dictStrong.Profunctor0());
  30986. var $141 = _id(dictStrong);
  30987. return function ($142) {
  30988. return $140($141($142));
  30989. };
  30990. };
  30991. var tabsToGlobalState = function tabsToGlobalState(tabs) {
  30992. var tabsToWindows = function tabsToWindows(tabs$prime) {
  30993. return Data_Map_Internal.fromFoldableWith(Browser_Tabs.ordWindowId)(Data_List_Types.foldableList)(function (v1) {
  30994. return function (v2) {
  30995. return {
  30996. tabs: Data_Map_Internal.union(Browser_Tabs.ordTabId)(v1.tabs)(v2.tabs),
  30997. port: Data_Maybe.Nothing.value
  30998. };
  30999. };
  31000. })(Data_Functor.map(Data_List_Types.functorList)(function (t) {
  31001. return new Data_Tuple.Tuple(Data_Lens_Getter.view(_tabWindowId(Data_Lens_Internal_Forget.strongForget))(t), {
  31002. tabs: Data_Map_Internal.singleton(Data_Lens_Getter.view(_tabId(Data_Lens_Internal_Forget.strongForget))(t))(t),
  31003. port: Data_Maybe.Nothing.value
  31004. });
  31005. })(tabs$prime));
  31006. };
  31007. return {
  31008. windows: tabsToWindows(tabs)
  31009. };
  31010. };
  31011. module.exports = {
  31012. "_tabs": _tabs,
  31013. "_port": _port,
  31014. "_windows": _windows,
  31015. "_portFromWindow": _portFromWindow,
  31016. "_tabFromWindow": _tabFromWindow,
  31017. "_tabWindowId": _tabWindowId,
  31018. "_tabId": _tabId,
  31019. "_tabFromTabIdAndWindow": _tabFromTabIdAndWindow,
  31020. initialGlobalState: initialGlobalState,
  31021. tabsToGlobalState: tabsToGlobalState,
  31022. BgInitialTabList: BgInitialTabList,
  31023. BgTabCreated: BgTabCreated,
  31024. BgTabDeleted: BgTabDeleted,
  31025. BgTabMoved: BgTabMoved,
  31026. BgTabActived: BgTabActived,
  31027. BgTabAttached: BgTabAttached,
  31028. BgTabDetached: BgTabDetached,
  31029. BgTabHighlighted: BgTabHighlighted,
  31030. BgTabReplaced: BgTabReplaced,
  31031. BgTabZoomChanged: BgTabZoomChanged,
  31032. SbTabDeleted: SbTabDeleted,
  31033. SbTabCreated: SbTabCreated,
  31034. SbTabMoved: SbTabMoved,
  31035. SbTabDetached: SbTabDetached,
  31036. SbGroupCreated: SbGroupCreated,
  31037. SbGroupDeleted: SbGroupDeleted,
  31038. SbGroupRenamed: SbGroupRenamed,
  31039. SbHasWindowId: SbHasWindowId,
  31040. genBackgroundEvent: genBackgroundEvent,
  31041. showBackgroundEvent: showBackgroundEvent,
  31042. genSidebarEvent: genSidebarEvent,
  31043. showSidebarEvent: showSidebarEvent
  31044. };
  31045. },{"../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.Iso.Newtype/index.js":"../output/Data.Lens.Iso.Newtype/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.Maybe/index.js":"../output/Data.Maybe/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","../Data.Tuple/index.js":"../output/Data.Tuple/index.js"}],"../output/PureTabs.Background/index.js":[function(require,module,exports) {
  31046. // Generated by purs version 0.13.6
  31047. "use strict";
  31048. var Browser_Runtime = require("../Browser.Runtime/index.js");
  31049. var Browser_Tabs = require("../Browser.Tabs/index.js");
  31050. var Browser_Tabs_OnCreated = require("../Browser.Tabs.OnCreated/index.js");
  31051. var Browser_Tabs_OnRemoved = require("../Browser.Tabs.OnRemoved/index.js");
  31052. var Browser_Utils = require("../Browser.Utils/index.js");
  31053. var Control_Applicative = require("../Control.Applicative/index.js");
  31054. var Control_Apply = require("../Control.Apply/index.js");
  31055. var Control_Bind = require("../Control.Bind/index.js");
  31056. var Data_Array = require("../Data.Array/index.js");
  31057. var Data_Foldable = require("../Data.Foldable/index.js");
  31058. var Data_Function = require("../Data.Function/index.js");
  31059. var Data_Lens_At = require("../Data.Lens.At/index.js");
  31060. var Data_Lens_Fold = require("../Data.Lens.Fold/index.js");
  31061. var Data_Lens_Internal_Forget = require("../Data.Lens.Internal.Forget/index.js");
  31062. var Data_Lens_Internal_Wander = require("../Data.Lens.Internal.Wander/index.js");
  31063. var Data_Lens_Prism_Maybe = require("../Data.Lens.Prism.Maybe/index.js");
  31064. var Data_Lens_Setter = require("../Data.Lens.Setter/index.js");
  31065. var Data_List_Types = require("../Data.List.Types/index.js");
  31066. var Data_Map_Internal = require("../Data.Map.Internal/index.js");
  31067. var Data_Maybe = require("../Data.Maybe/index.js");
  31068. var Data_Maybe_First = require("../Data.Maybe.First/index.js");
  31069. var Data_Monoid = require("../Data.Monoid/index.js");
  31070. var Data_Newtype = require("../Data.Newtype/index.js");
  31071. var Data_Profunctor_Choice = require("../Data.Profunctor.Choice/index.js");
  31072. var Data_Profunctor_Strong = require("../Data.Profunctor.Strong/index.js");
  31073. var Data_Show = require("../Data.Show/index.js");
  31074. var Data_Symbol = require("../Data.Symbol/index.js");
  31075. var Data_Unit = require("../Data.Unit/index.js");
  31076. var Effect = require("../Effect/index.js");
  31077. var Effect_Aff = require("../Effect.Aff/index.js");
  31078. var Effect_Class = require("../Effect.Class/index.js");
  31079. var Effect_Console = require("../Effect.Console/index.js");
  31080. var Effect_Ref = require("../Effect.Ref/index.js");
  31081. var Foreign_Generic_Class = require("../Foreign.Generic.Class/index.js");
  31082. var PureTabs_Model = require("../PureTabs.Model/index.js");
  31083. var onTabDeleted = function onTabDeleted(stateRef) {
  31084. return function (tabId) {
  31085. return function (info) {
  31086. return function __do() {
  31087. var state = Effect_Ref.read(stateRef)();
  31088. var allTabs = PureTabs_Model["_tabFromTabIdAndWindow"](state)(tabId);
  31089. var newState = Data_Foldable.foldr(Data_List_Types.foldableList)(function (t) {
  31090. return Data_Lens_Setter.set(PureTabs_Model["_tabFromWindow"](t)(Data_Lens_Internal_Wander.wanderFunction))(Data_Maybe.Nothing.value);
  31091. })(state)(allTabs);
  31092. Effect_Ref.write(newState)(stateRef)();
  31093. return Data_Foldable.for_(Effect.applicativeEffect)(Data_List_Types.foldableList)(allTabs)(function (t) {
  31094. var port = Data_Lens_Fold.preview(PureTabs_Model["_portFromWindow"](t)(Data_Lens_Internal_Forget.wanderForget(Data_Maybe_First.monoidFirst)))(state);
  31095. 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 () {
  31096. return "BgInitialTabList";
  31097. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.arrayEncode(Browser_Tabs.encodeTab)))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31098. return "BgTabCreated";
  31099. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31100. return "BgTabDeleted";
  31101. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31102. return "BgTabMoved";
  31103. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31104. return "BgTabActived";
  31105. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31106. return "BgTabAttached";
  31107. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31108. return "BgTabDetached";
  31109. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31110. return "BgTabHighlighted";
  31111. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31112. return "BgTabReplaced";
  31113. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31114. return "BgTabZoomChanged";
  31115. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))))))))))))(new PureTabs_Model.BgTabDeleted(tabId)))(port);
  31116. })();
  31117. };
  31118. };
  31119. };
  31120. };
  31121. var onTabCreated = function onTabCreated(stateRef) {
  31122. return function (tab$prime) {
  31123. var tab = Data_Newtype.unwrap(Browser_Tabs.newtypeTab)(tab$prime);
  31124. return function __do() {
  31125. 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)();
  31126. Effect_Console.log("tabId: " + (Data_Show.show(Browser_Tabs.showTabId)(tab.id) + (" windowId " + Data_Show.show(Browser_Tabs.showWindowId)(tab.windowId))))();
  31127. var v = Data_Lens_Fold.preview(PureTabs_Model["_portFromWindow"](tab$prime)(Data_Lens_Internal_Forget.wanderForget(Data_Maybe_First.monoidFirst)))(state);
  31128. if (v instanceof Data_Maybe.Nothing) {
  31129. return Data_Unit.unit;
  31130. }
  31131. ;
  31132. if (v instanceof Data_Maybe.Just) {
  31133. Browser_Runtime.postMessageJson(PureTabs_Model.genBackgroundEvent)(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31134. return "BgInitialTabList";
  31135. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.arrayEncode(Browser_Tabs.encodeTab)))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31136. return "BgTabCreated";
  31137. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31138. return "BgTabDeleted";
  31139. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31140. return "BgTabMoved";
  31141. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31142. return "BgTabActived";
  31143. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31144. return "BgTabAttached";
  31145. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31146. return "BgTabDetached";
  31147. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31148. return "BgTabHighlighted";
  31149. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31150. return "BgTabReplaced";
  31151. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31152. return "BgTabZoomChanged";
  31153. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments)))))))))))(v.value0)(new PureTabs_Model.BgTabCreated(tab$prime))();
  31154. return Effect_Console.log("tab " + (Data_Show.show(Browser_Tabs.showTabId)(tab.id) + (" created: " + tab.title)))();
  31155. }
  31156. ;
  31157. throw new Error("Failed pattern match at PureTabs.Background (line 63, column 3 - line 67, column 65): " + [v.constructor.name]);
  31158. };
  31159. };
  31160. };
  31161. var onDisconnect = function onDisconnect(stateRef) {
  31162. return function (winId) {
  31163. return function (listener) {
  31164. return Effect_Ref.modify_(Data_Lens_Setter.set(function () {
  31165. var $8 = PureTabs_Model["_windows"](Data_Profunctor_Strong.strongFn);
  31166. var $9 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(winId)(Data_Profunctor_Strong.strongFn);
  31167. var $10 = Data_Lens_Prism_Maybe["_Just"](Data_Profunctor_Choice.choiceFn);
  31168. var $11 = PureTabs_Model["_port"](Data_Profunctor_Strong.strongFn);
  31169. return function ($12) {
  31170. return $8($9($10($11($12))));
  31171. };
  31172. }())(Data_Maybe.Nothing.value))(stateRef);
  31173. };
  31174. };
  31175. };
  31176. var manageSidebar = function manageSidebar(stateRef) {
  31177. return function (port) {
  31178. return function (msg) {
  31179. return Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit);
  31180. };
  31181. };
  31182. };
  31183. var initWindowState = function initWindowState(port) {
  31184. return function (ref) {
  31185. return function (winId) {
  31186. return Data_Function.flip(Effect_Ref.modify)(ref)(Data_Lens_Setter.over(function () {
  31187. var $13 = PureTabs_Model["_windows"](Data_Profunctor_Strong.strongFn);
  31188. var $14 = Data_Lens_At.at(Data_Lens_At.atMap(Browser_Tabs.ordWindowId))(winId)(Data_Profunctor_Strong.strongFn);
  31189. return function ($15) {
  31190. return $13($14($15));
  31191. };
  31192. }())(function (v) {
  31193. if (v instanceof Data_Maybe.Nothing) {
  31194. return Data_Maybe.Just.create({
  31195. tabs: Data_Map_Internal.empty,
  31196. port: new Data_Maybe.Just(port)
  31197. });
  31198. }
  31199. ;
  31200. if (v instanceof Data_Maybe.Just) {
  31201. return Data_Maybe.Just.create(Data_Lens_Setter.set(PureTabs_Model["_port"](Data_Profunctor_Strong.strongFn))(new Data_Maybe.Just(port))(v.value0));
  31202. }
  31203. ;
  31204. throw new Error("Failed pattern match at PureTabs.Background (line 131, column 11 - line 133, column 57): " + [v.constructor.name]);
  31205. }));
  31206. };
  31207. };
  31208. };
  31209. var onNewWindowId = function onNewWindowId(port) {
  31210. return function (stateRef) {
  31211. return function (listenerRef) {
  31212. return function (winId) {
  31213. return function __do() {
  31214. var r = initWindowState(port)(stateRef)(winId)();
  31215. var ogListener = Effect_Ref.read(listenerRef)();
  31216. Data_Foldable.foldMap(Data_Foldable.foldableMaybe)(Effect.monoidEffect(Data_Monoid.monoidUnit))(function (l) {
  31217. return Browser_Runtime.onMessageRemoveListener(port)(l);
  31218. })(ogListener)();
  31219. Effect_Ref.write(Data_Maybe.Nothing.value)(listenerRef)();
  31220. Data_Maybe.maybe(Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit))(function (w) {
  31221. return Browser_Runtime.postMessageJson(PureTabs_Model.genBackgroundEvent)(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31222. return "BgInitialTabList";
  31223. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Foreign_Generic_Class.arrayEncode(Browser_Tabs.encodeTab)))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31224. return "BgTabCreated";
  31225. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31226. return "BgTabDeleted";
  31227. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31228. return "BgTabMoved";
  31229. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31230. return "BgTabActived";
  31231. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31232. return "BgTabAttached";
  31233. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTab))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31234. return "BgTabDetached";
  31235. }))(Foreign_Generic_Class.genericEncodeArgsArgument(Foreign_Generic_Class.encodeWithOptionsOther(Browser_Tabs.encodeTabId))))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31236. return "BgTabHighlighted";
  31237. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeSum(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31238. return "BgTabReplaced";
  31239. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments))(Foreign_Generic_Class.genericEncodeConstructor(new Data_Symbol.IsSymbol(function () {
  31240. return "BgTabZoomChanged";
  31241. }))(Foreign_Generic_Class.genericEncodeArgsNoArguments)))))))))))(port)(PureTabs_Model.BgInitialTabList.create(Data_Array.fromFoldable(Data_List_Types.foldableList)(Data_Map_Internal.values(w.tabs))));
  31242. })(Data_Map_Internal.lookup(Browser_Tabs.ordWindowId)(winId)(r.windows))();
  31243. var sidebarListener = Browser_Runtime.onMessageJsonAddListener(PureTabs_Model.genSidebarEvent)(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31244. return "SbTabDeleted";
  31245. }))(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 () {
  31246. return "SbTabCreated";
  31247. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31248. return "SbTabMoved";
  31249. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31250. return "SbTabDetached";
  31251. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31252. return "SbGroupCreated";
  31253. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31254. return "SbGroupDeleted";
  31255. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31256. return "SbGroupRenamed";
  31257. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31258. return "SbHasWindowId";
  31259. }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeWindowId)))(Foreign_Generic_Class.genericCountArgsArgument)))))))))(port)(manageSidebar(stateRef)(port))();
  31260. var onDisconnectListener = Browser_Utils.mkListenerUnit(onDisconnect(stateRef)(winId)(sidebarListener))();
  31261. return Browser_Runtime.portOnDisconnect(port)(onDisconnectListener)();
  31262. };
  31263. };
  31264. };
  31265. };
  31266. };
  31267. var onConnect = function onConnect(stateRef$prime) {
  31268. return function (port) {
  31269. var windowListener = function windowListener(callback) {
  31270. return function (msg) {
  31271. if (msg instanceof PureTabs_Model.SbHasWindowId) {
  31272. return Control_Apply.applySecond(Effect.applyEffect)(Effect_Console.log("bg: created winId " + Data_Show.show(Browser_Tabs.showWindowId)(msg.value0)))(callback(msg.value0));
  31273. }
  31274. ;
  31275. return Control_Applicative.pure(Effect.applicativeEffect)(Data_Unit.unit);
  31276. };
  31277. };
  31278. return function __do() {
  31279. var listenerRef = Effect_Ref["new"](Data_Maybe.Nothing.value)();
  31280. var initialListener = Browser_Runtime.onMessageJsonAddListener(PureTabs_Model.genSidebarEvent)(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31281. return "SbTabDeleted";
  31282. }))(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 () {
  31283. return "SbTabCreated";
  31284. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31285. return "SbTabMoved";
  31286. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31287. return "SbTabDetached";
  31288. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31289. return "SbGroupCreated";
  31290. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31291. return "SbGroupDeleted";
  31292. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeSum(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31293. return "SbGroupRenamed";
  31294. }))(Foreign_Generic_Class.genericDecodeArgsNoArguments)(Foreign_Generic_Class.genericCountArgsNoArguments))(Foreign_Generic_Class.genericDecodeConstructor(new Data_Symbol.IsSymbol(function () {
  31295. return "SbHasWindowId";
  31296. }))(Foreign_Generic_Class.genericDecodeArgsArgument(Foreign_Generic_Class.decodeWithOptionsOther(Browser_Tabs.decodeWindowId)))(Foreign_Generic_Class.genericCountArgsArgument)))))))))(port)(windowListener(onNewWindowId(port)(stateRef$prime)(listenerRef)))();
  31297. return Effect_Ref.write(new Data_Maybe.Just(initialListener))(listenerRef)();
  31298. };
  31299. };
  31300. };
  31301. var initializeBackground = function initializeBackground(ref) {
  31302. return function __do() {
  31303. Browser_Tabs_OnCreated.addListener(onTabCreated(ref))();
  31304. var tabDeletedListener = Browser_Utils.mkListenerTwo(onTabDeleted(ref))();
  31305. Browser_Tabs_OnRemoved.addListener(tabDeletedListener)();
  31306. var onConnectedListener = Browser_Utils.mkListenerOne(onConnect(ref))();
  31307. Browser_Runtime.onConnectAddListener(onConnectedListener)();
  31308. return Data_Unit.unit;
  31309. };
  31310. };
  31311. var main = function () {
  31312. var runMain = Control_Bind.bind(Effect_Aff.bindAff)(Browser_Tabs.query)(function (allTabs) {
  31313. return Effect_Class.liftEffect(Effect_Aff.monadEffectAff)(function __do() {
  31314. var state = Effect_Ref["new"](PureTabs_Model.tabsToGlobalState(allTabs))();
  31315. initializeBackground(state)();
  31316. return Effect_Console.log("all listener initialized")();
  31317. });
  31318. });
  31319. return function __do() {
  31320. Effect_Console.log("starting background")();
  31321. return Effect_Aff.launchAff_(runMain)();
  31322. };
  31323. }();
  31324. module.exports = {
  31325. main: main,
  31326. initializeBackground: initializeBackground,
  31327. onTabCreated: onTabCreated,
  31328. onTabDeleted: onTabDeleted,
  31329. onConnect: onConnect,
  31330. onNewWindowId: onNewWindowId,
  31331. initWindowState: initWindowState,
  31332. manageSidebar: manageSidebar,
  31333. onDisconnect: onDisconnect
  31334. };
  31335. },{"../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","../Control.Bind/index.js":"../output/Control.Bind/index.js","../Data.Array/index.js":"../output/Data.Array/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.Aff/index.js":"../output/Effect.Aff/index.js","../Effect.Class/index.js":"../output/Effect.Class/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) {
  31336. var Background = require("../output/PureTabs.Background");
  31337. function main() {
  31338. Background.main();
  31339. }
  31340. main();
  31341. },{"../output/PureTabs.Background":"../output/PureTabs.Background/index.js"}],"../node_modules/parcel/src/builtins/hmr-runtime.js":[function(require,module,exports) {
  31342. var global = arguments[3];
  31343. var OVERLAY_ID = '__parcel__error__overlay__';
  31344. var OldModule = module.bundle.Module;
  31345. function Module(moduleName) {
  31346. OldModule.call(this, moduleName);
  31347. this.hot = {
  31348. data: module.bundle.hotData,
  31349. _acceptCallbacks: [],
  31350. _disposeCallbacks: [],
  31351. accept: function (fn) {
  31352. this._acceptCallbacks.push(fn || function () {});
  31353. },
  31354. dispose: function (fn) {
  31355. this._disposeCallbacks.push(fn);
  31356. }
  31357. };
  31358. module.bundle.hotData = null;
  31359. }
  31360. module.bundle.Module = Module;
  31361. var checkedAssets, assetsToAccept;
  31362. var parent = module.bundle.parent;
  31363. if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
  31364. var hostname = "" || location.hostname;
  31365. var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
  31366. var ws = new WebSocket(protocol + '://' + hostname + ':' + "33577" + '/');
  31367. ws.onmessage = function (event) {
  31368. checkedAssets = {};
  31369. assetsToAccept = [];
  31370. var data = JSON.parse(event.data);
  31371. if (data.type === 'update') {
  31372. var handled = false;
  31373. data.assets.forEach(function (asset) {
  31374. if (!asset.isNew) {
  31375. var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);
  31376. if (didAccept) {
  31377. handled = true;
  31378. }
  31379. }
  31380. }); // Enable HMR for CSS by default.
  31381. handled = handled || data.assets.every(function (asset) {
  31382. return asset.type === 'css' && asset.generated.js;
  31383. });
  31384. if (handled) {
  31385. console.clear();
  31386. data.assets.forEach(function (asset) {
  31387. hmrApply(global.parcelRequire, asset);
  31388. });
  31389. assetsToAccept.forEach(function (v) {
  31390. hmrAcceptRun(v[0], v[1]);
  31391. });
  31392. } else if (location.reload) {
  31393. // `location` global exists in a web worker context but lacks `.reload()` function.
  31394. location.reload();
  31395. }
  31396. }
  31397. if (data.type === 'reload') {
  31398. ws.close();
  31399. ws.onclose = function () {
  31400. location.reload();
  31401. };
  31402. }
  31403. if (data.type === 'error-resolved') {
  31404. console.log('[parcel] ✨ Error resolved');
  31405. removeErrorOverlay();
  31406. }
  31407. if (data.type === 'error') {
  31408. console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
  31409. removeErrorOverlay();
  31410. var overlay = createErrorOverlay(data);
  31411. document.body.appendChild(overlay);
  31412. }
  31413. };
  31414. }
  31415. function removeErrorOverlay() {
  31416. var overlay = document.getElementById(OVERLAY_ID);
  31417. if (overlay) {
  31418. overlay.remove();
  31419. }
  31420. }
  31421. function createErrorOverlay(data) {
  31422. var overlay = document.createElement('div');
  31423. overlay.id = OVERLAY_ID; // html encode message and stack trace
  31424. var message = document.createElement('div');
  31425. var stackTrace = document.createElement('pre');
  31426. message.innerText = data.error.message;
  31427. stackTrace.innerText = data.error.stack;
  31428. 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>';
  31429. return overlay;
  31430. }
  31431. function getParents(bundle, id) {
  31432. var modules = bundle.modules;
  31433. if (!modules) {
  31434. return [];
  31435. }
  31436. var parents = [];
  31437. var k, d, dep;
  31438. for (k in modules) {
  31439. for (d in modules[k][1]) {
  31440. dep = modules[k][1][d];
  31441. if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
  31442. parents.push(k);
  31443. }
  31444. }
  31445. }
  31446. if (bundle.parent) {
  31447. parents = parents.concat(getParents(bundle.parent, id));
  31448. }
  31449. return parents;
  31450. }
  31451. function hmrApply(bundle, asset) {
  31452. var modules = bundle.modules;
  31453. if (!modules) {
  31454. return;
  31455. }
  31456. if (modules[asset.id] || !bundle.parent) {
  31457. var fn = new Function('require', 'module', 'exports', asset.generated.js);
  31458. asset.isNew = !modules[asset.id];
  31459. modules[asset.id] = [fn, asset.deps];
  31460. } else if (bundle.parent) {
  31461. hmrApply(bundle.parent, asset);
  31462. }
  31463. }
  31464. function hmrAcceptCheck(bundle, id) {
  31465. var modules = bundle.modules;
  31466. if (!modules) {
  31467. return;
  31468. }
  31469. if (!modules[id] && bundle.parent) {
  31470. return hmrAcceptCheck(bundle.parent, id);
  31471. }
  31472. if (checkedAssets[id]) {
  31473. return;
  31474. }
  31475. checkedAssets[id] = true;
  31476. var cached = bundle.cache[id];
  31477. assetsToAccept.push([bundle, id]);
  31478. if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
  31479. return true;
  31480. }
  31481. return getParents(global.parcelRequire, id).some(function (id) {
  31482. return hmrAcceptCheck(global.parcelRequire, id);
  31483. });
  31484. }
  31485. function hmrAcceptRun(bundle, id) {
  31486. var cached = bundle.cache[id];
  31487. bundle.hotData = {};
  31488. if (cached) {
  31489. cached.hot.data = bundle.hotData;
  31490. }
  31491. if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
  31492. cached.hot._disposeCallbacks.forEach(function (cb) {
  31493. cb(bundle.hotData);
  31494. });
  31495. }
  31496. delete bundle.cache[id];
  31497. bundle(id);
  31498. cached = bundle.cache[id];
  31499. if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
  31500. cached.hot._acceptCallbacks.forEach(function (cb) {
  31501. cb();
  31502. });
  31503. return true;
  31504. }
  31505. }
  31506. },{}]},{},["../node_modules/parcel/src/builtins/hmr-runtime.js","background.js"], null)
  31507. //# sourceMappingURL=/background.js.map