squint-cljs 0.4.66 → 0.4.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +32 -32
- package/lib/cljs.pprint.js +69 -69
- package/lib/compiler.js +248 -247
- package/lib/compiler.node.js +30 -30
- package/lib/compiler.sci.js +1017 -1017
- package/lib/node.nrepl_server.js +6 -6
- package/lib/squint.core.umd.js +1 -1
- package/package.json +1 -1
- package/src/squint/core.js +2 -0
package/lib/node.nrepl_server.js
CHANGED
|
@@ -4,20 +4,20 @@ import "./node.js";
|
|
|
4
4
|
import "./compiler.node.js";
|
|
5
5
|
const shadow_esm_import = function(x) { return import(x) };
|
|
6
6
|
import*as esm_import$fs from"fs";import*as esm_import$net from"net";
|
|
7
|
-
var K9=function(a,b){a=a.indexOf(b);if(0>a)throw Error("out of input");return a},L9=function(a,b){if(a.length<b)throw Error("out of input");return a.slice(b)},M9=function(a,b){if(b>a.length)throw Error("out of input");return a.slice(0,b)},N9=function(a){return console.debug($APP.lp.g(" ",a))},zfa=function(a){return function(b,c){b=$APP.kf(b);var d=$APP.fe.g(b,$APP.
|
|
7
|
+
var K9=function(a,b){a=a.indexOf(b);if(0>a)throw Error("out of input");return a},L9=function(a,b){if(a.length<b)throw Error("out of input");return a.slice(b)},M9=function(a,b){if(b>a.length)throw Error("out of input");return a.slice(0,b)},N9=function(a){return console.debug($APP.lp.g(" ",a))},zfa=function(a){return function(b,c){b=$APP.kf(b);var d=$APP.fe.g(b,$APP.MF),e=$APP.fe.g(b,yfa);c=$APP.zi.j(c,"id",d);c=$APP.r(e)?$APP.zi.j(c,"session",e):c;return a.g?a.g(b,c):a.call(null,b,c)}},Bfa=function(){var a=
|
|
8
8
|
Afa;return function(b,c){b=$APP.Lm.j(b,O9,$APP.ri);return a.g?a.g(b,c):a.call(null,b,c)}},Dfa=function(){var a=Cfa();return function(b,c){N9($APP.F(["request",b]));return a.g?a.g(b,c):a.call(null,b,c)}},Efa=function(a){return function(b,c){N9($APP.F(["response",c]));return a.g?a.g(b,c):a.call(null,b,c)}},Cfa=function(){var a=Bfa();return function(b,c){return a.g?a.g(b,c):a.call(null,b,c)}},P9=function(a){return $APP.zi.j($APP.Yh(new $APP.J(null,3,5,$APP.N,["major","minor","incremental"],null),$APP.Bu.h(a.split("."))),
|
|
9
9
|
"version-string",a)},Ffa=function(a,b,c){if($APP.r(a))if(a=Q9.h?Q9.h(a):Q9.call(null,a),$APP.r(a)){b=$APP.kf(b);var d=$APP.fe.g(b,$APP.s9),e=$APP.fe.g(b,$APP.l9),f=$APP.fe.g(b,$APP.u9);b=$APP.Qa;var k=$APP.hi,l=$APP.T6;$APP.Qa=e;$APP.hi=f;$APP.T6=d;try{var m=new $APP.Fa;d=$APP.Ta;e=$APP.Ua;$APP.Ta=!0;$APP.Ua=function(g){return m.append(g)};try{a.h?a.h(c):a.call(null,c)}finally{$APP.Ua=e,$APP.Ta=d}return $APP.t.h(m)}finally{$APP.T6=l,$APP.hi=k,$APP.Qa=b}}else return N9($APP.F(["Pretty-Printing is only supported for cider.nrepl.pprint/pprint"])),
|
|
10
10
|
$APP.wu.l($APP.F([c]));else return $APP.wu.l($APP.F([c]))},Hfa=function(a){a:{var b=$APP.oq;$APP.oq=$APP.v(R9);try{var c=$APP.It(a,new $APP.n(null,5,[$APP.gp,$APP.fp,$APP.Us,Gfa,$APP.xt,!0,$APP.Ys,!0,$APP.gs,!0],null));break a}finally{$APP.oq=b}c=void 0}c=$APP.kf(c);a=$APP.fe.g(c,$APP.Ht);c=$APP.fe.g(c,$APP.S);a=$APP.Sj("(async function () {\n%s\n}) ()","%s",a);$APP.Jf(R9,c);return a},Nfa=function(a,b){var c=$APP.kf(a);$APP.fe.g(c,$APP.S);a=$APP.fe.g(c,Ifa);$APP.fe.g(c,$APP.Sk);$APP.fe.g(c,Jfa);$APP.fe.g(c,
|
|
11
|
-
Kfa);return Promise.resolve(a).then(Hfa).then(function(d){$APP.
|
|
11
|
+
Kfa);return Promise.resolve(a).then(Hfa).then(function(d){$APP.HF.l($APP.F(["About to eval:"]));$APP.HF.l($APP.F([d]));return eval(d)}).then(function(d){d=new $APP.n(null,2,["ns",$APP.t.h($APP.v(R9)),"value",Ffa(Lfa.h(c),Mfa.h(c),d)],null);return b.g?b.g(c,d):b.call(null,c,d)}).catch(function(d){console.error(d);var e=$APP.LF.h($APP.ij(d));e=$APP.r(e)?e:d.message;$APP.r(e)&&(e=new $APP.n(null,1,["err",[$APP.t.h(e),"\n"].join("")],null),b.g?b.g(c,e):b.call(null,c,e));d=new $APP.n(null,2,["ex",$APP.t.h(d),
|
|
12
12
|
"ns",$APP.t.h($APP.oq)],null);return b.g?b.g(c,d):b.call(null,c,d)}).finally(function(){var d=new $APP.n(null,2,["ns",$APP.t.h($APP.v(R9)),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(c,d):b.call(null,c,d)})},S9=function(a){a=$APP.kf(a);$APP.fe.g(a,$APP.S);return null},Afa=function(a,b){a=$APP.kf(a);var c=$APP.fe.g(a,O9),d=$APP.fe.g(T9,c);if($APP.r(d))return d.g?d.g(a,b):d.call(null,a,b);console.warn($APP.lp.g(" ",$APP.F(["Unhandled operation",c])));c=new $APP.n(null,1,
|
|
13
13
|
["status",new $APP.J(null,3,5,$APP.N,["error","unknown-op","done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},Ofa=function(a){return function(b,c){return a.write(U9(c))}},Pfa=function(a,b){N9($APP.F(["Connection accepted"]));b.setNoDelay(!0);var c=Dfa(),d=zfa(Efa(Ofa(b))),e=$APP.Oi.h(null);b.on("data",function(f){var k=$APP.v(e);if($APP.r(k)){f=[$APP.t.h(k),$APP.t.h(f)].join("");$APP.Jf(e,null);var l=f}else l=f;a:for(f=$APP.F([$APP.Cu,!0]),k=$APP.lg;;){var m=$APP.Gf.j(V9,l,f);l=$APP.C.j(m,
|
|
14
|
-
0,null);m=$APP.C.j(m,1,null);if(null==l){k=new $APP.J(null,2,5,$APP.N,[k,m],null);break a}k=$APP.Ee.g(k,l);l=m}f=$APP.C.j(k,0,null);k=$APP.C.j(k,1,null);$APP.
|
|
14
|
+
0,null);m=$APP.C.j(m,1,null);if(null==l){k=new $APP.J(null,2,5,$APP.N,[k,m],null);break a}k=$APP.Ee.g(k,l);l=m}f=$APP.C.j(k,0,null);k=$APP.C.j(k,1,null);$APP.fF(k)||$APP.Jf(e,k);f=$APP.x(f);k=null;for(var g=m=0;;)if(g<m)l=k.ba(null,g),c(l,d),g+=1;else if(f=$APP.x(f))k=f,$APP.Zd(k)?(f=$APP.uc(k),m=$APP.vc(k),k=f,l=$APP.xd(f),f=m,m=l):(l=$APP.y(k),c(l,d),f=$APP.z(k),k=null,m=0),g=0;else return null});return b.on("close",function(f){return $APP.r(f)?N9($APP.F(["Connection lost"])):N9($APP.F(["Connection closed"]))})},
|
|
15
15
|
Kfa=new $APP.I(null,"_line","_line",232847719),Mfa=new $APP.I("nrepl.middleware.print","options","nrepl.middleware.print/options",868480159),yfa=new $APP.I(null,"session","session",1008279103),Qfa=new $APP.I(null,"lookup","lookup",1225356838),Rfa=new $APP.I(null,"load-file","load-file",-424586670),Jfa=new $APP.I(null,"_load-file?","_load-file?",-1198848711),O9=new $APP.I(null,"op","op",-1882987955),Sfa=new $APP.I(null,"describe","describe",1369790582),Ifa=new $APP.I(null,"code","code",1586293142),
|
|
16
16
|
Tfa=new $APP.I(null,"eldoc","eldoc",-1321421900),Ufa=new $APP.I(null,"log_level","log_level",-1756736313),Lfa=new $APP.I("nrepl.middleware.print","print","nrepl.middleware.print/print",-1616742548),Vfa=new $APP.I(null,"clone","clone",711747572),Wfa=new $APP.I(null,"close","close",1835149582),Xfa=new $APP.I(null,"info","info",-317069002),Yfa=new $APP.I(null,"host","host",-1558485167),Zfa=new $APP.I(null,"complete","complete",-500388775);var W9=function W9(a,b){switch($APP.t.h(M9(a,1))){case "i":return a=L9(a,1),b=K9(a,"e"),new $APP.J(null,2,5,$APP.N,[parseInt(M9(a,b)),L9(a,b+1)],null);case "l":var d=a=L9(a,1);for(a=$APP.mc($APP.lg);;){if($APP.A.g($APP.t.h(M9(d,1)),"e"))return new $APP.J(null,2,5,$APP.N,[$APP.pc(a),L9(d,1)],null);var e=W9.g?W9.g(d,b):W9.call(null,d,b),f=$APP.C.j(e,0,null),k=$APP.C.j(e,1,null);e=k;a=$APP.gg.g(a,f);d=e}case "d":for(a=L9(a,1),f=$APP.kf(b),f=$APP.fe.g(f,$APP.Cu),d=a,e=$APP.mc($APP.hf);;){if($APP.A.g($APP.t.h(M9(d,
|
|
17
17
|
1)),"e"))return new $APP.J(null,2,5,$APP.N,[$APP.pc(e),L9(d,1)],null);a=W9.g?W9.g(d,b):W9.call(null,d,b);d=$APP.C.j(a,0,null);k=$APP.C.j(a,1,null);k=W9.g?W9.g(k,b):W9.call(null,k,b);a=$APP.C.j(k,0,null);k=$APP.C.j(k,1,null);d=$APP.r(f)?$APP.ri.h(d):d;a=$APP.Ug.j(e,d,a);d=k;e=a}default:return b=K9(a,":"),f=parseInt(M9(a,b)),a=L9(a,b+1),new $APP.J(null,2,5,$APP.N,[$APP.t.h(M9(a,f)),L9(a,f)],null)}},V9=function V9(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return V9.l(arguments[0],
|
|
18
18
|
1<c.length?new $APP.Zc(c.slice(1),0,null):null)};V9.l=function(a,b){try{return W9(a,b)}catch(c){if(c instanceof Error)return new $APP.J(null,2,5,$APP.N,[null,a],null);throw c;}};V9.m=1;V9.o=function(a){var b=$APP.y(a);a=$APP.z(a);return this.l(b,a)};
|
|
19
19
|
var U9=function U9(a){for(;;){if("string"===typeof a)return[$APP.t.h(Buffer.from(a).length),":",a].join("");if(a instanceof $APP.I||a instanceof $APP.w)a=[function(){var c=$APP.Oe(a);return $APP.r(c)?[c,"/"].join(""):null}(),$APP.Xh(a)].join("");else return"number"===typeof a?["i",$APP.t.h(a),"e"].join(""):$APP.Td(a)||$APP.Yd(a)||null==a?["l",$APP.t.h($APP.Gf.g($APP.t,$APP.qi.g(U9,a))),"e"].join(""):$APP.Vd(a)?["d",$APP.t.h($APP.Gf.g($APP.t,$APP.qi.g(function(){return function(c){var d=$APP.C.j(c,
|
|
20
|
-
0,null);c=$APP.C.j(c,1,null);return[$APP.t.h(U9.h?U9.h(d):U9.call(null,d)),$APP.t.h(U9.h?U9.h(c):U9.call(null,c))].join("")}}(a),$APP.
|
|
21
|
-
var Gfa=$APP.Oi.h($APP.hf),T9=$APP.vh([Qfa,Wfa,Rfa,Tfa,Vfa,Sfa,Xfa,Zfa,$APP.
|
|
22
|
-
2,["nbb-nrepl",P9("TODO"),"node",P9(process.version)],null),"aux",$APP.hf,"ops",$APP.Yh($APP.qi.g($APP.Xh,$APP.Mh(T9)),$APP.cu.h($APP.hf)),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},S9,function(){return null},function(a,b){a=$APP.kf(a);var c=$APP.fe.g(a,$APP.S);$APP.
|
|
20
|
+
0,null);c=$APP.C.j(c,1,null);return[$APP.t.h(U9.h?U9.h(d):U9.call(null,d)),$APP.t.h(U9.h?U9.h(c):U9.call(null,c))].join("")}}(a),$APP.FF.g($APP.y,a)))),"e"].join(""):null}};var R9=$APP.Oi.h($APP.oq),Q9=new $APP.n(null,1,["cider.nrepl.pprint/pprint",$APP.B9],null);$APP.Oi.h(!1);
|
|
21
|
+
var Gfa=$APP.Oi.h($APP.hf),T9=$APP.vh([Qfa,Wfa,Rfa,Tfa,Vfa,Sfa,Xfa,Zfa,$APP.NF],[S9,function(a,b){var c=new $APP.n(null,1,["status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},function(a){a=$APP.kf(a);$APP.fe.g(a,$APP.Sk);return null},S9,function(a,b){var c=new $APP.n(null,2,["new-session",$APP.t.h($APP.cF()),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},function(a,b){var c=new $APP.n(null,4,["versions",new $APP.n(null,
|
|
22
|
+
2,["nbb-nrepl",P9("TODO"),"node",P9(process.version)],null),"aux",$APP.hf,"ops",$APP.Yh($APP.qi.g($APP.Xh,$APP.Mh(T9)),$APP.cu.h($APP.hf)),"status",new $APP.J(null,1,5,$APP.N,["done"],null)],null);return b.g?b.g(a,c):b.call(null,a,c)},S9,function(){return null},function(a,b){a=$APP.kf(a);var c=$APP.fe.g(a,$APP.S);$APP.GF.l($APP.F([$APP.S,c]));return Nfa($APP.zi.j(a,$APP.S,$APP.v(R9)),b)}]),$fa=$APP.Oi.h(null);export const startServer=function(a){return Promise.resolve(null).then(function(){var b=function(){var e=$APP.JF.h(a);return $APP.r(e)?e:0}(),c=function(){var e=Yfa.h(a);return $APP.r(e)?e:"127.0.0.1"}();(function(){var e=$APP.$a(a)?a.bg:Ufa.h(a);return $APP.r(e)?e:"info"})();var d=esm_import$net.createServer($APP.Lk.g(Pfa,$APP.hf));d.listen(b,c,function(){var e=d.address(),f=e.port;e=e.address;$APP.HF.l($APP.F([["nREPL server started on port ",$APP.t.h(f)," on host ",$APP.t.h(e)," - nrepl://",$APP.t.h(e),
|
|
23
23
|
":",$APP.t.h(f)].join("")]));try{return esm_import$fs.writeFileSync(".nrepl-port",$APP.t.h(f))}catch(k){return console.warn($APP.lp.g(" ",$APP.F(["Could not write .nrepl-port",k])))}});return $APP.Jf($fa,d)})};
|
package/lib/squint.core.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var squint;(squint||={}).core=(()=>{var z=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var De=Object.getOwnPropertyNames;var Ue=Object.prototype.hasOwnProperty;var Xe=(e,t)=>{for(var r in t)z(e,r,{get:t[r],enumerable:!0})},Ze=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of De(t))!Ue.call(e,o)&&o!==r&&z(e,o,{get:()=>t[o],enumerable:!(n=Je(t,o))||n.enumerable});return e};var He=e=>Ze(z({},"__esModule",{value:!0}),e);var hn={};Xe(hn,{Atom:()=>de,Cons:()=>pe,IIterable:()=>C,IIterable__iterator:()=>se,LazySeq:()=>dr,NaN_QMARK_:()=>Vr,PROTOCOL_SENTINEL:()=>Mt,_:()=>rt,_GT_:()=>et,_PLUS_:()=>tt,_iterator:()=>N,aclone:()=>Nr,add_watch:()=>Tr,alength:()=>Sr,apply:()=>kt,array_QMARK_:()=>ve,aset:()=>jr,assoc:()=>M,assoc_BANG_:()=>g,assoc_in:()=>te,assoc_in_BANG_:()=>it,atom:()=>Kt,boolean$:()=>Mr,boolean_QMARK_:()=>on,bounded_count:()=>un,butlast:()=>yr,coll_QMARK_:()=>Dr,comp:()=>ft,compare:()=>P,complement:()=>ge,concat:()=>Me,conj:()=>re,conj_BANG_:()=>O,cons:()=>_e,constantly:()=>Bt,contains_QMARK_:()=>oe,count:()=>S,counted_QMARK_:()=>We,cycle:()=>Zt,dec:()=>at,deref:()=>ye,disj:()=>ct,disj_BANG_:()=>ne,dissoc:()=>lt,dissoc_BANG_:()=>st,distinct:()=>Ht,doall:()=>Or,dorun:()=>Ir,drop:()=>$,drop_last:()=>wr,drop_while:()=>Ne,empty:()=>Qe,empty_QMARK_:()=>lr,es6_iterator:()=>T,even_QMARK_:()=>be,every_QMARK_:()=>ke,every_pred:()=>$r,ex_cause:()=>Hr,ex_data:()=>Xr,ex_info:()=>en,ex_message:()=>Zr,false_QMARK_:()=>gr,ffirst:()=>_t,filter:()=>V,filterv:()=>wt,find:()=>fn,first:()=>R,fn_QMARK_:()=>Fr,fnil:()=>U,frequencies:()=>hr,get:()=>d,get_in:()=>Te,group_by:()=>xr,identical_QMARK_:()=>Dt,identity:()=>Ee,inc:()=>ue,int_QMARK_:()=>Fe,integer_QMARK_:()=>tn,interleave:()=>Re,interpose:()=>zt,into:()=>Ie,into_array:()=>Pe,iterable:()=>f,iterate:()=>zr,js_keys:()=>Wr,js_obj:()=>Qr,juxt:()=>Yr,keep:()=>nr,keep_indexed:()=>bt,key:()=>Se,keys:()=>Ce,last:()=>xt,lazy:()=>l,list:()=>$t,list_QMARK_:()=>Lt,map:()=>E,map_QMARK_:()=>Lr,map_indexed:()=>At,mapcat:()=>Pt,mapv:()=>me,max:()=>$e,max_key:()=>ln,merge:()=>Vt,merge_with:()=>Wt,meta:()=>rn,min:()=>Br,min_key:()=>sn,mod:()=>cn,neg_QMARK_:()=>Rr,next:()=>qr,nil_QMARK_:()=>vt,not:()=>xe,not_any_QMARK_:()=>cr,not_every_QMARK_:()=>rr,nth:()=>fe,number_QMARK_:()=>qe,object_QMARK_:()=>ot,odd_QMARK_:()=>Gt,parse_long:()=>pn,partial:()=>Xt,partition:()=>Ct,partition_all:()=>qt,partition_by:()=>Ft,pos_QMARK_:()=>Kr,pr_str:()=>he,println:()=>ie,prn:()=>Rt,quot:()=>xn,rand_int:()=>Le,rand_nth:()=>ar,range:()=>St,re_find:()=>It,re_matches:()=>jt,re_seq:()=>Ye,reduce:()=>Q,reduce_kv:()=>Gr,reduced:()=>ht,reduced_QMARK_:()=>dt,regexp_QMARK_:()=>Ur,remove:()=>mt,remove_watch:()=>kr,repeat:()=>D,repeatedly:()=>_r,replace:()=>sr,reset_BANG_:()=>we,rest:()=>le,reverse:()=>or,satisfies_QMARK_:()=>nt,second:()=>pt,select_keys:()=>Yt,seq:()=>k,seqable_QMARK_:()=>ce,set:()=>Tt,shuffle:()=>fr,some:()=>Be,some_QMARK_:()=>vr,some_fn:()=>Pr,sort:()=>Ge,sort_by:()=>ir,split_at:()=>mr,split_with:()=>Ar,str:()=>gt,string_QMARK_:()=>Z,subs:()=>ze,subvec:()=>Ot,swap_BANG_:()=>Qt,system_time:()=>Jt,take:()=>L,take_nth:()=>Ut,take_while:()=>Oe,to_array:()=>Cr,transduce:()=>ee,true_QMARK_:()=>br,truth_:()=>A,update:()=>er,update_BANG_:()=>X,update_in:()=>tr,val:()=>je,vals:()=>Jr,vec:()=>G,vector:()=>W,vector_QMARK_:()=>Nt,warn_on_lazy_reusage_BANG_:()=>yt,with_meta:()=>nn,zero_QMARK_:()=>Er});function s(e){if(e==null||e instanceof Function)return e;let t=typeof e;return t==="string"?(r,n)=>d(r,e,n):t==="object"?(r,n)=>d(e,r,n):e}function et(e,t){return e>t}function tt(...e){return e.reduce((t,r)=>t+r,0)}function rt(...e){return e.length==1?0-e[0]:e.reduce((t,r)=>t-r)}function nt(e,t){return t[e]}function g(e,t,r,...n){if(n.length%2!==0)throw new Error("Illegal argument: assoc expects an odd number of arguments.");switch(p(e)){case _:e.set(t,r);for(let o=0;o<n.length;o+=2)e.set(n[o],n[o+1]);break;case h:case w:e[t]=r;for(let o=0;o<n.length;o+=2)e[n[o]]=n[o+1];break;default:throw new Error(`Illegal argument: assoc! expects a Map, Array, or Object as the first argument, but got ${typeof e}.`)}return e}function Y(e){switch(p(e)){case _:return new Map(e.entries());case h:return[...e];case w:return{...e};default:throw new Error(`Don't know how to copy object of type ${typeof e}.`)}}function M(e,t,r,...n){e||(e={});let o=Y(e);return g(o,t,r,...n),o}const _=1,h=2,w=3,v=4,m=5,j=6;function I(e){switch(e){case _:return new Map;case h:return[];case w:return{};case v:return new B;case m:return new Set;case j:return l(function*(){})}}function q(e){return e.constructor===Object}function ot(e){return e!=null&&q(e)}function p(e){if(e!=null){if(q(e))return w;if(e instanceof Map)return _;if(e instanceof Set)return m;if(e instanceof B)return v;if(Array.isArray(e))return h;if(e instanceof F)return j;if(e instanceof Object)return w}}function ut(e,t,r,n,o){let u=p(r);if(u!==_&&u!==h&&u!==w)throw new Error(`Illegal argument: ${t} expects the first argument to be a Map, Array, or Object.`);const i=[r];let c=r;for(let a=0;a<n.length-1;a+=1){let b=n[a],y;c instanceof Map?y=c.get(b):y=c[b],y||(y=I(u)),i.push(y),c=y}i.push(o);for(let a=i.length-2;a>=0;a-=1)i[a]=e(i[a],n[a],i[a+1]);return i[0]}function te(e,t,r){return ut(M,"assoc-in",e,t,r)}function it(e,t,r){var n=e;let o=p(e);for(const u of t.splice(0,t.length-1)){let i=d(n,u);i===void 0&&(i=I(o),g(n,u,i)),n=i}return g(n,t[t.length-1],r),e}function ft(...e){if(e=e.map(s),e.length===0)return Ee;if(e.length===1)return e[0];let[t,...r]=e.slice().reverse();return function(...n){let o=t(...n);for(const u of r)o=u(o);return o}}function O(...e){if(e.length===0)return W();let[t,...r]=e;switch(t==null&&(t=[]),p(t)){case m:for(const n of r)t.add(n);break;case v:t.unshift(...r.reverse());break;case h:t.push(...r);break;case _:for(const n of r)Array.isArray(n)?t.set(n[0],n[1]):f(n).forEach(o=>{t.set(o[0],o[1])});break;case w:for(const n of r)Array.isArray(n)?t[n[0]]=n[1]:Object.assign(t,n);break;default:throw new Error("Illegal argument: conj! expects a Set, Array, List, Map, or Object as the first argument.")}return t}function re(...e){if(e.length===0)return W();let[t,...r]=e;switch(t==null&&(t=[]),p(t)){case m:return new Set([...t,...r]);case v:return new B(...r.reverse(),...t);case h:return[...t,...r];case _:const n=new Map(t);for(const u of r)Array.isArray(u)?n.set(u[0],u[1]):f(u).forEach(i=>{n.set(i[0],i[1])});return n;case j:return l(function*(){yield*r,yield*t});case w:const o={...t};for(const u of r)Array.isArray(u)?o[u[0]]=u[1]:Object.assign(o,u);return o;default:throw new Error("Illegal argument: conj expects a Set, Array, List, Map, or Object as the first argument.")}}function ne(e,...t){for(const r of t)e.delete(r);return e}function ct(e,...t){let r=new Set([...e]);return ne(r,...t)}function oe(e,t){switch(p(e)){case m:case _:return e.has(t);case void 0:return!1;default:return t in e}}function st(e,...t){for(const r of t)delete e[r];return e}function lt(e,...t){let r={...e};for(const n of t)delete r[n];return r}function ue(e){return e+1}function at(e){return e-1}function ie(...e){console.log(...e)}function fe(e,t,r){if(e){var n=void 0;if(Array.isArray(e))n=e[t];else{let o=f(e),u=0;for(let i of o)if(u++==t){n=i;break}}if(n!==void 0)return n}return r}function d(e,t,r=void 0){if(e==null)return r;let n;if(q(e))return n=e[t],n===void 0?r:n;switch(p(e)){case m:e.has(t)&&(n=t);break;case _:n=e.get(t);break;case h:n=e[t];break;default:if(e.get instanceof Function)try{n=e.get(t);break}catch{}n=e[t];break}return n!==void 0?n:r}function ce(e){return typeof e=="string"||e===null||e===void 0||e instanceof Object&&Symbol.iterator in e}function f(e){if(e==null)return[];if(ce(e))return e;if(e instanceof Object)return Object.entries(e);throw new TypeError(`${e} is not iterable`)}const C=Symbol("Iterable"),se=Symbol.iterator;function N(e){return e[Symbol.iterator]()}const T=N;function k(e){if(e==null)return e;let t=f(e);return t.length===0||t.size===0||t[Symbol.iterator]().next().done?null:t}function R(e){let[t]=f(e);return t}function pt(e){let[t,r]=f(e);return r}function _t(e){return R(R(e))}function le(e){return l(function*(){let t=!0;for(const r of f(e))t?t=!1:yield r})}class K{value;constructor(t){this.value=t}_deref(){return this.value}}function xt(e){switch(e=f(e),p(e)){case h:return e[e.length-1];default:let t;for(const r of e)t=r;return t}}function ht(e){return new K(e)}function dt(e){return e instanceof K}function Q(e,t,r){e=s(e);let n,o;if(r===void 0){let u=f(t)[Symbol.iterator]();o=u.next().value,n=u}else o=t,n=f(r);if(o instanceof K)return o.value;for(const u of n)if(o=e(o,u),o instanceof K){o=o.value;break}return o}var ae=!1;function yt(){ae=!0}class F{constructor(t){this.gen=t,this.usages=0}[Symbol.iterator](){if(this.usages++,this.usages>=2&&ae)try{throw new Error}catch(t){console.warn("Re-use of lazy value",t.stack)}return this.gen()}}F.prototype[C]=!0;function l(e){return new F(e)}class pe{constructor(t,r){this.x=t,this.coll=r}*[Symbol.iterator](){yield this.x,yield*f(this.coll)}}function _e(e,t){return new pe(e,t)}function E(e,...t){switch(e=s(e),t.length){case 0:return r=>(...n)=>{switch(n.length){case 0:return r();case 1:return r(n[0]);case 2:return r(n[0],e(n[1]));default:return r(n[0],e(...n.slice(1)))}};case 1:return l(function*(){for(const r of f(t[0]))yield e(r)});default:return l(function*(){const r=t.map(n=>T(f(n)));for(;;){let n=[];for(const o of r){const u=o.next();if(u.done)return;n.push(u.value)}yield e(...n)}})}}function V(e,t){return e=s(e),l(function*(){for(const r of f(t))A(e(r))&&(yield r)})}function wt(e,t){return[...V(e,t)]}function mt(e,t){return V(ge(e),t)}function At(e,t){e=s(e);let r=[],n=0;for(const o of f(t))r.push(e(n,o)),n++;return r}function bt(e,t){e=s(e);let r=[],n=0;for(const o of f(t)){let u=e(n,o);A(u)&&r.push(u),n++}return r}function gt(...e){return e.join("")}function xe(e){return!e}function vt(e){return e==null}const Mt={};function Et(e){return e===null?"null":JSON.stringify(e,(t,r)=>{switch(p(r)){case m:case j:return[...r];case _:return Object.fromEntries(r);default:return r}})}function he(...e){return e.map(Et).join(" ")}function Rt(...e){ie(he(...e))}function de(e){this.val=e,this._watches={},this._deref=()=>this.val,this._hasWatches=!1,this._reset_BANG_=t=>{let r=this.val;if(this.val=t,this._hasWatches)for(let n of Object.entries(this._watches)){let o=n[0],u=n[1];u(o,this,r,t)}return t},this._add_watch=(t,r)=>{this._watches[t]=r,this._hasWatches=!0},this._remove_watch=t=>{delete this._watches[t]}}function Kt(e){return new de(e)}function ye(e){return e._deref()}function we(e,t){e._reset_BANG_(t)}function Qt(e,t,...r){t=s(t);const n=t(ye(e),...r);return we(e,n),n}function St(e,t,r){return l(function*(){let n=e,o=t,u=r;t===void 0&&(n=0,o=e);let i=n||0;for(u=r||1;o===void 0||i<o;)yield i,i+=u})}function jt(e,t){let r=e.exec(t);return r&&t===r[0]?r.length===1?r[0]:r:null}function It(e,t){if(Z(t)){let r=e.exec(t);return r!=null?r.length===1?r[0]:[...r]:null}else throw new TypeError("re-find must match against a string.")}function Ot(e,t,r){return e.slice(t,r)}function W(...e){return e}function Nt(e){return p(e)===h}function me(...e){return[...E(...e)]}function G(e){return ve(e)?e:[...f(e)]}function Tt(e){return new Set(f(e))}const Ae=Symbol("IApply__apply");function kt(e,...t){e=s(e);const r=t.slice(0,t.length-1),n=f(t[t.length-1]);let o=e[Ae];return o?o(...r,n):e(...r,...n)}function be(e){return e%2==0}function Gt(e){return!be(e)}function ge(e){return e=s(e),(...t)=>xe(e(...t))}function Bt(e){return(...t)=>e}class B extends Array{constructor(...t){super(),this.push(...t)}}function Lt(e){return p(e)===v}function $t(...e){return new B(...e)}function ve(e){return Array.isArray(e)}function J(e){return l(function*(){for(const t of e)yield*f(t)})}function Me(...e){return J(e)}Me[Ae]=e=>J(e);function Pt(e,...t){let r=E(e,...t);return J(r)}function Ee(e){return e}function Re(...e){return l(function*(){const t=e.map(r=>T(f(r)));for(;;){let r=[];for(const n of t){const o=n.next();if(o.done)return;r.push(o.value)}yield*r}})}function zt(e,t){return $(1,Re(D(e),t))}function Yt(e,t){const r=p(e),n=I(r)||{};for(const o of t){const u=d(e,o);u!=null&&g(n,o,u)}return n}function qt(e,...t){let r=e,n=t[0];return t.length===2&&([r,n]=t),Ke(e,r,[],n,!0)}function Ct(e,...t){let r=e,n=[],o=t[0];return t.length===2?[r,o]=t:t.length>2&&([r,n,o]=t),Ke(e,r,n,o,!1)}function Ke(e,t,r,n,o){return l(function*(){let u=[],i=0;for(let c of f(n))i<e&&(u.push(c),u.length===e&&(yield u,u=t<e?u.slice(t):[])),i++,i===t&&(i=0);u.length>0&&(u.length===e||o?yield u:r.length&&(u.push(...r.slice(0,e-u.length)),yield u))})}function Ft(e,t){return e=s(e),l(function*(){let r=T(t),n=r.next();n.done&&(yield*null);let o=n.value,u=e(o),i=[o],c=[];for(;;){let a=r.next();if(a.done){yield i;break}let b=a.value,y=e(b);u==y?i.push(b):(yield i,c.push(b),i=c,u=y,c=[])}})}function Qe(e){const t=p(e);if(t!=null)return I(t);throw new Error(`Can't create empty of ${typeof e}`)}function Vt(...e){const t=e[0];let r;return t==null?r={}:r=Ie(Qe(t),t),O(r,...e.slice(1))}function Se(e){return e[0]}function je(e){return e[1]}function Wt(e,...t){e=s(e);var r=!1;for(const n of t)if(n!=null){r=!0;break}if(r){let n=(u,i)=>{let c=Se(i),a=je(i);return oe(u,c)?M(u,c,e(d(u,c),a)):M(u,c,a)};return Q((u,i)=>Q(n,u||{},k(i)),t)}else return null}function Jt(){return performance.now()}function Ie(...e){switch(e.length){case 0:return[];case 1:return e[0];case 2:return re(e[0]??[],...f(e[1]));case 3:let t=e[0],r=e[1],n=e[2],o=Y(t);return ee(r,(i,c)=>c===void 0?i:O(i,c),o,n);default:throw TypeError(`Invalid arity call of into: ${e.length}`)}}function Dt(e,t){return e===t}function D(...e){if(e.length==0||e.length>2)throw new Error(`Invalid arity: ${e.length}`);return{[C]:!0,[se]:e.length==1?function*(){let t=e[0];for(;;)yield t}:function*(){let[t,r]=e;for(var n=0;n<t;n++)yield r}}}function L(e,t){return l(function*(){let r=e-1;for(const n of f(t))if(r-->=0&&(yield n),r<0)return})}function Oe(e,t){return e=s(e),l(function*(){for(const r of f(t))if(A(e(r)))yield r;else return})}function Ut(e,t){return e<=0?D(R(t)):l(function*(){let r=0;for(let n of f(t))r%e===0&&(yield n),r++})}function Xt(e,...t){return e=s(e),function(...r){return e(...t,...r)}}function Zt(e){return l(function*(){for(;;)yield*e})}function $(e,t){return l(function*(){let r=N(f(t));for(let n=0;n<e;n++)r.next();yield*r})}function Ne(e,t){return e=s(e),l(function*(){let r=N(f(t));for(;;){let n=r.next();if(n.done)break;let o=n.value;if(!A(e(o))){yield o;break}}yield*r})}function Ht(e){return l(function*(){let t=new Set;for(const r of f(e))t.has(r)||(yield r),t.add(r)})}function er(e,t,r,...n){return r=s(r),M(e,t,r(d(e,t),...n))}function Te(e,t,r){let n=e;for(const o of t)n=d(n,o);return n===void 0?r:n}function tr(e,t,r,...n){return r=s(r),te(e,t,r(Te(e,t),...n))}function U(e,t,...r){return e=s(e),function(n,...o){return n?e(n,...r,...o):e(t,...r,...o)}}function ke(e,t){e=s(e);for(let r of f(t))if(!e(r))return!1;return!0}function rr(e,t){return!ke(e,t)}function nr(e,t){return e=s(e),l(function*(){for(const r of f(t)){const n=e(r);A(n)&&(yield n)}})}function or(e){return e=f(e),[...e].reverse()}function Ge(e,t){return t===void 0&&(t=e,e=void 0),e=s(e),t=f(t),[...t].sort(e||P)}function ur(e){return e===P?e:(t,r)=>{let n=e(t,r);return qe(n)?n:n?-1:e(r,t)?1:0}}function ir(e,t,r){return r===void 0&&(r=t,t=P),e=s(e),t=s(t),Ge((n,o)=>{let u=ur(t),i=e(n),c=e(o);return u(i,c)},r)}function fr(e){return[...e].sort(function(t,r){return Math.random()-.5})}function Be(e,t){e=s(e);for(const r of f(t)){const n=e(r);if(A(n))return n}}function cr(e,t){return e=s(e),!Be(e,t)}function sr(e,t){return(Array.isArray(t)?me:E)(n=>{const o=e[n];return o!==void 0?o:n},t)}function lr(e){return!k(e)}function Le(e){return Math.floor(Math.random()*e)}function ar(e){let t=Le(S(e));return fe(e,t)}function pr(e){return l(function*(){for(;;)yield e()})}function _r(e,t){t===void 0&&(t=e,e=void 0);const r=pr(t);return e?L(e,r):r}function X(e,t,r,...n){const o=d(e,t);return g(e,t,r(o,...n))}function xr(e,t){const r={};for(const n of f(t)){const o=e(n);X(r,o,U(O,[]),n)}return r}function hr(e){const t={},r=U(ue,0);for(const n of f(e))X(t,n,r);return t}class dr{constructor(t){this.f=t,this.res=void 0}*[Symbol.iterator](){this.res===void 0&&(this.res=this.f(),this.f=null),yield*f(this.res)}}function yr(e){let t=[...f(e)];return t.pop(),t.length>0?t:null}function wr(...e){let[t,r]=e.length>1?e:[1,e[0]];return E((n,o)=>n,r,$(t,r))}function mr(e,t){return[L(e,t),$(e,t)]}function Ar(e,t){return[Oe(e,t),Ne(e,t)]}function S(e){if(!e)return 0;const t=e.length||e.size;if(typeof t=="number")return t;let r=0;for(const n of f(e))r++;return r}function br(e){return e===!0}function gr(e){return e===!1}function vr(e){return e!=null}function Mr(e){return!!e}function Er(e){return e===0}function Rr(e){return e<0}function Kr(e){return e>0}function Qr(...e){var t=0;let r={};for(;!(t>=e.length);)r[e[t]]=e[t+1],t=t+2;return r}function Sr(e){return e.length}function jr(e,t,r,...n){if(n.length==0)return e[t]=r,r;{let o=[t,r,...n],u=o[o.length-1],i=e,c=0,a=o.length-2;for(;c<a;c++)i=i[o[c]];return i[o[c]]=u,r}}function Ir(e){for(const t of f(e));return null}function Or(e){return G(e)}function Nr(e){return[...e]}function Tr(e,t,r){return e._add_watch(t,r)}function kr(e,t){return e._remove_watch(t)}function Gr(e,t,r){if(!r)return t;var n=t;for(let o of Object.entries(r))n=e(n,o[0],o[1]);return n}function $e(e,t,...r){return t==null?e:Math.max(e,t,...r)}function Br(e,t,...r){return t==null?e:Math.min(e,t,...r)}function Lr(e){return e instanceof Object}function $r(...e){return(...t)=>{for(let r of e)for(let n of t)if(!r(n))return!1;return!0}}function Pr(...e){return(...t)=>{for(let r of e)for(let n of t){let o=r(n);if(o)return o}}}function Pe(e,t){return G(t||e)}function zr(e,t){var r=t;return l(function*(){for(;;)yield r,r=e(r)})}function Yr(...e){return e=e.map(s),(...t)=>{let r=[];for(let n of e)r.push(n(...t));return r}}function qr(e){if(Array.isArray(e)){let t=e.slice(1);return t.length>0?t:null}else return k(le(e))}function P(e,t){if(e===t)return 0;{if(e==null)return-1;if(t==null)return 1;let r=typeof e,n=typeof t;if(r==="number"&&n==="number"||r==="string"&&n==="string")return e===t?0:e<t?-1:1;throw new Error(`comparing ${r} to ${n}`)}}function Cr(e){return Pe(e)}function A(e){return e!=null&&e!==!1}function ze(e,t,r){return e.substring(t,r)}function Fr(e){return typeof e=="function"}function*Ye(e,t){let r=e.exec(t);if(r){let n=r[0],o=r.length===1?n:G(r);yield*_e(o,l(function*(){let u=r.index+$e(1,n.length);u<=t.length&&(yield*Ye(e,ze(t,u)))}))}}function Vr(e){return Number.isNaN(e)}function qe(e){return typeof e=="number"}function Ce(e){return e?Object.keys(e):null}function Wr(e){return Ce(e)}function Jr(e){return e?Object.values(e):null}function Z(e){return typeof e=="string"}function Dr(e){return p(e)!=null}function Ur(e){return e instanceof RegExp}class H extends Error{constructor(t,r,n){super(t),this._data=r,this._cause=n}}function Xr(e){return e instanceof H?e._data:null}function Zr(e){return e instanceof Error?e.message:null}function Hr(e){return e instanceof H?e._cause:null}function en(e,t,r){return new H(e,t,r)}function Fe(e){return Number.isInteger(e)}const tn=Fe,Ve=Symbol("meta");function rn(e){return e instanceof Object?e[Ve]:null}function nn(e,t){let r=Y(e);return r[Ve]=t,r}function on(e){return e===!0||e===!1}function We(e){switch(p(e)){case m:return!0}return!1}function un(e,t){return We(t)?S(t):S(L(e,t))}function fn(e,t){let r=d(e,t);if(r!==void 0)return[t,r]}function cn(e,t){return(e%t+t)%t}function sn(e,t,...r){if(r.length==0)return t;var n=e(t),o=t;return r.forEach(u=>{var i=e(u);i<=n&&(n=i,o=u)}),o}function ln(e,t,...r){if(r.length==0)return t;var n=e(t),o=t;return r.forEach(u=>{var i=e(u);i>=n&&(n=i,o=u)}),o}function an(e){throw new Error(`Expected string, got: ${typeof e}`)}function pn(e){if(Z(e)){if(/^[+-]?\d+$/.test(e)){let t=parseInt(e);if(Number.MIN_SAFE_INTEGER<=t<=Number.MAX_SAFE_INTEGER)return t}return null}return an(e)}function _n(e){return e>=0?Math.floor(e):Math.ceil(x)}function xn(e,t){let r=e%t;return _n((e-r)/t)}function ee(e,...t){switch(t.length){case 2:{let r=t[0],n=t[1];return ee(e,r,r(),n)}default:{let r=t[0],n=t[1],o=t[2];r=e(r);let u=Q(r,n,o);return r(u)}}}return He(hn);})();
|
|
1
|
+
var squint;(squint||={}).core=(()=>{var z=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var De=Object.getOwnPropertyNames;var Ue=Object.prototype.hasOwnProperty;var Xe=(e,t)=>{for(var r in t)z(e,r,{get:t[r],enumerable:!0})},Ze=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of De(t))!Ue.call(e,o)&&o!==r&&z(e,o,{get:()=>t[o],enumerable:!(n=Je(t,o))||n.enumerable});return e};var He=e=>Ze(z({},"__esModule",{value:!0}),e);var dn={};Xe(dn,{Atom:()=>de,Cons:()=>pe,IIterable:()=>C,IIterable__iterator:()=>se,LazySeq:()=>dr,NaN_QMARK_:()=>Wr,PROTOCOL_SENTINEL:()=>Mt,_:()=>rt,_GT_:()=>et,_PLUS_:()=>tt,_iterator:()=>N,aclone:()=>Nr,add_watch:()=>Tr,alength:()=>Sr,apply:()=>kt,array_QMARK_:()=>ve,aset:()=>jr,assoc:()=>M,assoc_BANG_:()=>g,assoc_in:()=>te,assoc_in_BANG_:()=>it,atom:()=>Kt,boolean$:()=>Mr,boolean_QMARK_:()=>un,bounded_count:()=>fn,butlast:()=>yr,coll_QMARK_:()=>Ur,comp:()=>ft,compare:()=>P,complement:()=>ge,concat:()=>Me,conj:()=>re,conj_BANG_:()=>O,cons:()=>_e,constantly:()=>Bt,contains_QMARK_:()=>oe,count:()=>S,counted_QMARK_:()=>We,cycle:()=>Zt,dec:()=>at,deref:()=>ye,disj:()=>ct,disj_BANG_:()=>ne,dissoc:()=>lt,dissoc_BANG_:()=>st,distinct:()=>Ht,doall:()=>Or,dorun:()=>Ir,drop:()=>$,drop_last:()=>wr,drop_while:()=>Ne,empty:()=>Qe,empty_QMARK_:()=>lr,es6_iterator:()=>T,even_QMARK_:()=>be,every_QMARK_:()=>ke,every_pred:()=>$r,ex_cause:()=>en,ex_data:()=>Zr,ex_info:()=>tn,ex_message:()=>Hr,false_QMARK_:()=>gr,ffirst:()=>_t,filter:()=>V,filterv:()=>wt,find:()=>cn,first:()=>R,fn_QMARK_:()=>Vr,fnil:()=>U,frequencies:()=>hr,get:()=>d,get_in:()=>Te,group_by:()=>xr,identical_QMARK_:()=>Dt,identity:()=>Ee,inc:()=>ue,int_QMARK_:()=>Fe,integer_QMARK_:()=>rn,interleave:()=>Re,interpose:()=>zt,into:()=>Ie,into_array:()=>Pe,iterable:()=>f,iterate:()=>zr,js_keys:()=>Jr,js_obj:()=>Qr,juxt:()=>Yr,keep:()=>nr,keep_indexed:()=>bt,key:()=>Se,keys:()=>Ce,last:()=>xt,lazy:()=>l,list:()=>$t,list_QMARK_:()=>Lt,map:()=>E,map_QMARK_:()=>Lr,map_indexed:()=>At,mapcat:()=>Pt,mapv:()=>me,max:()=>$e,max_key:()=>an,merge:()=>Vt,merge_with:()=>Wt,meta:()=>nn,min:()=>Br,min_key:()=>ln,mod:()=>sn,neg_QMARK_:()=>Rr,next:()=>qr,nil_QMARK_:()=>vt,not:()=>xe,not_any_QMARK_:()=>cr,not_every_QMARK_:()=>rr,nth:()=>fe,number_QMARK_:()=>qe,object_QMARK_:()=>ot,odd_QMARK_:()=>Gt,parse_long:()=>_n,partial:()=>Xt,partition:()=>Ct,partition_all:()=>qt,partition_by:()=>Ft,pos_QMARK_:()=>Kr,pr_str:()=>he,println:()=>ie,prn:()=>Rt,quot:()=>hn,rand_int:()=>Le,rand_nth:()=>ar,range:()=>St,re_find:()=>It,re_matches:()=>jt,re_seq:()=>Ye,reduce:()=>Q,reduce_kv:()=>Gr,reduced:()=>ht,reduced_QMARK_:()=>dt,regexp_QMARK_:()=>Xr,remove:()=>mt,remove_watch:()=>kr,repeat:()=>D,repeatedly:()=>_r,replace:()=>sr,reset_BANG_:()=>we,rest:()=>le,reverse:()=>or,satisfies_QMARK_:()=>nt,second:()=>pt,select_keys:()=>Yt,seq:()=>k,seqable_QMARK_:()=>ce,set:()=>Tt,shuffle:()=>fr,some:()=>Be,some_QMARK_:()=>vr,some_fn:()=>Pr,sort:()=>Ge,sort_by:()=>ir,split_at:()=>mr,split_with:()=>Ar,str:()=>gt,string_QMARK_:()=>Z,subs:()=>ze,subvec:()=>Ot,swap_BANG_:()=>Qt,system_time:()=>Jt,t:()=>Fr,take:()=>L,take_nth:()=>Ut,take_while:()=>Oe,to_array:()=>Cr,transduce:()=>ee,true_QMARK_:()=>br,truth_:()=>A,update:()=>er,update_BANG_:()=>X,update_in:()=>tr,val:()=>je,vals:()=>Dr,vec:()=>G,vector:()=>W,vector_QMARK_:()=>Nt,warn_on_lazy_reusage_BANG_:()=>yt,with_meta:()=>on,zero_QMARK_:()=>Er});function s(e){if(e==null||e instanceof Function)return e;let t=typeof e;return t==="string"?(r,n)=>d(r,e,n):t==="object"?(r,n)=>d(e,r,n):e}function et(e,t){return e>t}function tt(...e){return e.reduce((t,r)=>t+r,0)}function rt(...e){return e.length==1?0-e[0]:e.reduce((t,r)=>t-r)}function nt(e,t){return t[e]}function g(e,t,r,...n){if(n.length%2!==0)throw new Error("Illegal argument: assoc expects an odd number of arguments.");switch(p(e)){case _:e.set(t,r);for(let o=0;o<n.length;o+=2)e.set(n[o],n[o+1]);break;case h:case w:e[t]=r;for(let o=0;o<n.length;o+=2)e[n[o]]=n[o+1];break;default:throw new Error(`Illegal argument: assoc! expects a Map, Array, or Object as the first argument, but got ${typeof e}.`)}return e}function Y(e){switch(p(e)){case _:return new Map(e.entries());case h:return[...e];case w:return{...e};default:throw new Error(`Don't know how to copy object of type ${typeof e}.`)}}function M(e,t,r,...n){e||(e={});let o=Y(e);return g(o,t,r,...n),o}const _=1,h=2,w=3,v=4,m=5,j=6;function I(e){switch(e){case _:return new Map;case h:return[];case w:return{};case v:return new B;case m:return new Set;case j:return l(function*(){})}}function q(e){return e.constructor===Object}function ot(e){return e!=null&&q(e)}function p(e){if(e!=null){if(q(e))return w;if(e instanceof Map)return _;if(e instanceof Set)return m;if(e instanceof B)return v;if(Array.isArray(e))return h;if(e instanceof F)return j;if(e instanceof Object)return w}}function ut(e,t,r,n,o){let u=p(r);if(u!==_&&u!==h&&u!==w)throw new Error(`Illegal argument: ${t} expects the first argument to be a Map, Array, or Object.`);const i=[r];let c=r;for(let a=0;a<n.length-1;a+=1){let b=n[a],y;c instanceof Map?y=c.get(b):y=c[b],y||(y=I(u)),i.push(y),c=y}i.push(o);for(let a=i.length-2;a>=0;a-=1)i[a]=e(i[a],n[a],i[a+1]);return i[0]}function te(e,t,r){return ut(M,"assoc-in",e,t,r)}function it(e,t,r){var n=e;let o=p(e);for(const u of t.splice(0,t.length-1)){let i=d(n,u);i===void 0&&(i=I(o),g(n,u,i)),n=i}return g(n,t[t.length-1],r),e}function ft(...e){if(e=e.map(s),e.length===0)return Ee;if(e.length===1)return e[0];let[t,...r]=e.slice().reverse();return function(...n){let o=t(...n);for(const u of r)o=u(o);return o}}function O(...e){if(e.length===0)return W();let[t,...r]=e;switch(t==null&&(t=[]),p(t)){case m:for(const n of r)t.add(n);break;case v:t.unshift(...r.reverse());break;case h:t.push(...r);break;case _:for(const n of r)Array.isArray(n)?t.set(n[0],n[1]):f(n).forEach(o=>{t.set(o[0],o[1])});break;case w:for(const n of r)Array.isArray(n)?t[n[0]]=n[1]:Object.assign(t,n);break;default:throw new Error("Illegal argument: conj! expects a Set, Array, List, Map, or Object as the first argument.")}return t}function re(...e){if(e.length===0)return W();let[t,...r]=e;switch(t==null&&(t=[]),p(t)){case m:return new Set([...t,...r]);case v:return new B(...r.reverse(),...t);case h:return[...t,...r];case _:const n=new Map(t);for(const u of r)Array.isArray(u)?n.set(u[0],u[1]):f(u).forEach(i=>{n.set(i[0],i[1])});return n;case j:return l(function*(){yield*r,yield*t});case w:const o={...t};for(const u of r)Array.isArray(u)?o[u[0]]=u[1]:Object.assign(o,u);return o;default:throw new Error("Illegal argument: conj expects a Set, Array, List, Map, or Object as the first argument.")}}function ne(e,...t){for(const r of t)e.delete(r);return e}function ct(e,...t){let r=new Set([...e]);return ne(r,...t)}function oe(e,t){switch(p(e)){case m:case _:return e.has(t);case void 0:return!1;default:return t in e}}function st(e,...t){for(const r of t)delete e[r];return e}function lt(e,...t){let r={...e};for(const n of t)delete r[n];return r}function ue(e){return e+1}function at(e){return e-1}function ie(...e){console.log(...e)}function fe(e,t,r){if(e){var n=void 0;if(Array.isArray(e))n=e[t];else{let o=f(e),u=0;for(let i of o)if(u++==t){n=i;break}}if(n!==void 0)return n}return r}function d(e,t,r=void 0){if(e==null)return r;let n;if(q(e))return n=e[t],n===void 0?r:n;switch(p(e)){case m:e.has(t)&&(n=t);break;case _:n=e.get(t);break;case h:n=e[t];break;default:if(e.get instanceof Function)try{n=e.get(t);break}catch{}n=e[t];break}return n!==void 0?n:r}function ce(e){return typeof e=="string"||e===null||e===void 0||e instanceof Object&&Symbol.iterator in e}function f(e){if(e==null)return[];if(ce(e))return e;if(e instanceof Object)return Object.entries(e);throw new TypeError(`${e} is not iterable`)}const C=Symbol("Iterable"),se=Symbol.iterator;function N(e){return e[Symbol.iterator]()}const T=N;function k(e){if(e==null)return e;let t=f(e);return t.length===0||t.size===0||t[Symbol.iterator]().next().done?null:t}function R(e){let[t]=f(e);return t}function pt(e){let[t,r]=f(e);return r}function _t(e){return R(R(e))}function le(e){return l(function*(){let t=!0;for(const r of f(e))t?t=!1:yield r})}class K{value;constructor(t){this.value=t}_deref(){return this.value}}function xt(e){switch(e=f(e),p(e)){case h:return e[e.length-1];default:let t;for(const r of e)t=r;return t}}function ht(e){return new K(e)}function dt(e){return e instanceof K}function Q(e,t,r){e=s(e);let n,o;if(r===void 0){let u=f(t)[Symbol.iterator]();o=u.next().value,n=u}else o=t,n=f(r);if(o instanceof K)return o.value;for(const u of n)if(o=e(o,u),o instanceof K){o=o.value;break}return o}var ae=!1;function yt(){ae=!0}class F{constructor(t){this.gen=t,this.usages=0}[Symbol.iterator](){if(this.usages++,this.usages>=2&&ae)try{throw new Error}catch(t){console.warn("Re-use of lazy value",t.stack)}return this.gen()}}F.prototype[C]=!0;function l(e){return new F(e)}class pe{constructor(t,r){this.x=t,this.coll=r}*[Symbol.iterator](){yield this.x,yield*f(this.coll)}}function _e(e,t){return new pe(e,t)}function E(e,...t){switch(e=s(e),t.length){case 0:return r=>(...n)=>{switch(n.length){case 0:return r();case 1:return r(n[0]);case 2:return r(n[0],e(n[1]));default:return r(n[0],e(...n.slice(1)))}};case 1:return l(function*(){for(const r of f(t[0]))yield e(r)});default:return l(function*(){const r=t.map(n=>T(f(n)));for(;;){let n=[];for(const o of r){const u=o.next();if(u.done)return;n.push(u.value)}yield e(...n)}})}}function V(e,t){return e=s(e),l(function*(){for(const r of f(t))A(e(r))&&(yield r)})}function wt(e,t){return[...V(e,t)]}function mt(e,t){return V(ge(e),t)}function At(e,t){e=s(e);let r=[],n=0;for(const o of f(t))r.push(e(n,o)),n++;return r}function bt(e,t){e=s(e);let r=[],n=0;for(const o of f(t)){let u=e(n,o);A(u)&&r.push(u),n++}return r}function gt(...e){return e.join("")}function xe(e){return!e}function vt(e){return e==null}const Mt={};function Et(e){return e===null?"null":JSON.stringify(e,(t,r)=>{switch(p(r)){case m:case j:return[...r];case _:return Object.fromEntries(r);default:return r}})}function he(...e){return e.map(Et).join(" ")}function Rt(...e){ie(he(...e))}function de(e){this.val=e,this._watches={},this._deref=()=>this.val,this._hasWatches=!1,this._reset_BANG_=t=>{let r=this.val;if(this.val=t,this._hasWatches)for(let n of Object.entries(this._watches)){let o=n[0],u=n[1];u(o,this,r,t)}return t},this._add_watch=(t,r)=>{this._watches[t]=r,this._hasWatches=!0},this._remove_watch=t=>{delete this._watches[t]}}function Kt(e){return new de(e)}function ye(e){return e._deref()}function we(e,t){e._reset_BANG_(t)}function Qt(e,t,...r){t=s(t);const n=t(ye(e),...r);return we(e,n),n}function St(e,t,r){return l(function*(){let n=e,o=t,u=r;t===void 0&&(n=0,o=e);let i=n||0;for(u=r||1;o===void 0||i<o;)yield i,i+=u})}function jt(e,t){let r=e.exec(t);return r&&t===r[0]?r.length===1?r[0]:r:null}function It(e,t){if(Z(t)){let r=e.exec(t);return r!=null?r.length===1?r[0]:[...r]:null}else throw new TypeError("re-find must match against a string.")}function Ot(e,t,r){return e.slice(t,r)}function W(...e){return e}function Nt(e){return p(e)===h}function me(...e){return[...E(...e)]}function G(e){return ve(e)?e:[...f(e)]}function Tt(e){return new Set(f(e))}const Ae=Symbol("IApply__apply");function kt(e,...t){e=s(e);const r=t.slice(0,t.length-1),n=f(t[t.length-1]);let o=e[Ae];return o?o(...r,n):e(...r,...n)}function be(e){return e%2==0}function Gt(e){return!be(e)}function ge(e){return e=s(e),(...t)=>xe(e(...t))}function Bt(e){return(...t)=>e}class B extends Array{constructor(...t){super(),this.push(...t)}}function Lt(e){return p(e)===v}function $t(...e){return new B(...e)}function ve(e){return Array.isArray(e)}function J(e){return l(function*(){for(const t of e)yield*f(t)})}function Me(...e){return J(e)}Me[Ae]=e=>J(e);function Pt(e,...t){let r=E(e,...t);return J(r)}function Ee(e){return e}function Re(...e){return l(function*(){const t=e.map(r=>T(f(r)));for(;;){let r=[];for(const n of t){const o=n.next();if(o.done)return;r.push(o.value)}yield*r}})}function zt(e,t){return $(1,Re(D(e),t))}function Yt(e,t){const r=p(e),n=I(r)||{};for(const o of t){const u=d(e,o);u!=null&&g(n,o,u)}return n}function qt(e,...t){let r=e,n=t[0];return t.length===2&&([r,n]=t),Ke(e,r,[],n,!0)}function Ct(e,...t){let r=e,n=[],o=t[0];return t.length===2?[r,o]=t:t.length>2&&([r,n,o]=t),Ke(e,r,n,o,!1)}function Ke(e,t,r,n,o){return l(function*(){let u=[],i=0;for(let c of f(n))i<e&&(u.push(c),u.length===e&&(yield u,u=t<e?u.slice(t):[])),i++,i===t&&(i=0);u.length>0&&(u.length===e||o?yield u:r.length&&(u.push(...r.slice(0,e-u.length)),yield u))})}function Ft(e,t){return e=s(e),l(function*(){let r=T(t),n=r.next();n.done&&(yield*null);let o=n.value,u=e(o),i=[o],c=[];for(;;){let a=r.next();if(a.done){yield i;break}let b=a.value,y=e(b);u==y?i.push(b):(yield i,c.push(b),i=c,u=y,c=[])}})}function Qe(e){const t=p(e);if(t!=null)return I(t);throw new Error(`Can't create empty of ${typeof e}`)}function Vt(...e){const t=e[0];let r;return t==null?r={}:r=Ie(Qe(t),t),O(r,...e.slice(1))}function Se(e){return e[0]}function je(e){return e[1]}function Wt(e,...t){e=s(e);var r=!1;for(const n of t)if(n!=null){r=!0;break}if(r){let n=(u,i)=>{let c=Se(i),a=je(i);return oe(u,c)?M(u,c,e(d(u,c),a)):M(u,c,a)};return Q((u,i)=>Q(n,u||{},k(i)),t)}else return null}function Jt(){return performance.now()}function Ie(...e){switch(e.length){case 0:return[];case 1:return e[0];case 2:return re(e[0]??[],...f(e[1]));case 3:let t=e[0],r=e[1],n=e[2],o=Y(t);return ee(r,(i,c)=>c===void 0?i:O(i,c),o,n);default:throw TypeError(`Invalid arity call of into: ${e.length}`)}}function Dt(e,t){return e===t}function D(...e){if(e.length==0||e.length>2)throw new Error(`Invalid arity: ${e.length}`);return{[C]:!0,[se]:e.length==1?function*(){let t=e[0];for(;;)yield t}:function*(){let[t,r]=e;for(var n=0;n<t;n++)yield r}}}function L(e,t){return l(function*(){let r=e-1;for(const n of f(t))if(r-->=0&&(yield n),r<0)return})}function Oe(e,t){return e=s(e),l(function*(){for(const r of f(t))if(A(e(r)))yield r;else return})}function Ut(e,t){return e<=0?D(R(t)):l(function*(){let r=0;for(let n of f(t))r%e===0&&(yield n),r++})}function Xt(e,...t){return e=s(e),function(...r){return e(...t,...r)}}function Zt(e){return l(function*(){for(;;)yield*e})}function $(e,t){return l(function*(){let r=N(f(t));for(let n=0;n<e;n++)r.next();yield*r})}function Ne(e,t){return e=s(e),l(function*(){let r=N(f(t));for(;;){let n=r.next();if(n.done)break;let o=n.value;if(!A(e(o))){yield o;break}}yield*r})}function Ht(e){return l(function*(){let t=new Set;for(const r of f(e))t.has(r)||(yield r),t.add(r)})}function er(e,t,r,...n){return r=s(r),M(e,t,r(d(e,t),...n))}function Te(e,t,r){let n=e;for(const o of t)n=d(n,o);return n===void 0?r:n}function tr(e,t,r,...n){return r=s(r),te(e,t,r(Te(e,t),...n))}function U(e,t,...r){return e=s(e),function(n,...o){return n?e(n,...r,...o):e(t,...r,...o)}}function ke(e,t){e=s(e);for(let r of f(t))if(!e(r))return!1;return!0}function rr(e,t){return!ke(e,t)}function nr(e,t){return e=s(e),l(function*(){for(const r of f(t)){const n=e(r);A(n)&&(yield n)}})}function or(e){return e=f(e),[...e].reverse()}function Ge(e,t){return t===void 0&&(t=e,e=void 0),e=s(e),t=f(t),[...t].sort(e||P)}function ur(e){return e===P?e:(t,r)=>{let n=e(t,r);return qe(n)?n:n?-1:e(r,t)?1:0}}function ir(e,t,r){return r===void 0&&(r=t,t=P),e=s(e),t=s(t),Ge((n,o)=>{let u=ur(t),i=e(n),c=e(o);return u(i,c)},r)}function fr(e){return[...e].sort(function(t,r){return Math.random()-.5})}function Be(e,t){e=s(e);for(const r of f(t)){const n=e(r);if(A(n))return n}}function cr(e,t){return e=s(e),!Be(e,t)}function sr(e,t){return(Array.isArray(t)?me:E)(n=>{const o=e[n];return o!==void 0?o:n},t)}function lr(e){return!k(e)}function Le(e){return Math.floor(Math.random()*e)}function ar(e){let t=Le(S(e));return fe(e,t)}function pr(e){return l(function*(){for(;;)yield e()})}function _r(e,t){t===void 0&&(t=e,e=void 0);const r=pr(t);return e?L(e,r):r}function X(e,t,r,...n){const o=d(e,t);return g(e,t,r(o,...n))}function xr(e,t){const r={};for(const n of f(t)){const o=e(n);X(r,o,U(O,[]),n)}return r}function hr(e){const t={},r=U(ue,0);for(const n of f(e))X(t,n,r);return t}class dr{constructor(t){this.f=t,this.res=void 0}*[Symbol.iterator](){this.res===void 0&&(this.res=this.f(),this.f=null),yield*f(this.res)}}function yr(e){let t=[...f(e)];return t.pop(),t.length>0?t:null}function wr(...e){let[t,r]=e.length>1?e:[1,e[0]];return E((n,o)=>n,r,$(t,r))}function mr(e,t){return[L(e,t),$(e,t)]}function Ar(e,t){return[Oe(e,t),Ne(e,t)]}function S(e){if(!e)return 0;const t=e.length||e.size;if(typeof t=="number")return t;let r=0;for(const n of f(e))r++;return r}function br(e){return e===!0}function gr(e){return e===!1}function vr(e){return e!=null}function Mr(e){return!!e}function Er(e){return e===0}function Rr(e){return e<0}function Kr(e){return e>0}function Qr(...e){var t=0;let r={};for(;!(t>=e.length);)r[e[t]]=e[t+1],t=t+2;return r}function Sr(e){return e.length}function jr(e,t,r,...n){if(n.length==0)return e[t]=r,r;{let o=[t,r,...n],u=o[o.length-1],i=e,c=0,a=o.length-2;for(;c<a;c++)i=i[o[c]];return i[o[c]]=u,r}}function Ir(e){for(const t of f(e));return null}function Or(e){return G(e)}function Nr(e){return[...e]}function Tr(e,t,r){return e._add_watch(t,r)}function kr(e,t){return e._remove_watch(t)}function Gr(e,t,r){if(!r)return t;var n=t;for(let o of Object.entries(r))n=e(n,o[0],o[1]);return n}function $e(e,t,...r){return t==null?e:Math.max(e,t,...r)}function Br(e,t,...r){return t==null?e:Math.min(e,t,...r)}function Lr(e){return e instanceof Object}function $r(...e){return(...t)=>{for(let r of e)for(let n of t)if(!r(n))return!1;return!0}}function Pr(...e){return(...t)=>{for(let r of e)for(let n of t){let o=r(n);if(o)return o}}}function Pe(e,t){return G(t||e)}function zr(e,t){var r=t;return l(function*(){for(;;)yield r,r=e(r)})}function Yr(...e){return e=e.map(s),(...t)=>{let r=[];for(let n of e)r.push(n(...t));return r}}function qr(e){if(Array.isArray(e)){let t=e.slice(1);return t.length>0?t:null}else return k(le(e))}function P(e,t){if(e===t)return 0;{if(e==null)return-1;if(t==null)return 1;let r=typeof e,n=typeof t;if(r==="number"&&n==="number"||r==="string"&&n==="string")return e===t?0:e<t?-1:1;throw new Error(`comparing ${r} to ${n}`)}}function Cr(e){return Pe(e)}function A(e){return e!=null&&e!==!1}const Fr=A;function ze(e,t,r){return e.substring(t,r)}function Vr(e){return typeof e=="function"}function*Ye(e,t){let r=e.exec(t);if(r){let n=r[0],o=r.length===1?n:G(r);yield*_e(o,l(function*(){let u=r.index+$e(1,n.length);u<=t.length&&(yield*Ye(e,ze(t,u)))}))}}function Wr(e){return Number.isNaN(e)}function qe(e){return typeof e=="number"}function Ce(e){return e?Object.keys(e):null}function Jr(e){return Ce(e)}function Dr(e){return e?Object.values(e):null}function Z(e){return typeof e=="string"}function Ur(e){return p(e)!=null}function Xr(e){return e instanceof RegExp}class H extends Error{constructor(t,r,n){super(t),this._data=r,this._cause=n}}function Zr(e){return e instanceof H?e._data:null}function Hr(e){return e instanceof Error?e.message:null}function en(e){return e instanceof H?e._cause:null}function tn(e,t,r){return new H(e,t,r)}function Fe(e){return Number.isInteger(e)}const rn=Fe,Ve=Symbol("meta");function nn(e){return e instanceof Object?e[Ve]:null}function on(e,t){let r=Y(e);return r[Ve]=t,r}function un(e){return e===!0||e===!1}function We(e){switch(p(e)){case m:return!0}return!1}function fn(e,t){return We(t)?S(t):S(L(e,t))}function cn(e,t){let r=d(e,t);if(r!==void 0)return[t,r]}function sn(e,t){return(e%t+t)%t}function ln(e,t,...r){if(r.length==0)return t;var n=e(t),o=t;return r.forEach(u=>{var i=e(u);i<=n&&(n=i,o=u)}),o}function an(e,t,...r){if(r.length==0)return t;var n=e(t),o=t;return r.forEach(u=>{var i=e(u);i>=n&&(n=i,o=u)}),o}function pn(e){throw new Error(`Expected string, got: ${typeof e}`)}function _n(e){if(Z(e)){if(/^[+-]?\d+$/.test(e)){let t=parseInt(e);if(Number.MIN_SAFE_INTEGER<=t<=Number.MAX_SAFE_INTEGER)return t}return null}return pn(e)}function xn(e){return e>=0?Math.floor(e):Math.ceil(x)}function hn(e,t){let r=e%t;return xn((e-r)/t)}function ee(e,...t){switch(t.length){case 2:{let r=t[0],n=t[1];return ee(e,r,r(),n)}default:{let r=t[0],n=t[1],o=t[2];r=e(r);let u=Q(r,n,o);return r(u)}}}return He(dn);})();
|
package/package.json
CHANGED
package/src/squint/core.js
CHANGED