1
0
mirror of https://github.com/osmarks/website synced 2024-11-08 20:29:55 +00:00
website/experiments/game-of-life/out.js
2020-03-08 17:13:14 +00:00

1 line
103 KiB
JavaScript

!function(O){var n={};function r(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return O[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}r.m=O,r.c=n,r.d=function(O,n,t){r.o(O,n)||Object.defineProperty(O,n,{enumerable:!0,get:t})},r.r=function(O){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(O,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(O,"__esModule",{value:!0})},r.t=function(O,n){if(1&n&&(O=r(O)),8&n)return O;if(4&n&&"object"==typeof O&&O&&O.__esModule)return O;var t=Object.create(null);if(r.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:O}),2&n&&"string"!=typeof O)for(var e in O)r.d(t,e,function(n){return O[n]}.bind(null,e));return t},r.n=function(O){var n=O&&O.__esModule?function(){return O.default}:function(){return O};return r.d(n,"a",n),n},r.o=function(O,n){return Object.prototype.hasOwnProperty.call(O,n)},r.p="",r(r.s=0)}([function(O,n,r){"use strict";r.r(n);var t=r(1),e=r.n(t);document.addEventListener("DOMContentLoaded",function(O){e.a.main(document.getElementById("app"))})},function(O,n,r){"use strict";var t=r(2),e=r(3),i=r(22),u=r(8),a=r(33),o=r(39),c=r(40),f=r(41),_=r(42);function l(O,n){var r=O[1],t=O[0];switch(n){case 0:return[t,r+1|0];case 1:return[t+1|0,r];case 2:return[t,r-1|0];case 3:return[t-1|0,r]}}function s(){return[[t.random_grid(20,20)],o.none]}function m(O,n){if("number"!=typeof n)return n.tag?[[t.Grid[9](1,l(t.Grid[10](O[0]),n[0]),O[0])],o.none]:[[t.Grid[6](t.invert_cell,[n[0],n[1]])(O[0])],o.none];switch(n){case 0:return[[t.step(O[0])],o.none];case 1:return[[f.random(0)],o.none];case 2:return[[t.random_grid(t.Grid[0](O[0]),t.Grid[1](O[0]))],o.none]}}function v(O,n,r){var t=_.onClick(u.__(0,[O,n]));return r?_.td(0,0,[_.class$prime("off"),[t,0]],0):_.td(0,0,[_.class$prime("on"),[t,0]],0)}function d(O){return _.table(0,0,0,e.map(function(O){return _.tr(0,0,0,O)},i.to_list(i.map(i.to_list,t.Grid[4](v)(O)))))}function g(O,n){return _.button(0,0,[_.onClick(O),0],[_.text(n),0])}function h(O){return _.div(0,0,0,[d(O[0]),[g(0,"Step"),[g(1,"Random Pattern"),[g(2,"Random Fill"),[g(u.__(1,[0]),"+W"),[g(u.__(1,[1]),"+H"),[g(u.__(1,[2]),"-W"),[g(u.__(1,[3]),"-H"),0]]]]]]]])}var p=[s,m,h,function(){return c.none}];n.toggleCell=function(O,n){return u.__(0,[O,n])},n.step=0,n.randomPattern=1,n.randomFill=2,n.dimensionChange=function(O){return u.__(1,[O])},n.new_dims=l,n.init=s,n.update=m,n.view_cell=v,n.view_grid=d,n.btn=g,n.view=h,n.main=function(O,n){return a.standardProgram(p,O,n)}},function(O,n,r){"use strict";var t=r(3),e=r(22),i=r(4),u=r(24),a=r(5),o=r(15);function c(O,n){return o.mod_(O+n|0,n)}function f(O,n){return a.caml_array_get(a.caml_array_get(O,c(n[0],O.length)),c(n[1],a.caml_array_get(O,0).length))}function _(O){return function(n){return e.mapi(function(n,r){return e.mapi(function(r,t){return i._3(O,n,r,t)},r)},n)}}function l(O){return function(n){return e.iteri(function(n){return function(r){return e.iteri(function(r,t){return i._3(O,n,r,t)},r)}},n)}}function s(O,n){return[O[0]+n[0]|0,O[1]+n[1]|0]}function m(O,n,r){return _(function(n,r,t){return i._2(O,n,r)})(e.make_matrix(n,r,0))}var v=[function(O){return O.length},function(O){return a.caml_array_get(O,0).length},f,function(O){return function(n){return e.map(function(n){return e.map(O,n)},n)}},_,l,function(O,n){var r=n[1],t=n[0];return _(function(n,e,u){return t===n&&r===e?i._1(O,u):u})},s,m,function(O,n,r){var t=n[1],i=n[0],u=e.make_matrix(i,t,O);return l(function(O,n,r){return O<i&&n<t?a.caml_array_set(a.caml_array_get(u,O),n,r):0})(r),u},function(O){return[O.length,a.caml_array_get(O,0).length]}];var d=[[0,1],[[1,0],[[1,1],[[0,-1],[[-1,0],[[-1,-1],[[1,-1],[[-1,1],0]]]]]]]];function g(O,n){return t.map(function(r){return f(O,s(r,n))},d)}function h(O,n){return t.length(t.filter(function(O){return 0===O})(g(O,n)))}function p(O,n){return O?3===n?0:1:2===n||3===n?0:1}n.wraparound=c,n.Grid=v,n.cell_of_bool=function(O){return O?0:1},n.invert_cell=function(O){return O?0:1},n.random_cell=function(){return u.bool(0)?0:1},n.neighbour_positions=d,n.neighbours=g,n.live_neighbours=h,n.step_cell=p,n.random_grid=function(O,n){return m(function(O,n){return u.bool(0)?0:1},O,n)},n.step=function(O){return _(function(n,r,t){return p(t,h(O,[n,r]))})(O)}},function(O,n,r){"use strict";var t=r(4),e=r(7),i=r(10),u=r(6);function a(O){for(var n=0,r=O;;){var t=r,e=n;if(!t)return e;r=t[1],n=e+1|0}}function o(O,n){for(;;){var r=n,t=O;if(!t)return r;n=[t[0],r],O=t[1]}}function c(O){return O?i.$at(O[0],c(O[1])):0}function f(O){return function(n){for(var r=0,e=n;;){var i=e,u=r;if(!i)return o(u,0);var a=i[1],c=i[0];t._1(O,c)?(e=a,r=[c,u]):e=a}}}function _(O,n){for(;;){var r=n,t=O;if(0===t)return r;if(!r)throw[u.assert_failure,["list.ml",223,11]];n=r[1],O=t-1|0}}function l(O,n){var r=function(n,r){var i=0;if(2!==n)if(3===n&&r){var u=r[1];if(u){var a=u[1];if(a){var c=a[0],f=u[0],l=r[0];return t._2(O,l,f)<=0?t._2(O,f,c)<=0?[l,[f,[c,0]]]:t._2(O,l,c)<=0?[l,[c,[f,0]]]:[c,[l,[f,0]]]:t._2(O,l,c)<=0?[f,[l,[c,0]]]:t._2(O,f,c)<=0?[f,[c,[l,0]]]:[c,[f,[l,0]]]}i=1}else i=1}else i=1;else if(r){var s=r[1];if(s){var m=s[0],v=r[0];return t._2(O,v,m)<=0?[v,[m,0]]:[m,[v,0]]}i=1}else i=1;if(1===i)for(var d=n>>1,g=n-d|0,h=_(d,r),p=e(d,r),y=e(g,h),X=0;;){var b=X,w=y,C=p;if(C){if(w){var A=w[0],x=C[0];if(t._2(O,x,A)>0){X=[x,b],p=C[1];continue}X=[A,b],y=w[1];continue}return o(C,b)}return o(w,b)}},e=function(n,e){var i=0;if(2!==n)if(3===n&&e){var u=e[1];if(u){var a=u[1];if(a){var c=a[0],f=u[0],l=e[0];return t._2(O,l,f)>0?t._2(O,f,c)>0?[l,[f,[c,0]]]:t._2(O,l,c)>0?[l,[c,[f,0]]]:[c,[l,[f,0]]]:t._2(O,l,c)>0?[f,[l,[c,0]]]:t._2(O,f,c)>0?[f,[c,[l,0]]]:[c,[f,[l,0]]]}i=1}else i=1}else i=1;else if(e){var s=e[1];if(s){var m=s[0],v=e[0];return t._2(O,v,m)>0?[v,[m,0]]:[m,[v,0]]}i=1}else i=1;if(1===i)for(var d=n>>1,g=n-d|0,h=_(d,e),p=r(d,e),y=r(g,h),X=0;;){var b=X,w=y,C=p;if(C){if(w){var A=w[0],x=C[0];if(t._2(O,x,A)<=0){X=[x,b],p=C[1];continue}X=[A,b],y=w[1];continue}return o(C,b)}return o(w,b)}},i=a(n);return i<2?n:r(i,n)}var s=i.$at,m=c,v=f,d=l,g=l;n.length=a,n.hd=function(O){if(O)return O[0];throw[u.failure,"hd"]},n.tl=function(O){if(O)return O[1];throw[u.failure,"tl"]},n.nth=function(O,n){if(n<0)throw[u.invalid_argument,"List.nth"];for(var r=O,t=n;;){var e=t,i=r;if(!i)throw[u.failure,"nth"];if(0===e)return i[0];t=e-1|0,r=i[1]}},n.rev=function(O){return o(O,0)},n.append=s,n.rev_append=o,n.concat=m,n.flatten=c,n.iter=function(O,n){for(;;){var r=n;if(!r)return 0;t._1(O,r[0]),n=r[1]}},n.iteri=function(O,n){for(var r=0,e=O,i=n;;){var u=i,a=r;if(!u)return 0;t._2(e,a,u[0]),i=u[1],r=a+1|0}},n.map=function O(n,r){return r?[t._1(n,r[0]),O(n,r[1])]:0},n.mapi=function(O,n){return function O(n,r,e){return e?[t._2(r,n,e[0]),O(n+1|0,r,e[1])]:0}(0,O,n)},n.rev_map=function(O,n){for(var r=0,e=n;;){var i=e,u=r;if(!i)return u;e=i[1],r=[t._1(O,i[0]),u]}},n.fold_left=function(O,n,r){for(;;){var e=r,i=n;if(!e)return i;r=e[1],n=t._2(O,i,e[0])}},n.fold_right=function O(n,r,e){return r?t._2(n,r[0],O(n,r[1],e)):e},n.iter2=function(O,n,r){for(;;){var e=r,i=n;if(i){if(e){t._2(O,i[0],e[0]),r=e[1],n=i[1];continue}throw[u.invalid_argument,"List.iter2"]}if(e)throw[u.invalid_argument,"List.iter2"];return 0}},n.map2=function O(n,r,e){if(r){if(e)return[t._2(n,r[0],e[0]),O(n,r[1],e[1])];throw[u.invalid_argument,"List.map2"]}if(e)throw[u.invalid_argument,"List.map2"];return 0},n.rev_map2=function(O,n,r){for(var e=0,i=n,a=r;;){var o=a,c=i,f=e;if(c){if(o){a=o[1],i=c[1],e=[t._2(O,c[0],o[0]),f];continue}throw[u.invalid_argument,"List.rev_map2"]}if(o)throw[u.invalid_argument,"List.rev_map2"];return f}},n.fold_left2=function(O,n,r,e){for(;;){var i=e,a=r,o=n;if(a){if(i){e=i[1],r=a[1],n=t._3(O,o,a[0],i[0]);continue}throw[u.invalid_argument,"List.fold_left2"]}if(i)throw[u.invalid_argument,"List.fold_left2"];return o}},n.fold_right2=function O(n,r,e,i){if(r){if(e)return t._3(n,r[0],e[0],O(n,r[1],e[1],i));throw[u.invalid_argument,"List.fold_right2"]}if(e)throw[u.invalid_argument,"List.fold_right2"];return i},n.for_all=function(O,n){for(;;){var r=n;if(r){if(t._1(O,r[0])){n=r[1];continue}return!1}return!0}},n.exists=function(O,n){for(;;){var r=n;if(!r)return!1;if(t._1(O,r[0]))return!0;n=r[1]}},n.for_all2=function(O,n,r){for(;;){var e=r,i=n;if(i){if(e){if(t._2(O,i[0],e[0])){r=e[1],n=i[1];continue}return!1}throw[u.invalid_argument,"List.for_all2"]}if(e)throw[u.invalid_argument,"List.for_all2"];return!0}},n.exists2=function(O,n,r){for(;;){var e=r,i=n;if(i){if(e){if(t._2(O,i[0],e[0]))return!0;r=e[1],n=i[1];continue}throw[u.invalid_argument,"List.exists2"]}if(e)throw[u.invalid_argument,"List.exists2"];return!1}},n.mem=function(O,n){for(;;){var r=n;if(!r)return!1;if(e.caml_equal(r[0],O))return!0;n=r[1]}},n.memq=function(O,n){for(;;){var r=n;if(!r)return!1;if(r[0]===O)return!0;n=r[1]}},n.find=function(O,n){for(;;){var r=n;if(!r)throw u.not_found;var e=r[0];if(t._1(O,e))return e;n=r[1]}},n.filter=v,n.find_all=f,n.partition=function(O,n){for(var r=0,e=0,i=n;;){var u=i,a=e,c=r;if(!u)return[o(c,0),o(a,0)];var f=u[1],_=u[0];t._1(O,_)?(i=f,r=[_,c]):(i=f,e=[_,a])}},n.assoc=function(O,n){for(;;){var r=n;if(!r)throw u.not_found;var t=r[0];if(e.caml_equal(t[0],O))return t[1];n=r[1]}},n.assq=function(O,n){for(;;){var r=n;if(!r)throw u.not_found;var t=r[0];if(t[0]===O)return t[1];n=r[1]}},n.mem_assoc=function(O,n){for(;;){var r=n;if(!r)return!1;if(e.caml_equal(r[0][0],O))return!0;n=r[1]}},n.mem_assq=function(O,n){for(;;){var r=n;if(!r)return!1;if(r[0][0]===O)return!0;n=r[1]}},n.remove_assoc=function O(n,r){if(r){var t=r[1],i=r[0];return e.caml_equal(i[0],n)?t:[i,O(n,t)]}return 0},n.remove_assq=function O(n,r){if(r){var t=r[1],e=r[0];return e[0]===n?t:[e,O(n,t)]}return 0},n.split=function O(n){if(n){var r=n[0],t=O(n[1]);return[[r[0],t[0]],[r[1],t[1]]]}return[0,0]},n.combine=function O(n,r){if(n){if(r)return[[n[0],r[0]],O(n[1],r[1])];throw[u.invalid_argument,"List.combine"]}if(r)throw[u.invalid_argument,"List.combine"];return 0},n.sort=d,n.stable_sort=l,n.fast_sort=g,n.sort_uniq=function(O,n){var r=function(n,r){var i=0;if(2!==n)if(3===n&&r){var u=r[1];if(u){var a=u[1];if(a){var c=a[0],f=u[0],l=r[0],s=t._2(O,l,f);if(0===s){var m=t._2(O,f,c);return 0===m?[f,0]:m<0?[f,[c,0]]:[c,[f,0]]}if(s<0){var v=t._2(O,f,c);if(0===v)return[l,[f,0]];if(v<0)return[l,[f,[c,0]]];var d=t._2(O,l,c);return 0===d?[l,[f,0]]:d<0?[l,[c,[f,0]]]:[c,[l,[f,0]]]}var g=t._2(O,l,c);if(0===g)return[f,[l,0]];if(g<0)return[f,[l,[c,0]]];var h=t._2(O,f,c);return 0===h?[f,[l,0]]:h<0?[f,[c,[l,0]]]:[c,[f,[l,0]]]}i=1}else i=1}else i=1;else if(r){var p=r[1];if(p){var y=p[0],X=r[0],b=t._2(O,X,y);return 0===b?[X,0]:b<0?[X,[y,0]]:[y,[X,0]]}i=1}else i=1;if(1===i)for(var w=n>>1,C=n-w|0,A=_(w,r),x=e(w,r),k=e(C,A),E=0;;){var S=E,N=k,M=x;if(M){if(N){var L=N[1],T=N[0],q=M[1],P=M[0],$=t._2(O,P,T);if(0===$){E=[P,S],k=L,x=q;continue}if($>0){E=[P,S],x=q;continue}E=[T,S],k=L;continue}return o(M,S)}return o(N,S)}},e=function(n,e){var i=0;if(2!==n)if(3===n&&e){var u=e[1];if(u){var a=u[1];if(a){var c=a[0],f=u[0],l=e[0],s=t._2(O,l,f);if(0===s){var m=t._2(O,f,c);return 0===m?[f,0]:m>0?[f,[c,0]]:[c,[f,0]]}if(s>0){var v=t._2(O,f,c);if(0===v)return[l,[f,0]];if(v>0)return[l,[f,[c,0]]];var d=t._2(O,l,c);return 0===d?[l,[f,0]]:d>0?[l,[c,[f,0]]]:[c,[l,[f,0]]]}var g=t._2(O,l,c);if(0===g)return[f,[l,0]];if(g>0)return[f,[l,[c,0]]];var h=t._2(O,f,c);return 0===h?[f,[l,0]]:h>0?[f,[c,[l,0]]]:[c,[f,[l,0]]]}i=1}else i=1}else i=1;else if(e){var p=e[1];if(p){var y=p[0],X=e[0],b=t._2(O,X,y);return 0===b?[X,0]:b>0?[X,[y,0]]:[y,[X,0]]}i=1}else i=1;if(1===i)for(var w=n>>1,C=n-w|0,A=_(w,e),x=r(w,e),k=r(C,A),E=0;;){var S=E,N=k,M=x;if(M){if(N){var L=N[1],T=N[0],q=M[1],P=M[0],$=t._2(O,P,T);if(0===$){E=[P,S],k=L,x=q;continue}if($<0){E=[P,S],x=q;continue}E=[T,S],k=L;continue}return o(M,S)}return o(N,S)}},i=a(n);return i<2?n:r(i,n)},n.merge=function O(n,r,e){if(r){if(e){var i=e[0],u=r[0];return t._2(n,u,i)<=0?[u,O(n,r[1],e)]:[i,O(n,r,e[1])]}return r}return e}},function(O,n,r){"use strict";var t=r(5);function e(O,n){for(;;){var r=n,i=O,u=i.length,a=0===u?1:u,o=a-r.length|0;if(0===o)return i.apply(null,r);if(!(o<0))return function(O,n){return function(r){return e(O,n.concat([r]))}}(i,r);n=t.caml_array_sub(r,a,0|-o),O=i.apply(null,t.caml_array_sub(r,0,a))}}function i(O,n,r){if(r>7||r<0)return e(O,[n]);switch(r){case 0:case 1:return O(n);case 2:return function(r){return O(n,r)};case 3:return function(r,t){return O(n,r,t)};case 4:return function(r,t,e){return O(n,r,t,e)};case 5:return function(r,t,e,i){return O(n,r,t,e,i)};case 6:return function(r,t,e,i,u){return O(n,r,t,e,i,u)};case 7:return function(r,t,e,i,u,a){return O(n,r,t,e,i,u,a)}}}function u(O,n){var r=O.length;return 1===r?O(n):i(O,n,r)}function a(O,n,r,t){if(t>7||t<0)return e(O,[n,r]);switch(t){case 0:case 1:return e(O(n),[r]);case 2:return O(n,r);case 3:return function(t){return O(n,r,t)};case 4:return function(t,e){return O(n,r,t,e)};case 5:return function(t,e,i){return O(n,r,t,e,i)};case 6:return function(t,e,i,u){return O(n,r,t,e,i,u)};case 7:return function(t,e,i,u,a){return O(n,r,t,e,i,u,a)}}}function o(O,n,r){var t=O.length;return 2===t?O(n,r):a(O,n,r,t)}function c(O,n,r,t,i){var u=0;if(i>7||i<0)return e(O,[n,r,t]);switch(i){case 0:case 1:u=1;break;case 2:return e(O(n,r),[t]);case 3:return O(n,r,t);case 4:return function(e){return O(n,r,t,e)};case 5:return function(e,i){return O(n,r,t,e,i)};case 6:return function(e,i,u){return O(n,r,t,e,i,u)};case 7:return function(e,i,u,a){return O(n,r,t,e,i,u,a)}}return 1===u?e(O(n),[r,t]):void 0}function f(O,n,r,t){var e=O.length;return 3===e?O(n,r,t):c(O,n,r,t,e)}function _(O,n,r,t,i,u){var a=0;if(u>7||u<0)return e(O,[n,r,t,i]);switch(u){case 0:case 1:a=1;break;case 2:return e(O(n,r),[t,i]);case 3:return e(O(n,r,t),[i]);case 4:return O(n,r,t,i);case 5:return function(e){return O(n,r,t,i,e)};case 6:return function(e,u){return O(n,r,t,i,e,u)};case 7:return function(e,u,a){return O(n,r,t,i,e,u,a)}}return 1===a?e(O(n),[r,t,i]):void 0}function l(O,n,r,t,e){var i=O.length;return 4===i?O(n,r,t,e):_(O,n,r,t,e,i)}function s(O,n,r,t,i,u,a){var o=0;if(a>7||a<0)return e(O,[n,r,t,i,u]);switch(a){case 0:case 1:o=1;break;case 2:return e(O(n,r),[t,i,u]);case 3:return e(O(n,r,t),[i,u]);case 4:return e(O(n,r,t,i),[u]);case 5:return O(n,r,t,i,u);case 6:return function(e){return O(n,r,t,i,u,e)};case 7:return function(e,a){return O(n,r,t,i,u,e,a)}}return 1===o?e(O(n),[r,t,i,u]):void 0}function m(O,n,r,t,e,i){var u=O.length;return 5===u?O(n,r,t,e,i):s(O,n,r,t,e,i,u)}function v(O,n,r,t,i,u,a,o){var c=0;if(o>7||o<0)return e(O,[n,r,t,i,u,a]);switch(o){case 0:case 1:c=1;break;case 2:return e(O(n,r),[t,i,u,a]);case 3:return e(O(n,r,t),[i,u,a]);case 4:return e(O(n,r,t,i),[u,a]);case 5:return e(O(n,r,t,i,u),[a]);case 6:return O(n,r,t,i,u,a);case 7:return function(e){return O(n,r,t,i,u,a,e)}}return 1===c?e(O(n),[r,t,i,u,a]):void 0}function d(O,n,r,t,e,i,u){var a=O.length;return 6===a?O(n,r,t,e,i,u):v(O,n,r,t,e,i,u,a)}function g(O,n,r,t,i,u,a,o,c){var f=0;if(c>7||c<0)return e(O,[n,r,t,i,u,a,o]);switch(c){case 0:case 1:f=1;break;case 2:return e(O(n,r),[t,i,u,a,o]);case 3:return e(O(n,r,t),[i,u,a,o]);case 4:return e(O(n,r,t,i),[u,a,o]);case 5:return e(O(n,r,t,i,u),[a,o]);case 6:return e(O(n,r,t,i,u,a),[o]);case 7:return O(n,r,t,i,u,a,o)}return 1===f?e(O(n),[r,t,i,u,a,o]):void 0}function h(O,n,r,t,e,i,u,a){var o=O.length;return 7===o?O(n,r,t,e,i,u,a):g(O,n,r,t,e,i,u,a,o)}function p(O,n,r,t,i,u,a,o,c,f){var _=0;if(f>7||f<0)return e(O,[n,r,t,i,u,a,o,c]);switch(f){case 0:case 1:_=1;break;case 2:return e(O(n,r),[t,i,u,a,o,c]);case 3:return e(O(n,r,t),[i,u,a,o,c]);case 4:return e(O(n,r,t,i),[u,a,o,c]);case 5:return e(O(n,r,t,i,u),[a,o,c]);case 6:return e(O(n,r,t,i,u,a),[o,c]);case 7:return e(O(n,r,t,i,u,a,o),[c])}return 1===_?e(O(n),[r,t,i,u,a,o,c]):void 0}function y(O,n,r,t,e,i,u,a,o){var c=O.length;return 8===c?O(n,r,t,e,i,u,a,o):p(O,n,r,t,e,i,u,a,o,c)}n.app=e,n.curry_1=i,n._1=u,n.__1=function(O){return 1===O.length?O:function(n){return u(O,n)}},n.curry_2=a,n._2=o,n.__2=function(O){return 2===O.length?O:function(n,r){return o(O,n,r)}},n.curry_3=c,n._3=f,n.__3=function(O){return 3===O.length?O:function(n,r,t){return f(O,n,r,t)}},n.curry_4=_,n._4=l,n.__4=function(O){return 4===O.length?O:function(n,r,t,e){return l(O,n,r,t,e)}},n.curry_5=s,n._5=m,n.__5=function(O){return 5===O.length?O:function(n,r,t,e,i){return m(O,n,r,t,e,i)}},n.curry_6=v,n._6=d,n.__6=function(O){return 6===O.length?O:function(n,r,t,e,i,u){return d(O,n,r,t,e,i,u)}},n.curry_7=g,n._7=h,n.__7=function(O){return 7===O.length?O:function(n,r,t,e,i,u,a){return h(O,n,r,t,e,i,u,a)}},n.curry_8=p,n._8=y,n.__8=function(O){return 8===O.length?O:function(n,r,t,e,i,u,a,o){return y(O,n,r,t,e,i,u,a,o)}}},function(O,n,r){"use strict";var t=r(6);n.caml_array_dup=function(O){return O.slice(0)},n.caml_array_sub=function(O,n,r){for(var t=new Array(r),e=0,i=n;e<r;)t[e]=O[i],e=e+1|0,i=i+1|0;return t},n.caml_array_concat=function(O){var n=function(O,n){for(;;){var r=n,t=O;if(!r)return t;n=r[1],O=r[0].length+t|0}}(0,O),r=new Array(n);return function(O,n,r){for(;;){var t=r,e=n;if(!t)return 0;for(var i=t[0],u=i.length,a=e,o=0;o<u;)O[a]=i[o],a=a+1|0,o=o+1|0;r=t[1],n=a}}(r,0,O),r},n.caml_make_vect=function(O,n){for(var r=new Array(O),t=0,e=O-1|0;t<=e;++t)r[t]=n;return r},n.caml_make_float_vect=function(O){for(var n=new Array(O),r=0,t=O-1|0;r<=t;++r)n[r]=0;return n},n.caml_array_blit=function(O,n,r,t,e){if(t<=n){for(var i=0,u=e-1|0;i<=u;++i)r[i+t|0]=O[i+n|0];return 0}for(var a=e-1|0;a>=0;--a)r[a+t|0]=O[a+n|0];return 0},n.caml_array_get=function(O,n){if(n<0||n>=O.length)throw[t.invalid_argument,"index out of bounds"];return O[n]},n.caml_array_set=function(O,n,r){if(n<0||n>=O.length)throw[t.invalid_argument,"index out of bounds"];return O[n]=r,0}},function(O,n,r){"use strict";var t=["Out_of_memory",0],e=["Sys_error",-1],i=["Failure",-2],u=["Invalid_argument",-3],a=["End_of_file",-4],o=["Division_by_zero",-5],c=["Not_found",-6],f=["Match_failure",-7],_=["Stack_overflow",-8],l=["Sys_blocked_io",-9],s=["Assert_failure",-10],m=["Undefined_recursive_module",-11];t.tag=248,e.tag=248,i.tag=248,u.tag=248,a.tag=248,o.tag=248,c.tag=248,f.tag=248,_.tag=248,l.tag=248,s.tag=248,m.tag=248,n.out_of_memory=t,n.sys_error=e,n.failure=i,n.invalid_argument=u,n.end_of_file=a,n.division_by_zero=o,n.not_found=c,n.match_failure=f,n.stack_overflow=_,n.sys_blocked_io=l,n.assert_failure=s,n.undefined_recursive_module=m},function(O,n,r){"use strict";var t=r(8),e=r(9),i=r(6);var u=function(O,n){for(var r in O)n(r)};function a(O,n){for(;;){var r=n,t=O;if(t===r)return 0;if(null===t)return-1;if(null===r)return 1;if(void 0===t)return-1;if(void 0===r)return 1;var o=typeof t,c=typeof r;if("string"===o)return e.caml_string_compare(t,r);var f="number"===c;if("number"===o)return f?e.caml_int_compare(t,r):-1;if(f)return 1;if("boolean"===o){return t===r?0:t<r?-1:1}if("function"===o||"function"===c)throw[i.invalid_argument,"compare: functional value"];var _=0|t.tag,l=0|r.tag;if(250!==_)if(250!==l){if(248===_)return e.caml_int_compare(t[1],r[1]);if(251===_)throw[i.invalid_argument,"equal: abstract value"];if(_!==l)return _<l?-1:1;var s=0|t.length,m=0|r.length;if(s===m){if(!Array.isArray(t)){var v=t,d=r,g=[0],h=[0],p=function(O,n){var r=O[2],t=O[1];if(!t.hasOwnProperty(n)||a(O[0][n],t[n])>0){var e=r[0];return e?n<e[0]?(r[0]=[n],0):0:(r[0]=[n],0)}return 0},y=function(O){return function(n){return p(O,n)}}([v,d,h]),X=function(O){return function(n){return p(O,n)}}([d,v,g]);u(v,y),u(d,X);var b=g[0],w=h[0];return b?w?e.caml_string_compare(b[0],w[0]):-1:w?1:0}for(var C=t,A=r,x=0,k=s;;){var E=x;if(E===k)return 0;var S=a(C[E],A[E]);if(0!==S)return S;x=E+1|0}}else if(s<m)for(var N=t,M=r,L=0,T=s;;){var q=L;if(q===T)return-1;var P=a(N[q],M[q]);if(0!==P)return P;L=q+1|0}else for(var $=t,B=r,F=0,V=m;;){var D=F;if(D===V)return 1;var z=a($[D],B[D]);if(0!==z)return z;F=D+1|0}}else n=r[0];else O=t[0]}}function o(O,n){for(;;){var r=n,t=O;if(t===r)return!0;var e=typeof t;if("string"===e||"number"===e||"boolean"===e||"undefined"===e||null===t)return!1;var a=typeof r;if("function"===e||"function"===a)throw[i.invalid_argument,"equal: functional value"];if("number"===a||"undefined"===a||null===r)return!1;var c=0|t.tag,f=0|r.tag;if(250!==c)if(250!==f){if(248===c)return t[1]===r[1];if(251===c)throw[i.invalid_argument,"equal: abstract value"];if(c!==f)return!1;var _=0|t.length;if(_!==(0|r.length))return!1;if(!Array.isArray(t)){var l=t,s=r,m=[!0],v=function(O,n){return function(r){return O.hasOwnProperty(r)?0:(n[0]=!1,0)}}(s,m),d=function(O,n,r){return function(t){return O.hasOwnProperty(t)&&o(n[t],O[t])?0:(r[0]=!1,0)}}(l,s,m);return u(l,v),m[0]&&u(s,d),m[0]}for(var g=t,h=r,p=0,y=_;;){var X=p;if(X===y)return!0;if(!o(g[X],h[X]))return!1;p=X+1|0}}else n=r[0];else O=t[0]}}n.caml_obj_block=function(O,n){var r=new Array(n);return r.tag=O,r},n.caml_obj_dup=function(O){for(var n=0|O.length,r=new Array(n),t=0,e=n-1|0;t<=e;++t)r[t]=O[t];return r.tag=0|O.tag,r},n.caml_obj_truncate=function(O,n){var r=0|O.length;if(n<=0||n>r)throw[i.invalid_argument,"Obj.truncate"];if(r!==n){for(var t=n,e=r-1|0;t<=e;++t)O[t]=0;return O.length=n,0}return 0},n.caml_lazy_make_forward=function(O){return t.__(250,[O])},n.caml_update_dummy=function(O,n){for(var r=0,t=(0|n.length)-1|0;r<=t;++r)O[r]=n[r];var e=0|n.tag;return 0!==e?(O.tag=e,0):0},n.caml_compare=a,n.caml_equal=o,n.caml_equal_null=function(O,n){return null!==n?o(O,n):O===n},n.caml_equal_undefined=function(O,n){return void 0!==n?o(O,n):O===n},n.caml_equal_nullable=function(O,n){return null==n?O===n:o(O,n)},n.caml_notequal=function(O,n){return!o(O,n)},n.caml_greaterequal=function(O,n){return a(O,n)>=0},n.caml_greaterthan=function(O,n){return a(O,n)>0},n.caml_lessthan=function(O,n){return a(O,n)<0},n.caml_lessequal=function(O,n){return a(O,n)<=0},n.caml_min=function(O,n){return a(O,n)<=0?O:n},n.caml_max=function(O,n){return a(O,n)>=0?O:n}},function(O,n,r){"use strict";n.__=function(O,n){return n.tag=O,n},n.record=function(O,n){return Object.defineProperty(n,Symbol.for("BsRecord"),{value:O})},n.variant=function(O,n,r){return r.tag=n,Object.defineProperty(r,Symbol.for("BsVariant"),{value:O})},n.simpleVariant=function(O,n){return Object.defineProperty(n,Symbol.for("BsVariant"),{value:O})},n.localModule=function(O,n){return Object.defineProperty(n,Symbol.for("BsLocalModule"),{value:O})},n.polyVar=function(O,n){return Object.defineProperty(n,Symbol.for("BsPolyVar"),{value:O})}},function(O,n,r){"use strict";function t(O,n){return O<n?-1:O===n?0:1}var e=t,i=t;n.caml_int_compare=t,n.caml_bool_compare=function(O,n){return O?n?0:1:n?-1:0},n.caml_float_compare=function(O,n){return O===n?0:O<n?-1:O>n||O==O?1:n==n?-1:0},n.caml_nativeint_compare=e,n.caml_string_compare=function(O,n){return O===n?0:O<n?-1:1},n.caml_int32_compare=i,n.caml_bool_min=function(O,n){return O?n:O},n.caml_int_min=function(O,n){return O<n?O:n},n.caml_float_min=function(O,n){return O<n?O:n},n.caml_string_min=function(O,n){return O<n?O:n},n.caml_nativeint_min=function(O,n){return O<n?O:n},n.caml_int32_min=function(O,n){return O<n?O:n},n.caml_bool_max=function(O,n){return O||n},n.caml_int_max=function(O,n){return O>n?O:n},n.caml_float_max=function(O,n){return O>n?O:n},n.caml_string_max=function(O,n){return O>n?O:n},n.caml_nativeint_max=function(O,n){return O>n?O:n},n.caml_int32_max=function(O,n){return O>n?O:n}},function(O,n,r){"use strict";var t=r(4),e=r(11),i=r(13),u=r(14),a=r(18),o=r(19),c=r(20),f=r(6),_=r(21);var l=o.create("Pervasives.Exit");function s(O){for(var n=O.length,r=0;;){var t=r;if(t>=n)return O+".";var e=a.get(O,t);if(e>=48){if(e>=58)return O;r=t+1|0}else{if(45!==e)return O;r=t+1|0}}}var m=e.stdin,v=e.stdout,d=e.stderr;function g(O,n,r){return e.caml_ml_open_descriptor_out(c.not_implemented("caml_sys_open"))}function h(){for(var O=e.caml_ml_out_channels_list(0);;){var n=O;if(!n)return 0;try{e.caml_ml_flush(n[0])}catch(O){}O=n[1]}}function p(O,n){return e.caml_ml_output(O,n,0,n.length)}function y(O,n){return e.caml_ml_output(O,n,0,n.length)}function X(O,n,r){return e.caml_ml_open_descriptor_in(c.not_implemented("caml_sys_open"))}function b(O,n,r,t){for(;;){var e=t,i=r;if(e<=0)return 0;var u=c.not_implemented("caml_ml_input");if(0===u)throw f.end_of_file;t=e-u|0,r=i+u|0}}function w(O,n,r,t){if(r<0||t<0||r>(n.length-t|0))throw[f.invalid_argument,"really_input"];return b(0,0,r,t)}function C(O){var n=function(O,n,r){for(;;){var t=r,e=n;if(!t)return O;var i=t[0],u=i.length;a.caml_blit_bytes(i,0,O,e-u|0,u),r=t[1],n=e-u|0}};return a.bytes_to_string(function(r,t){for(;;){var i=t,u=r,o=c.not_implemented("caml_ml_input_scan_line");if(0===o){if(u)return n(a.caml_create_string(i),i,u);throw f.end_of_file}if(o>0){var _=a.caml_create_string(o-1|0);if(c.not_implemented("caml_ml_input"),e.caml_ml_input_char(O),u){var l=(i+o|0)-1|0;return n(a.caml_create_string(l),l,[_,u])}return _}var s=a.caml_create_string(0|-o);c.not_implemented("caml_ml_input"),t=i-o|0,r=[s,u]}}(0,0))}var A=[h];function x(){return t._1(A[0],0)}var k=e.caml_ml_flush,E=e.caml_ml_output_char,S=e.caml_ml_output_char;var N=e.caml_ml_input_char,M=e.caml_ml_input_char;var L=[function(O,n){return c.not_implemented("caml_ml_seek_out_64")},function(){return c.not_implemented("caml_ml_pos_out_64")},function(){return c.not_implemented("caml_ml_channel_size_64")},function(O,n){return c.not_implemented("caml_ml_seek_in_64")},function(){return c.not_implemented("caml_ml_pos_in_64")},function(){return c.not_implemented("caml_ml_channel_size_64")}];n.invalid_arg=function(O){throw[f.invalid_argument,O]},n.failwith=function(O){throw[f.failure,O]},n.Exit=l,n.abs=function(O){return O>=0?O:0|-O},n.max_int=2147483647,n.min_int=-2147483648,n.lnot=function(O){return-1^O},n.epsilon_float=2.220446049250313e-16,n.char_of_int=function(O){if(O<0||O>255)throw[f.invalid_argument,"char_of_int"];return O},n.string_of_bool=function(O){return O?"true":"false"},n.bool_of_string=function(O){switch(O){case"false":return!1;case"true":return!0;default:throw[f.invalid_argument,"bool_of_string"]}},n.string_of_float=function(O){return s(u.caml_format_float("%.12g",O))},n.$at=function O(n,r){return n?[n[0],O(n[1],r)]:r},n.stdin=m,n.stdout=v,n.stderr=d,n.print_char=function(O){return e.caml_ml_output_char(v,O)},n.print_string=function(O){return y(v,O)},n.print_bytes=function(O){return p(v,O)},n.print_int=function(O){return y(v,String(O))},n.print_float=function(O){return y(v,s(u.caml_format_float("%.12g",O)))},n.print_newline=function(){return e.caml_ml_output_char(v,10),e.caml_ml_flush(v)},n.prerr_char=function(O){return e.caml_ml_output_char(d,O)},n.prerr_string=function(O){return y(d,O)},n.prerr_bytes=function(O){return p(d,O)},n.prerr_int=function(O){return y(d,String(O))},n.prerr_float=function(O){return y(d,s(u.caml_format_float("%.12g",O)))},n.prerr_newline=function(){return e.caml_ml_output_char(d,10),e.caml_ml_flush(d)},n.read_line=function(){return e.caml_ml_flush(v),C(m)},n.read_int=function(){return u.caml_int_of_string((e.caml_ml_flush(v),C(m)))},n.read_float=function(){return u.caml_float_of_string((e.caml_ml_flush(v),C(m)))},n.open_out=function(O){return g()},n.open_out_bin=function(O){return g()},n.open_out_gen=g,n.flush=k,n.flush_all=h,n.output_char=E,n.output_string=y,n.output_bytes=p,n.output=function(O,n,r,t){if(r<0||t<0||r>(n.length-t|0))throw[f.invalid_argument,"output"];return e.caml_ml_output(O,n,r,t)},n.output_substring=function(O,n,r,t){if(r<0||t<0||r>(n.length-t|0))throw[f.invalid_argument,"output_substring"];return e.caml_ml_output(O,n,r,t)},n.output_byte=S,n.output_binary_int=function(O,n){return c.not_implemented("caml_ml_output_int")},n.output_value=function(O,n){return c.not_implemented("caml_output_value")},n.seek_out=function(O,n){return c.not_implemented("caml_ml_seek_out")},n.pos_out=function(){return c.not_implemented("caml_ml_pos_out")},n.out_channel_length=function(){return c.not_implemented("caml_ml_channel_size")},n.close_out=function(O){return e.caml_ml_flush(O),c.not_implemented("caml_ml_close_channel")},n.close_out_noerr=function(O){try{e.caml_ml_flush(O)}catch(O){}try{return c.not_implemented("caml_ml_close_channel")}catch(O){return 0}},n.set_binary_mode_out=function(O,n){return c.not_implemented("caml_ml_set_binary_mode")},n.open_in=function(O){return X()},n.open_in_bin=function(O){return X()},n.open_in_gen=X,n.input_char=N,n.input_line=C,n.input=function(O,n,r,t){if(r<0||t<0||r>(n.length-t|0))throw[f.invalid_argument,"input"];return c.not_implemented("caml_ml_input")},n.really_input=w,n.really_input_string=function(O,n){var r=a.caml_create_string(n);return w(0,r,0,n),a.bytes_to_string(r)},n.input_byte=M,n.input_binary_int=function(){return c.not_implemented("caml_ml_input_int")},n.input_value=function(){return c.not_implemented("caml_input_value")},n.seek_in=function(O,n){return c.not_implemented("caml_ml_seek_in")},n.pos_in=function(){return c.not_implemented("caml_ml_pos_in")},n.in_channel_length=function(){return c.not_implemented("caml_ml_channel_size")},n.close_in=function(){return c.not_implemented("caml_ml_close_channel")},n.close_in_noerr=function(){try{return c.not_implemented("caml_ml_close_channel")}catch(O){return 0}},n.set_binary_mode_in=function(O,n){return c.not_implemented("caml_ml_set_binary_mode")},n.LargeFile=L,n.string_of_format=function(O){return O[1]},n.$caret$caret=function(O,n){return[_.concat_fmt(O[0],n[0]),O[1]+"%,"+n[1]]},n.exit=function(O){return x(),i.caml_sys_exit(O)},n.at_exit=function(O){var n=A[0];return A[0]=function(){return t._1(O,0),t._1(n,0)},0},n.valid_float_lexem=s,n.unsafe_really_input=b,n.do_at_exit=x},function(O,n,r){"use strict";(function(O){var t=r(4),e=r(6);var i=["",function(n,r){var t=r.length-1|0;return void 0!==O&&O.stdout&&O.stdout.write?O.stdout.write(r):"\n"===r[t]?(console.log(r.slice(0,t)),0):(console.log(r),0)}],u=["",function(O,n){var r=n.length-1|0;return"\n"===n[r]?(console.log(n.slice(0,r)),0):(console.log(n),0)}];function a(O){return""!==O[0]?(t._2(O[1],O,O[0]),O[0]="",0):0}function o(n,r,t,e){var u=0===t&&e===r.length?r:r.slice(t,e);if(void 0!==O&&O.stdout&&O.stdout.write&&n===i)return O.stdout.write(u);var o=u.lastIndexOf("\n");return o<0?(n[0]=n[0]+u,0):(n[0]=n[0]+u.slice(0,o+1|0),a(n),n[0]=n[0]+u.slice(o+1|0),0)}n.$caret=function(O,n){return O+n},n.stdin=void 0,n.stdout=i,n.stderr=u,n.caml_ml_open_descriptor_in=function(){throw[e.failure,"caml_ml_open_descriptor_in not implemented"]},n.caml_ml_open_descriptor_out=function(){throw[e.failure,"caml_ml_open_descriptor_out not implemented"]},n.caml_ml_flush=a,n.node_std_output=function(n){return void 0!==O&&O.stdout&&(O.stdout.write(n),!0)},n.caml_ml_output=o,n.caml_ml_output_char=function(O,n){return o(O,String.fromCharCode(n),0,1)},n.caml_ml_input=function(O,n,r,t){throw[e.failure,"caml_ml_input ic not implemented"]},n.caml_ml_input_char=function(){throw[e.failure,"caml_ml_input_char not implemnted"]},n.caml_ml_out_channels_list=function(){return[i,[u,0]]}}).call(this,r(12))},function(O,n){var r,t,e=O.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(O){if(r===setTimeout)return setTimeout(O,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(O,0);try{return r(O,0)}catch(n){try{return r.call(null,O,0)}catch(n){return r.call(this,O,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(O){r=i}try{t="function"==typeof clearTimeout?clearTimeout:u}catch(O){t=u}}();var o,c=[],f=!1,_=-1;function l(){f&&o&&(f=!1,o.length?c=o.concat(c):_=-1,c.length&&s())}function s(){if(!f){var O=a(l);f=!0;for(var n=c.length;n;){for(o=c,c=[];++_<n;)o&&o[_].run();_=-1,n=c.length}o=null,f=!1,function(O){if(t===clearTimeout)return clearTimeout(O);if((t===u||!t)&&clearTimeout)return t=clearTimeout,clearTimeout(O);try{t(O)}catch(n){try{return t.call(null,O)}catch(n){return t.call(this,O)}}}(O)}}function m(O,n){this.fun=O,this.array=n}function v(){}e.nextTick=function(O){var n=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)n[r-1]=arguments[r];c.push(new m(O,n)),1!==c.length||f||a(s)},m.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=v,e.addListener=v,e.once=v,e.off=v,e.removeListener=v,e.removeAllListeners=v,e.emit=v,e.prependListener=v,e.prependOnceListener=v,e.listeners=function(O){return[]},e.binding=function(O){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(O){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},function(O,n,r){"use strict";(function(O){var t=r(6);n.caml_sys_getenv=function(n){var r=void 0===O?void 0:O;if(void 0!==r){var e=r.env[n];if(void 0!==e)return e;throw t.not_found}throw t.not_found},n.caml_sys_time=function(){var n=void 0===O?void 0:O;return void 0!==n?n.uptime():-1},n.caml_sys_random_seed=function(){return[(4294967295^(0|Date.now()))*Math.random()|0]},n.caml_sys_system_command=function(){return 127},n.caml_sys_getcwd=function(){var n=void 0===O?void 0:O;return void 0!==n?n.cwd():"/"},n.caml_sys_get_argv=function(){var n=void 0===O?void 0:O;return void 0!==n?null==n.argv?["",[""]]:[n.argv[0],n.argv]:["",[""]]},n.caml_sys_exit=function(n){var r=void 0===O?void 0:O;return void 0!==r?r.exit(n):0},n.caml_sys_is_directory=function(){throw[t.failure,"caml_sys_is_directory not implemented"]},n.caml_sys_file_exists=function(){throw[t.failure,"caml_sys_file_exists not implemented"]}}).call(this,r(12))},function(O,n,r){"use strict";var t=r(4),e=r(15),i=r(16),u=r(17),a=r(6);function o(O){throw[a.failure,O]}function c(O){return O>=65?O>=97?O>=123?-1:O-87|0:O>=91?-1:O-55|0:O>57||O<48?-1:O-48|0}function f(O){switch(O){case 0:return 8;case 1:return 16;case 2:return 10;case 3:return 2}}function _(O){var n=1,r=2,t=0;"-"===O[t]&&(n=-1,t=t+1|0);var e=O.charCodeAt(t),i=O.charCodeAt(t+1|0);return 48===e&&(i>=89?98!==i?111!==i?120===i&&(r=1,t=t+2|0):(r=0,t=t+2|0):(r=3,t=t+2|0):66!==i?79!==i?i>=88&&(r=1,t=t+2|0):(r=0,t=t+2|0):(r=3,t=t+2|0)),[t,n,r]}function l(O){var n=_(O),r=n[0],t=f(n[2]),e=O.length,i=c(r<e?O.charCodeAt(r):0);if(i<0||i>=t)throw[a.failure,"int_of_string"];var u=n[1]*function(n,r){for(;;){var i=r,u=n;if(i===e)return u;var o=O.charCodeAt(i);if(95!==o){var f=c(o);if(f<0||f>=t)throw[a.failure,"int_of_string"];var _=t*u+f;if(_>4294967295)throw[a.failure,"int_of_string"];r=i+1|0,n=_}else r=i+1|0}}(i,r+1|0),o=0|u;if(10===t&&u!==o)throw[a.failure,"int_of_string"];return o}function s(O){return O>=65&&O<=90||O>=192&&O<=214||O>=216&&O<=222?O+32|0:O}function m(O){var n=O.length;if(n>31)throw[a.invalid_argument,"format_int: format too long"];for(var r=["+","-"," ",!1,2,!1,0,!1,1,-1,"f"],t=0;;){var i=t;if(i>=n)return r;var u=O.charCodeAt(i),o=0;if(u>=69)if(u>=88)if(u>=121)o=1;else switch(u-88|0){case 0:r[4]=1,r[7]=!0,t=i+1|0;continue;case 13:case 14:case 15:o=5;break;case 12:case 17:o=4;break;case 23:r[4]=0,t=i+1|0;continue;case 29:r[4]=2,t=i+1|0;continue;case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 16:case 18:case 19:case 20:case 21:case 22:case 24:case 25:case 26:case 27:case 28:case 30:case 31:o=1;break;case 32:r[4]=1,t=i+1|0;continue}else{if(!(u>=72)){r[5]=!0,r[7]=!0,r[10]=String.fromCharCode(s(u)),t=i+1|0;continue}o=1}else{var c=u-32|0;if(c>25||c<0)o=1;else switch(c){case 3:r[3]=!0,t=i+1|0;continue;case 0:case 11:o=2;break;case 13:r[0]="-",t=i+1|0;continue;case 14:r[9]=0;for(var f=i+1|0;function(n){return function(){var r=O.charCodeAt(n)-48|0;return r>=0&&r<=9}}(f)();)r[9]=(e.imul(r[9],10)+O.charCodeAt(f)|0)-48|0,f=f+1|0;t=f;continue;case 1:case 2:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 12:case 15:o=1;break;case 16:r[2]="0",t=i+1|0;continue;case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:o=3}}switch(o){case 1:t=i+1|0;continue;case 2:r[1]=String.fromCharCode(u),t=i+1|0;continue;case 3:r[6]=0;for(var _=i;function(n){return function(){var r=O.charCodeAt(n)-48|0;return r>=0&&r<=9}}(_)();)r[6]=(e.imul(r[6],10)+O.charCodeAt(_)|0)-48|0,_=_+1|0;t=_;continue;case 4:r[5]=!0,r[4]=2,t=i+1|0;continue;case 5:r[5]=!0,r[10]=String.fromCharCode(u),t=i+1|0;continue}}}function v(O,n){var r=O[0],t=O[1],e=O[2],i=O[3],u=O[4],a=O[5],o=O[6],c=O[7],f=O[8],_=n.length;a&&(f<0||"-"!==t)&&(_=_+1|0),i&&(0===u?_=_+1|0:1===u&&(_=_+2|0));var l="";if("+"===r&&" "===e)for(var s=_,m=o-1|0;s<=m;++s)l+=e;if(a&&(f<0?l+="-":"-"!==t&&(l+=t)),i&&0===u&&(l+="0"),i&&1===u&&(l+="0x"),"+"===r&&"0"===e)for(var v=_,d=o-1|0;v<=d;++v)l+=e;if(l=c?l+n.toUpperCase():l+n,"-"===r)for(var g=_,h=o-1|0;g<=h;++g)l+=" ";return l}function d(O,n){if("%d"===O)return String(n);var r=m(O),t=n,e=(t<0?r[5]?(r[8]=-1,-t):t>>>0:t).toString(function(O){switch(O){case 0:return 8;case 1:return 16;case 2:return 10}}(r[4]));if(r[9]>=0){r[2]=" ";var i=r[9]-e.length|0;i>0&&(e=u.repeat(i,"0")+e)}return v(r,e)}var g=function(O,n){var r=+O;if(O.length>0&&r==r)return r;if(r=+(O=O.replace(/_/g,"")),O.length>0&&r==r||/^[+-]?nan$/i.test(O))return r;if(/^ *0x[0-9a-f_]+p[+-]?[0-9_]+/i.test(O)){var t=O.indexOf("p");t=-1==t?O.indexOf("P"):t;var e=+O.substring(t+1);return(r=+O.substring(0,t))*Math.pow(2,e)}return/^\+?inf(inity)?$/i.test(O)?1/0:/^-inf(inity)?$/i.test(O)?-1/0:void n("float_of_string")};var h=d,p=d,y=l,X=l;n.caml_format_float=function(O,n){var r=m(O),t=r[9]<0?6:r[9],e=n<0?(r[8]=-1,-n):n,i="";if(isNaN(e))i="nan",r[2]=" ";else if(isFinite(e))switch(r[10]){case"e":var u=(i=e.toExponential(t)).length;"e"===i[u-3|0]&&(i=i.slice(0,u-1|0)+"0"+i.slice(u-1|0));break;case"f":i=e.toFixed(t);break;case"g":var a=0!==t?t:1,o=(i=e.toExponential(a-1|0)).indexOf("e"),c=0|Number(i.slice(o+1|0));if(c<-4||e>=1e21||e.toFixed().length>a){for(var f=o-1|0;"0"===i[f];)f=f-1|0;"."===i[f]&&(f=f-1|0);var _=(i=i.slice(0,f+1|0)+i.slice(o)).length;"e"===i[_-3|0]&&(i=i.slice(0,_-1|0)+"0"+i.slice(_-1|0))}else{var l=a;if(c<0)l=l-(c+1|0)|0,i=e.toFixed(l);else for(;(i=e.toFixed(l)).length>(a+1|0);)l=l-1|0;if(0!==l){for(var s=i.length-1|0;"0"===i[s];)s=s-1|0;"."===i[s]&&(s=s-1|0),i=i.slice(0,s+1|0)}}}else i="inf",r[2]=" ";return v(r,i)},n.caml_format_int=d,n.caml_nativeint_format=h,n.caml_int32_format=p,n.caml_float_of_string=function(O){return t._2(g,O,o)},n.caml_int64_format=function(O,n){var r=m(O),t=r[5]&&i.lt(n,[0,0])?(r[8]=-1,i.neg(n)):n,e="";switch(r[4]){case 0:var a=[0,8],o="01234567";if(i.lt(t,[0,0])){var c=i.discard_sign(t),f=i.div_mod(c,a),_=i.add([268435456,0],f[0]),l=f[1];for(e=String.fromCharCode(o.charCodeAt(0|l[1]))+e;i.neq(_,[0,0]);){var s=i.div_mod(_,a);_=s[0],l=s[1],e=String.fromCharCode(o.charCodeAt(0|l[1]))+e}}else{var d=i.div_mod(t,a),g=d[0],h=d[1];for(e=String.fromCharCode(o.charCodeAt(0|h[1]))+e;i.neq(g,[0,0]);){var p=i.div_mod(g,a);g=p[0],h=p[1],e=String.fromCharCode(o.charCodeAt(0|h[1]))+e}}break;case 1:e=i.to_hex(t)+e;break;case 2:var y=[0,10];if(i.lt(t,[0,0])){var X=i.discard_sign(t),b=i.div_mod(X,y),w=i.div_mod(i.add([0,8],b[1]),y),C=i.add(i.add([214748364,3435973836],b[0]),w[0]),A=w[1];for(e=String.fromCharCode("0123456789".charCodeAt(0|A[1]))+e;i.neq(C,[0,0]);){var x=i.div_mod(C,y);C=x[0],A=x[1],e=String.fromCharCode("0123456789".charCodeAt(0|A[1]))+e}}else{var k=i.div_mod(t,y),E=k[0],S=k[1];for(e=String.fromCharCode("0123456789".charCodeAt(0|S[1]))+e;i.neq(E,[0,0]);){var N=i.div_mod(E,y);E=N[0],S=N[1],e=String.fromCharCode("0123456789".charCodeAt(0|S[1]))+e}}}if(r[9]>=0){r[2]=" ";var M=r[9]-e.length|0;M>0&&(e=u.repeat(M,"0")+e)}return v(r,e)},n.caml_int_of_string=l,n.caml_int32_of_string=y,n.caml_int64_of_string=function(O){var n,r=_(O),t=r[2],e=r[0],u=i.of_int32(f(t)),o=i.of_int32(r[1]);switch(t){case 0:n=[536870911,4294967295];break;case 1:n=[268435455,4294967295];break;case 2:n=[429496729,2576980377];break;case 3:n=[2147483647,4294967295]}var l=O.length,s=e<l?O.charCodeAt(e):0,m=i.of_int32(c(s));if(i.lt(m,[0,0])||i.ge(m,u))throw[a.failure,"int64_of_string"];var v=i.mul(o,function(r,t){for(;;){var e=t,o=r;if(e===l)return o;var f=O.charCodeAt(e);if(95!==f){var _=i.of_int32(c(f));if(i.lt(_,[0,0])||i.ge(_,u)||i.gt(o,n))throw[a.failure,"int64_of_string"];t=e+1|0,r=i.add(i.mul(u,o),_)}else t=e+1|0}}(m,e+1|0)),d=i.or_(v,[0,0]);if(i.eq(u,[0,10])&&i.neq(v,d))throw[a.failure,"int64_of_string"];return d},n.caml_nativeint_of_string=X},function(O,n,r){"use strict";var t=r(6);function e(O){return(255&O)<<24|(65280&O)<<8|(16711680&O)>>>8|(4278190080&O)>>>24}var i=Math.imul||function(O,n){return((O>>16)*(n|=0)<<16)+(65535&O)*n|0},u=e;n.div=function(O,n){if(0===n)throw t.division_by_zero;return O/n|0},n.mod_=function(O,n){if(0===n)throw t.division_by_zero;return O%n},n.caml_bswap16=function(O){return(255&O)<<8|(65280&O)>>>8},n.caml_int32_bswap=e,n.caml_nativeint_bswap=u,n.imul=i},function(O,n,r){"use strict";var t=r(15),e=r(17),i=r(9),u=r(6),a=[-2147483648,0],o=[2147483647,1],c=[0,1],f=[0,0],_=[-1,4294967295];function l(O){return 0!=(2147483648&O)}function s(O,n){var r=n[1],t=O[1],e=t+r&4294967295,i=l(t)&&(l(r)||!l(e))||l(r)&&!l(e)?1:0;return[O[0]+n[0]+i&4294967295,e>>>0]}function m(O){return[-1^O[0],(-1^O[1])>>>0]}function v(O,n){return O[0]===n[0]&&O[1]===n[1]}function d(O){return v(O,a)?a:s(m(O),c)}function g(O,n){if(0===n)return O;var r=O[1];return n>=32?[r<<(n-32|0),0]:[r>>>(32-n|0)|O[0]<<n,r<<n>>>0]}function h(O,n){if(0===n)return O;var r=O[0];return n<32?[r>>n,(r<<(32-n|0)|O[1]>>>n)>>>0]:[r>=0?0:-1,r>>(n-32|0)>>>0]}function p(O){return 0===O[0]&&0===O[1]}function y(O,n){for(;;){var r,t=n,e=O,i=0,u=e[0],o=0,c=0;if(0===u&&0===e[1])return f;if(4===4){if(0===t[0]&&0===t[1])return f;c=3}if(3===c&&(-2147483648!==u||0!==e[1]?o=2:(r=t[1],i=1)),2===o){var _=t[0],l=e[1],s=0;if(-2147483648!==_||0!==t[1]?s=3:(r=l,i=1),3===s){var m=t[1];if(u<0){if(_<0){n=d(t),O=d(e);continue}return d(y(d(e),t))}if(_<0)return d(y(e,d(t)));var v=65535&u,g=l>>>16,h=65535&l,p=65535&_,X=m>>>16,b=65535&m,w=0,C=0,A=0,x=h*b;return w=(C=(C=(A=(x>>>16)+g*b)>>>16)+((A=(65535&A)+h*X)>>>16)+v*b)>>>16,w+=(C=(65535&C)+g*X)>>>16,w+=(C=(65535&C)+h*p)>>>16,[(C&=65535)|(w=w+((u>>>16)*b+v*X+g*p+h*(_>>>16))&65535)<<16,(65535&x|(65535&A)<<16)>>>0]}}if(1===i)return 0==(1&r)?f:a}}function X(O,n){var r=n[0],t=O[0];return t>r||!(t<r)&&O[1]>=n[1]}function b(O,n){return O[0]>n[0]||!(O[0]<n[0])&&O[1]>n[1]}function w(O){return 4294967296*O[0]+O[1]}var C=Math.pow(2,32),A=Math.pow(2,63),x=-Math.pow(2,63);function k(O){return isNaN(O)||!isFinite(O)?f:O<=x?a:O+1>=A?o:O<0?d(k(-O)):[O/C|0,(O%C|0)>>>0]}function E(O,n){for(;;){var r=n,t=O,e=t[0],o=0;if(0===r[0]&&0===r[1])throw u.division_by_zero;if(2===2)if(-2147483648!==e){if(0===e&&0===t[1])return f;o=1}else if(0!==t[1])o=1;else{if(v(r,c)||v(r,_))return t;if(v(r,a))return c;var l=r[0],m=g(E(h(t,1),r),1);if(0===m[0]&&0===m[1])return l<0?c:d(c);if(3===3)return s(m,E(s(t,d(y(r,m))),r))}if(1===o){var C=r[0];if(-2147483648===C&&0===r[1])return f;if(2===2){if(e<0){if(C<0){n=d(r),O=d(t);continue}return d(E(d(t),r))}if(C<0)return d(E(t,d(r)));for(var A=f,x=t;X(x,r);){for(var S=i.caml_float_max(1,Math.floor(w(x)/w(r))),N=Math.ceil(Math.log(S)/Math.LN2),M=N<=48?1:Math.pow(2,N-48),L=k(S),T=y(L,r);T[0]<0||b(T,x);)T=y(L=k(S-=M),r);p(L)&&(L=c),A=s(A,L),x=s(x,d(T))}return A}}}}n.min_int=a,n.max_int=o,n.one=c,n.zero=f,n.not=m,n.of_int32=function(O){return[O<0?-1:0,O>>>0]},n.to_int32=function(O){return 0|O[1]},n.add=s,n.neg=d,n.sub=function(O,n){return s(O,d(n))},n.lsl_=g,n.lsr_=function(O,n){if(0===n)return O;var r=O[0],t=n-32|0;return 0===t?[0,r>>>0]:t>0?[0,r>>>t>>>0]:[r>>>n,(r<<(0|-t)|O[1]>>>n)>>>0]},n.asr_=h,n.is_zero=p,n.mul=y,n.xor=function(O,n){return[O[0]^n[0],(O[1]^n[1])>>>0]},n.or_=function(O,n){return[O[0]|n[0],(O[1]|n[1])>>>0]},n.and_=function(O,n){return[O[0]&n[0],(O[1]&n[1])>>>0]},n.swap=function(O){return[t.caml_int32_bswap(O[1]),t.caml_int32_bswap(O[0])>>>0]},n.ge=X,n.eq=v,n.neq=function(O,n){return!v(O,n)},n.lt=function(O,n){return!X(O,n)},n.gt=b,n.le=function(O,n){return!b(O,n)},n.equal_null=function(O,n){return null!==n&&v(O,n)},n.equal_undefined=function(O,n){return void 0!==n&&v(O,n)},n.equal_nullable=function(O,n){return null!=n&&v(O,n)},n.min=function(O,n){return X(O,n)?n:O},n.max=function(O,n){return b(O,n)?O:n},n.to_float=w,n.of_float=k,n.div=E,n.mod_=function(O,n){return s(O,d(y(E(O,n),n)))},n.div_mod=function(O,n){var r=E(O,n);return[r,s(O,d(y(r,n)))]},n.compare=function(O,n){var r=i.caml_nativeint_compare(O[0],n[0]);return 0===r?i.caml_nativeint_compare(O[1],n[1]):r},n.to_hex=function(O){var n=function(O){return(O>>>0).toString(16)},r=O[0],t=O[1];if(0===r&&0===t)return"0";if(0!==t){if(0!==r){var i=n(O[1]),u=8-i.length|0;return u<=0?n(O[0])+i:n(O[0])+(e.repeat(u,"0")+i)}return n(O[1])}return n(O[0])+"00000000"},n.discard_sign=function(O){return[2147483647&O[0],O[1]]},n.float_of_bits=function(O){var n=new Int32Array([O[1],O[0]]);return new Float64Array(n.buffer)[0]},n.bits_of_float=function(O){var n=new Float64Array([O]),r=new Int32Array(n.buffer);return[r[1],r[0]>>>0]},n.get64=function(O,n){return[O.charCodeAt(n+4|0)<<32|O.charCodeAt(n+5|0)<<40|O.charCodeAt(n+6|0)<<48|O.charCodeAt(n+7|0)<<56,(O.charCodeAt(n)|O.charCodeAt(n+1|0)<<8|O.charCodeAt(n+2|0)<<16|O.charCodeAt(n+3|0)<<24)>>>0]}},function(O,n,r){"use strict";var t=String.prototype.repeat&&function(O,n){return n.repeat(O)}||function(O,n){if(0==n.length||0==O)return"";if(n.length*O>=1<<28)throw new RangeError("repeat count must not overflow maximum string size");for(var r="";1==(1&O)&&(r+=n),0!=(O>>>=1);)n+=n;return r};n.repeat=t},function(O,n,r){"use strict";var t=r(6);function e(O,n,r,t,e){if(e>0){if(O===r){var i=O,u=n,a=t,o=e;if(u<a){for(var c=(i.length-a|0)-1|0,f=o-1|0,_=c>f?f:c;_>=0;--_)i[a+_|0]=i[u+_|0];return 0}if(u>a){for(var l=(i.length-u|0)-1|0,s=o-1|0,m=l>s?s:l,v=0;v<=m;++v)i[a+v|0]=i[u+v|0];return 0}return 0}var d=O.length-n|0;if(e<=d){for(var g=0,h=e-1|0;g<=h;++g)r[t+g|0]=O[n+g|0];return 0}for(var p=0,y=d-1|0;p<=y;++p)r[t+p|0]=O[n+p|0];for(var X=d,b=e-1|0;X<=b;++X)r[t+X|0]=0;return 0}return 0}function i(O){var n=O,r=O.length,t="",i=r;if(r<=4096&&r===n.length)return String.fromCharCode.apply(null,n);for(var u=0;i>0;){var a=i<1024?i:1024,o=new Array(a);e(n,u,o,0,a),t+=String.fromCharCode.apply(null,o),i=i-a|0,u=u+a|0}return t}n.bytes_of_string=function(O){for(var n=O.length,r=new Array(n),t=0,e=n-1|0;t<=e;++t)r[t]=O.charCodeAt(t);return r},n.bytes_to_string=i,n.caml_is_printable=function(O){return O>31&&O<127},n.caml_string_of_char_array=function(O){for(var n=O.length,r=new Array(n),t=0,e=n-1|0;t<=e;++t)r[t]=O[t];return i(r)},n.caml_string_get=function(O,n){if(n>=O.length||n<0)throw[t.invalid_argument,"index out of bounds"];return O.charCodeAt(n)},n.caml_create_string=function(O){if(O<0)throw[t.invalid_argument,"String.create"];for(var n=new Array(O),r=0,e=O-1|0;r<=e;++r)n[r]=0;return n},n.caml_fill_string=function(O,n,r,t){if(r>0){for(var e=n,i=(r+n|0)-1|0;e<=i;++e)O[e]=t;return 0}return 0},n.caml_blit_string=function(O,n,r,t,e){if(e>0){var i=O.length-n|0;if(e<=i){for(var u=0,a=e-1|0;u<=a;++u)r[t+u|0]=O.charCodeAt(n+u|0);return 0}for(var o=0,c=i-1|0;o<=c;++o)r[t+o|0]=O.charCodeAt(n+o|0);for(var f=i,_=e-1|0;f<=_;++f)r[t+f|0]=0;return 0}return 0},n.caml_blit_bytes=e,n.caml_string_get16=function(O,n){return O.charCodeAt(n)+(O.charCodeAt(n+1|0)<<8)|0},n.caml_string_get32=function(O,n){return((O.charCodeAt(n)+(O.charCodeAt(n+1|0)<<8)|0)+(O.charCodeAt(n+2|0)<<16)|0)+(O.charCodeAt(n+3|0)<<24)|0},n.string_of_char=function(O){return String.fromCharCode(O)},n.get=function(O,n){if(n<0||n>=O.length)throw[t.invalid_argument,"index out of bounds"];return O.charCodeAt(n)}},function(O,n,r){"use strict";var t=[0];function e(){return t[0]+=1,t[0]}n.caml_set_oo_id=function(O){return O[1]=t[0],t[0]+=1,O},n.get_id=e,n.create=function(O){var n=[O,e()];return n.tag=248,n},n.isCamlExceptionOrOpenVariant=function(O){if(void 0===O)return!1;if(248===O.tag)return!0;var n=O[0];return void 0!==n&&248===n.tag}},function(O,n,r){"use strict";n.not_implemented=function(O){throw new Error(O+" not implemented by BuckleScript yet\n")}},function(O,n,r){"use strict";var t=r(8);n.concat_fmtty=function O(n,r){if("number"==typeof n)return r;switch(0|n.tag){case 0:return t.__(0,[O(n[0],r)]);case 1:return t.__(1,[O(n[0],r)]);case 2:return t.__(2,[O(n[0],r)]);case 3:return t.__(3,[O(n[0],r)]);case 4:return t.__(4,[O(n[0],r)]);case 5:return t.__(5,[O(n[0],r)]);case 6:return t.__(6,[O(n[0],r)]);case 7:return t.__(7,[O(n[0],r)]);case 8:return t.__(8,[n[0],O(n[1],r)]);case 9:return t.__(9,[n[0],n[1],O(n[2],r)]);case 10:return t.__(10,[O(n[0],r)]);case 11:return t.__(11,[O(n[0],r)]);case 12:return t.__(12,[O(n[0],r)]);case 13:return t.__(13,[O(n[0],r)]);case 14:return t.__(14,[O(n[0],r)])}},n.erase_rel=function O(n){if("number"==typeof n)return 0;switch(0|n.tag){case 0:return t.__(0,[O(n[0])]);case 1:return t.__(1,[O(n[0])]);case 2:return t.__(2,[O(n[0])]);case 3:return t.__(3,[O(n[0])]);case 4:return t.__(4,[O(n[0])]);case 5:return t.__(5,[O(n[0])]);case 6:return t.__(6,[O(n[0])]);case 7:return t.__(7,[O(n[0])]);case 8:return t.__(8,[n[0],O(n[1])]);case 9:var r=n[0];return t.__(9,[r,r,O(n[2])]);case 10:return t.__(10,[O(n[0])]);case 11:return t.__(11,[O(n[0])]);case 12:return t.__(12,[O(n[0])]);case 13:return t.__(13,[O(n[0])]);case 14:return t.__(14,[O(n[0])])}},n.concat_fmt=function O(n,r){if("number"==typeof n)return r;switch(0|n.tag){case 0:return t.__(0,[O(n[0],r)]);case 1:return t.__(1,[O(n[0],r)]);case 2:return t.__(2,[n[0],O(n[1],r)]);case 3:return t.__(3,[n[0],O(n[1],r)]);case 4:return t.__(4,[n[0],n[1],n[2],O(n[3],r)]);case 5:return t.__(5,[n[0],n[1],n[2],O(n[3],r)]);case 6:return t.__(6,[n[0],n[1],n[2],O(n[3],r)]);case 7:return t.__(7,[n[0],n[1],n[2],O(n[3],r)]);case 8:return t.__(8,[n[0],n[1],n[2],O(n[3],r)]);case 9:return t.__(9,[O(n[0],r)]);case 10:return t.__(10,[O(n[0],r)]);case 11:return t.__(11,[n[0],O(n[1],r)]);case 12:return t.__(12,[n[0],O(n[1],r)]);case 13:return t.__(13,[n[0],n[1],O(n[2],r)]);case 14:return t.__(14,[n[0],n[1],O(n[2],r)]);case 15:return t.__(15,[O(n[0],r)]);case 16:return t.__(16,[O(n[0],r)]);case 17:return t.__(17,[n[0],O(n[1],r)]);case 18:return t.__(18,[n[0],O(n[1],r)]);case 19:return t.__(19,[O(n[0],r)]);case 20:return t.__(20,[n[0],n[1],O(n[2],r)]);case 21:return t.__(21,[n[0],O(n[1],r)]);case 22:return t.__(22,[O(n[0],r)]);case 23:return t.__(23,[n[0],O(n[1],r)]);case 24:return t.__(24,[n[0],n[1],O(n[2],r)])}}},function(O,n,r){"use strict";var t=r(4),e=r(23),i=r(5),u=r(19),a=r(6);function o(O,n,r){for(var t=i.caml_make_vect(O,[]),e=0,u=O-1|0;e<=u;++e)t[e]=i.caml_make_vect(n,r);return t}function c(O){var n=O.length;return 0===n?[]:i.caml_array_sub(O,0,n)}function f(O,n,r,t,e){if(e<0||n<0||n>(O.length-e|0)||t<0||t>(r.length-e|0))throw[a.invalid_argument,"Array.blit"];return i.caml_array_blit(O,n,r,t,e)}var _=u.create("Array.Bottom");function l(O,n){var r=function(r,e,u,a,o,c,_){for(var l=r+e|0,s=a+o|0,m=r,v=i.caml_array_get(n,r),d=a,g=i.caml_array_get(u,a),h=_;;){var p=h,y=g,X=d,b=v,w=m;if(t._2(O,b,y)<=0){i.caml_array_set(c,p,b);var C=w+1|0;if(C<l){h=p+1|0,v=i.caml_array_get(n,C),m=C;continue}return f(u,X,c,p+1|0,s-X|0)}i.caml_array_set(c,p,y);var A=X+1|0;if(!(A<s))return f(n,w,c,p+1|0,l-w|0);h=p+1|0,g=i.caml_array_get(u,A),d=A}},e=function(r,e,u,a){for(var o=0,c=a-1|0;o<=c;++o){for(var f=i.caml_array_get(n,r+o|0),_=(u+o|0)-1|0;_>=u&&t._2(O,i.caml_array_get(e,_),f)>0;)i.caml_array_set(e,_+1|0,i.caml_array_get(e,_)),_=_-1|0;i.caml_array_set(e,_+1|0,f)}return 0},u=function(O,t,i,a){if(a<=5)return e(O,t,i,a);var o=a/2|0,c=a-o|0;return u(O+o|0,t,i+o|0,c),u(O,n,O+c|0,o),r(O+c|0,o,t,i+o|0,c,t,i)},a=n.length;if(a<=5)return e(0,n,0,a);var o=a/2|0,c=a-o|0,_=i.caml_make_vect(c,i.caml_array_get(n,0));return u(o,_,0,c),u(0,n,c,o),r(c,o,_,0,c,n,0)}var s=o,m=i.caml_array_concat,v=l;n.init=function(O,n){if(0===O)return[];if(O<0)throw[a.invalid_argument,"Array.init"];for(var r=i.caml_make_vect(O,t._1(n,0)),e=1,u=O-1|0;e<=u;++e)r[e]=t._1(n,e);return r},n.make_matrix=o,n.create_matrix=s,n.append=function(O,n){var r=O.length;return 0===r?c(n):0===n.length?i.caml_array_sub(O,0,r):O.concat(n)},n.concat=m,n.sub=function(O,n,r){if(r<0||n>(O.length-r|0))throw[a.invalid_argument,"Array.sub"];return i.caml_array_sub(O,n,r)},n.copy=c,n.fill=function(O,n,r,t){if(n<0||r<0||n>(O.length-r|0))throw[a.invalid_argument,"Array.fill"];for(var e=n,i=(n+r|0)-1|0;e<=i;++e)O[e]=t;return 0},n.blit=f,n.to_list=function(O){for(var n=O.length-1|0,r=0;;){var t=r,e=n;if(e<0)return t;r=[O[e],t],n=e-1|0}},n.of_list=function(O){if(!O)return[];for(var n=i.caml_make_vect(function(O,n){for(;;){var r=n,t=O;if(!r)return t;n=r[1],O=t+1|0}}(0,O),O[0]),r=1,t=O[1];;){var e=t,u=r;if(!e)return n;n[u]=e[0],t=e[1],r=u+1|0}},n.iter=function(O,n){for(var r=0,e=n.length-1|0;r<=e;++r)t._1(O,n[r]);return 0},n.map=function(O,n){var r=n.length;if(0===r)return[];for(var e=i.caml_make_vect(r,t._1(O,n[0])),u=1,a=r-1|0;u<=a;++u)e[u]=t._1(O,n[u]);return e},n.iteri=function(O,n){for(var r=0,e=n.length-1|0;r<=e;++r)t._2(O,r,n[r]);return 0},n.mapi=function(O,n){var r=n.length;if(0===r)return[];for(var e=i.caml_make_vect(r,t._2(O,0,n[0])),u=1,a=r-1|0;u<=a;++u)e[u]=t._2(O,u,n[u]);return e},n.fold_left=function(O,n,r){for(var e=n,i=0,u=r.length-1|0;i<=u;++i)e=t._2(O,e,r[i]);return e},n.fold_right=function(O,n,r){for(var e=r,i=n.length-1|0;i>=0;--i)e=t._2(O,n[i],e);return e},n.sort=function(O,n){for(var r=function(r,e){var u=1+((e+e|0)+e|0)|0,a=u;if((u+2|0)<r)return t._2(O,i.caml_array_get(n,u),i.caml_array_get(n,u+1|0))<0&&(a=u+1|0),t._2(O,i.caml_array_get(n,a),i.caml_array_get(n,u+2|0))<0&&(a=u+2|0),a;if((u+1|0)<r&&t._2(O,i.caml_array_get(n,u),i.caml_array_get(n,u+1|0))<0)return u+1|0;if(u<r)return u;throw[_,e]},u=function(u,a,o){try{for(var c=u,f=a,l=o;;){var s=f,m=r(c,s);if(!(t._2(O,i.caml_array_get(n,m),l)>0))return i.caml_array_set(n,s,l);i.caml_array_set(n,s,i.caml_array_get(n,m)),f=m}}catch(O){var v=e.internalToOCamlException(O);if(v[0]===_)return i.caml_array_set(n,v[1],o);throw v}},o=function(O,t){try{for(var u=O,a=t;;){var o=a,c=r(u,o);i.caml_array_set(n,o,i.caml_array_get(n,c)),a=c}}catch(O){var f=e.internalToOCamlException(O);if(f[0]===_)return f[1];throw f}},c=function(r,e){for(;;){var u=r,o=(u-1|0)/3|0;if(u===o)throw[a.assert_failure,["array.ml",173,4]];if(t._2(O,i.caml_array_get(n,o),e)<0){if(i.caml_array_set(n,u,i.caml_array_get(n,o)),o>0){r=o;continue}return i.caml_array_set(n,0,e)}return i.caml_array_set(n,u,e)}},f=n.length,l=((f+1|0)/3|0)-1|0;l>=0;--l)u(f,l,i.caml_array_get(n,l));for(var s=f-1|0;s>=2;--s){var m=i.caml_array_get(n,s);i.caml_array_set(n,s,i.caml_array_get(n,0)),c(o(s,0),m)}if(f>1){var v=i.caml_array_get(n,1);return i.caml_array_set(n,1,i.caml_array_get(n,0)),i.caml_array_set(n,0,v)}return 0},n.stable_sort=l,n.fast_sort=v},function(O,n,r){"use strict";var t=r(19),e=t.create("Js_exn.Error");n.$$Error=e,n.internalToOCamlException=function(O){return t.isCamlExceptionOrOpenVariant(O)?O:[e,O]},n.raiseError=function(O){throw new Error(O)},n.raiseEvalError=function(O){throw new EvalError(O)},n.raiseRangeError=function(O){throw new RangeError(O)},n.raiseReferenceError=function(O){throw new ReferenceError(O)},n.raiseSyntaxError=function(O){throw new SyntaxError(O)},n.raiseTypeError=function(O){throw new TypeError(O)},n.raiseUriError=function(O){throw new URIError(O)}},function(O,n,r){"use strict";var t=r(22),e=r(4),i=r(25),u=r(26),a=r(27),o=r(13),c=r(32),f=r(5),_=r(16),l=r(18),s=r(6);function m(O,n){return t.blit(n[0],0,O[0],0,55),O[1]=n[1],0}function v(O,n){for(var r=function(O,n){return a.string(O+String(n))},t=function(O){return((l.get(O,0)+(l.get(O,1)<<8)|0)+(l.get(O,2)<<16)|0)+(l.get(O,3)<<24)|0},e=0===n.length?[0]:n,i=e.length,u=0;u<=54;++u)f.caml_array_set(O[0],u,u);for(var o="x",c=0,_=54+(55>i?55:i)|0;c<=_;++c){var s=c%55,m=c%i;o=r(o,f.caml_array_get(e,m)),f.caml_array_set(O[0],s,1073741823&(f.caml_array_get(O[0],s)^t(o)))}return O[1]=0,0}function d(O){var n=[f.caml_make_vect(55,0),0];return v(n,O),n}function g(O){var n=[f.caml_make_vect(55,0),0];return m(n,O),n}function h(O){O[1]=(O[1]+1|0)%55;var n=f.caml_array_get(O[0],O[1]),r=1073741823&(f.caml_array_get(O[0],(O[1]+24|0)%55)+(n^n>>>25&31)|0);return f.caml_array_set(O[0],O[1],r),r}function p(O,n){if(n>1073741823||n<=0)throw[s.invalid_argument,"Random.int"];for(var r=O,t=n;;){var e=h(r),i=e%t;if(!((e-i|0)>(1+(1073741823-t|0)|0)))return i}}function y(O,n){if(n<=0)throw[s.invalid_argument,"Random.int32"];for(var r=O,t=n;;){var e=h(r)|(1&h(r))<<30,u=e%t;if(!((e-u|0)>(1+(i.max_int-t|0)|0)))return u}}function X(O,n){if(_.le(n,[0,0]))throw[s.invalid_argument,"Random.int64"];for(var r=O,t=n;;){var e=_.of_int32(h(r)),i=_.lsl_(_.of_int32(h(r)),30),a=_.lsl_(_.of_int32(7&h(r)),60),o=_.or_(e,[i[0]|a[0],(i[1]|a[1])>>>0]),c=_.mod_(o,t);if(!_.gt(_.sub(o,c),_.add(_.sub(u.max_int,t),[0,1])))return c}}var b=32===c.size?y:function(O,n){return 0|X(O,_.of_int32(n))[1]};function w(O){return(h(O)/1073741824+h(O))/1073741824}function C(O){return 0==(1&h(O))}var A=[[987910699,495797812,364182224,414272206,318284740,990407751,383018966,270373319,840823159,24560019,536292337,512266505,189156120,730249596,143776328,51606627,140166561,366354223,1003410265,700563762,981890670,913149062,526082594,1021425055,784300257,667753350,630144451,949649812,48546892,415514493,258888527,511570777,89983870,283659902,308386020,242688715,482270760,865188196,1027664170,207196989,193777847,619708188,671350186,149669678,257044018,87658204,558145612,183450813,28133145,901332182,710253903,510646120,652377910,409934019,801085050],0];function x(O){return v(A,O)}var k=[d,function(){return d(o.caml_sys_random_seed(0))},g,h,p,y,b,X,function(O,n){return w(O)*n},C];n.init=function(O){return v(A,[O])},n.full_init=x,n.self_init=function(){return x(o.caml_sys_random_seed(0))},n.bits=function(){return h(A)},n.$$int=function(O){return p(A,O)},n.int32=function(O){return y(A,O)},n.nativeint=function(O){return e._2(b,A,O)},n.int64=function(O){return X(A,O)},n.$$float=function(O){return w(A)*O},n.bool=function(){return C(A)},n.State=k,n.get_state=function(){return g(A)},n.set_state=function(O){return m(A,O)}},function(O,n,r){"use strict";var t=r(14);var e=r(9).caml_int32_compare;n.zero=0,n.one=1,n.minus_one=-1,n.succ=function(O){return O+1|0},n.pred=function(O){return O-1|0},n.abs=function(O){return O>=0?O:0|-O},n.max_int=2147483647,n.min_int=-2147483648,n.lognot=function(O){return-1^O},n.to_string=function(O){return t.caml_int32_format("%d",O)},n.compare=e},function(O,n,r){"use strict";var t=r(16),e=r(14);var i=t.compare;n.zero=[0,0],n.one=[0,1],n.minus_one=[-1,4294967295],n.succ=function(O){return t.add(O,[0,1])},n.pred=function(O){return t.sub(O,[0,1])},n.abs=function(O){return t.ge(O,[0,0])?O:t.neg(O)},n.max_int=[2147483647,4294967295],n.min_int=[-2147483648,0],n.lognot=function(O){return t.xor(O,[-1,4294967295])},n.to_string=function(O){return e.caml_int64_format("%d",O)},n.compare=i},function(O,n,r){"use strict";var t=r(28),e=r(29),i=r(31),u=r(10),a=r(18),o=r(20),c=r(6);function f(O){return i.caml_md5_string(O,0,O.length)}function _(O,n,r){if(n<0||r<0||n>(O.length-r|0))throw[c.invalid_argument,"Digest.substring"];return i.caml_md5_string(O,n,r)}var l=u.output_string;function s(O){return O+(O<10?48:87)|0}var m=e.compare;n.compare=m,n.string=f,n.bytes=function(O){return f(a.bytes_to_string(O))},n.substring=_,n.subbytes=function(O,n,r){return _(a.bytes_to_string(O),n,r)},n.file=function(O){u.open_in_bin(O);var n,r=0;try{n=o.not_implemented("caml_md5_chan"),r=1}catch(O){throw o.not_implemented("caml_ml_close_channel"),O}if(1===r)return o.not_implemented("caml_ml_close_channel"),n},n.output=l,n.input=function(O){return u.really_input_string(O,16)},n.to_hex=function(O){for(var n=a.caml_create_string(32),r=0;r<=15;++r){var t=a.get(O,r);n[r<<1]=s(t>>>4),n[1+(r<<1)|0]=s(15&t)}return a.bytes_to_string(n)},n.from_hex=function(O){if(32!==O.length)throw[c.invalid_argument,"Digest.from_hex"];for(var n=function(O){if(O>=65){if(O>=97){if(O>=103)throw[c.invalid_argument,"Digest.from_hex"];return 10+(O-97|0)|0}if(O>=71)throw[c.invalid_argument,"Digest.from_hex"];return 10+(O-65|0)|0}if(O>57||O<48)throw[c.invalid_argument,"Digest.from_hex"];return O-48|0},r=function(r){return(n(a.get(O,r))<<4)+n(a.get(O,r+1|0))|0},e=a.caml_create_string(16),i=0;i<=15;++i)e[i]=t.chr(r(i<<1));return a.bytes_to_string(e)}},function(O,n,r){"use strict";var t=r(18),e=r(6);n.chr=function(O){if(O<0||O>255)throw[e.invalid_argument,"Char.chr"];return O},n.escaped=function(O){var n=0;if(O>=40){if(92===O)return"\\\\";n=O>=127?1:2}else if(O>=32){if(O>=39)return"\\'";n=2}else if(O>=14)n=1;else switch(O){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 11:case 12:n=1;break;case 13:return"\\r"}switch(n){case 1:var r=t.caml_create_string(4);return r[0]=92,r[1]=48+(O/100|0)|0,r[2]=48+(O/10|0)%10|0,r[3]=48+O%10|0,t.bytes_to_string(r);case 2:var e=t.caml_create_string(1);return e[0]=O,t.bytes_to_string(e)}},n.lowercase=function(O){return O>=65&&O<=90||O>=192&&O<=214||O>=216&&O<=222?O+32|0:O},n.uppercase=function(O){return O>=97&&O<=122||O>=224&&O<=246||O>=248&&O<=254?O-32|0:O},n.compare=function(O,n){return O-n|0}},function(O,n,r){"use strict";var t=r(3),e=r(30),i=r(15),u=r(18);function a(O){var n=O-9|0;return n>4||n<0?23===n:2!==n}var o=r(9).caml_string_compare,c=e.fill,f=e.blit_string;n.make=function(O,n){return u.bytes_to_string(e.make(O,n))},n.init=function(O,n){return u.bytes_to_string(e.init(O,n))},n.copy=function(O){return u.bytes_to_string(e.copy(u.bytes_of_string(O)))},n.sub=function(O,n,r){return u.bytes_to_string(e.sub(u.bytes_of_string(O),n,r))},n.fill=c,n.blit=f,n.concat=function(O,n){if(n){var r=n[0],e=[0],a=[0];t.iter(function(O){return e[0]=e[0]+1|0,a[0]=a[0]+O.length|0,0},n);var o=u.caml_create_string(a[0]+i.imul(O.length,e[0]-1|0)|0);u.caml_blit_string(r,0,o,0,r.length);var c=[r.length];return t.iter(function(n){return u.caml_blit_string(O,0,o,c[0],O.length),c[0]=c[0]+O.length|0,u.caml_blit_string(n,0,o,c[0],n.length),c[0]=c[0]+n.length|0,0},n[1]),u.bytes_to_string(o)}return""},n.iter=function(O,n){return e.iter(O,u.bytes_of_string(n))},n.iteri=function(O,n){return e.iteri(O,u.bytes_of_string(n))},n.map=function(O,n){return u.bytes_to_string(e.map(O,u.bytes_of_string(n)))},n.mapi=function(O,n){return u.bytes_to_string(e.mapi(O,u.bytes_of_string(n)))},n.trim=function(O){return""===O||!a(O.charCodeAt(0))&&!a(O.charCodeAt(O.length-1|0))?O:u.bytes_to_string(e.trim(u.bytes_of_string(O)))},n.escaped=function(O){return function(n){for(;;){var r=n;if(r>=O.length)return!1;var t=O.charCodeAt(r);if(!(t>=32))return!0;var e=t-34|0;if(e>58||e<0){if(e>=93)return!0;n=r+1|0}else{if(e>57||e<1)return!0;n=r+1|0}}}(0)?u.bytes_to_string(e.escaped(u.bytes_of_string(O))):O},n.index=function(O,n){return e.index(u.bytes_of_string(O),n)},n.rindex=function(O,n){return e.rindex(u.bytes_of_string(O),n)},n.index_from=function(O,n,r){return e.index_from(u.bytes_of_string(O),n,r)},n.rindex_from=function(O,n,r){return e.rindex_from(u.bytes_of_string(O),n,r)},n.contains=function(O,n){return e.contains(u.bytes_of_string(O),n)},n.contains_from=function(O,n,r){return e.contains_from(u.bytes_of_string(O),n,r)},n.rcontains_from=function(O,n,r){return e.rcontains_from(u.bytes_of_string(O),n,r)},n.uppercase=function(O){return u.bytes_to_string(e.uppercase(u.bytes_of_string(O)))},n.lowercase=function(O){return u.bytes_to_string(e.lowercase(u.bytes_of_string(O)))},n.capitalize=function(O){return u.bytes_to_string(e.capitalize(u.bytes_of_string(O)))},n.uncapitalize=function(O){return u.bytes_to_string(e.uncapitalize(u.bytes_of_string(O)))},n.compare=o},function(O,n,r){"use strict";var t=r(28),e=r(3),i=r(4),u=r(7),a=r(15),o=r(18),c=r(9),f=r(6);var _=[];function l(O){var n=O.length,r=o.caml_create_string(n);return o.caml_blit_bytes(O,0,r,0,n),r}function s(O,n,r){if(n<0||r<0||n>(O.length-r|0))throw[f.invalid_argument,"String.sub / Bytes.sub"];var t=o.caml_create_string(r);return o.caml_blit_bytes(O,n,t,0,r),t}function m(O){var n=O-9|0;return n>4||n<0?23===n:2!==n}function v(O,n){var r=n.length;if(0===r)return n;for(var t=o.caml_create_string(r),e=0,u=r-1|0;e<=u;++e)t[e]=i._1(O,n[e]);return t}function d(O,n){if(0===n.length)return n;var r=l(n);return r[0]=i._1(O,n[0]),r}function g(O,n,r,t){for(;;){var e=r;if(e>=n)throw f.not_found;if(O[e]===t)return e;r=e+1|0}}function h(O,n,r){for(;;){var t=n;if(t<0)throw f.not_found;if(O[t]===r)return t;n=t-1|0}}function p(O,n,r){var t=O.length;if(n<0||n>t)throw[f.invalid_argument,"String.contains_from / Bytes.contains_from"];try{return g(O,t,n,r),!0}catch(O){if(O===f.not_found)return!1;throw O}}var y=u.caml_compare,X=o.bytes_to_string,b=o.bytes_of_string;n.make=function(O,n){var r=o.caml_create_string(O);return o.caml_fill_string(r,0,O,n),r},n.init=function(O,n){for(var r=o.caml_create_string(O),t=0,e=O-1|0;t<=e;++t)r[t]=i._1(n,t);return r},n.empty=_,n.copy=l,n.of_string=function(O){return l(o.bytes_of_string(O))},n.to_string=function(O){return o.bytes_to_string(l(O))},n.sub=s,n.sub_string=function(O,n,r){return o.bytes_to_string(s(O,n,r))},n.extend=function(O,n,r){var t=(O.length+n|0)+r|0,e=o.caml_create_string(t),i=n<0?[0|-n,0]:[0,n],u=i[1],a=i[0],f=c.caml_int_min(O.length-a|0,t-u|0);return f>0&&o.caml_blit_bytes(O,a,e,u,f),e},n.fill=function(O,n,r,t){if(n<0||r<0||n>(O.length-r|0))throw[f.invalid_argument,"String.fill / Bytes.fill"];return o.caml_fill_string(O,n,r,t)},n.blit=function(O,n,r,t,e){if(e<0||n<0||n>(O.length-e|0)||t<0||t>(r.length-e|0))throw[f.invalid_argument,"Bytes.blit"];return o.caml_blit_bytes(O,n,r,t,e)},n.blit_string=function(O,n,r,t,e){if(e<0||n<0||n>(O.length-e|0)||t<0||t>(r.length-e|0))throw[f.invalid_argument,"String.blit / Bytes.blit_string"];return o.caml_blit_string(O,n,r,t,e)},n.concat=function(O,n){if(n){var r=n[0],t=[0],i=[0];e.iter(function(O){return t[0]=t[0]+1|0,i[0]=i[0]+O.length|0,0},n);var u=o.caml_create_string(i[0]+a.imul(O.length,t[0]-1|0)|0);o.caml_blit_bytes(r,0,u,0,r.length);var c=[r.length];return e.iter(function(n){return o.caml_blit_bytes(O,0,u,c[0],O.length),c[0]=c[0]+O.length|0,o.caml_blit_bytes(n,0,u,c[0],n.length),c[0]=c[0]+n.length|0,0},n[1]),u}return _},n.cat=function(O,n){var r=O.length,t=n.length,e=o.caml_create_string(r+t|0);return o.caml_blit_bytes(O,0,e,0,r),o.caml_blit_bytes(n,0,e,r,t),e},n.iter=function(O,n){for(var r=0,t=n.length-1|0;r<=t;++r)i._1(O,n[r]);return 0},n.iteri=function(O,n){for(var r=0,t=n.length-1|0;r<=t;++r)i._2(O,r,n[r]);return 0},n.map=v,n.mapi=function(O,n){var r=n.length;if(0===r)return n;for(var t=o.caml_create_string(r),e=0,u=r-1|0;e<=u;++e)t[e]=i._2(O,e,n[e]);return t},n.trim=function(O){for(var n=O.length,r=0;r<n&&m(O[r]);)r=r+1|0;for(var t=n-1|0;t>=r&&m(O[t]);)t=t-1|0;return t>=r?s(O,r,1+(t-r|0)|0):_},n.escaped=function(O){for(var n=0,r=0,t=O.length-1|0;r<=t;++r){var e,i=O[r];if(i>=32){var u=i-34|0;e=u>58||u<0?u>=93?4:1:u>57||u<1?2:1}else e=i>=11?13!==i?4:2:i>=8?2:4;n=n+e|0}if(n===O.length)return l(O);var a=o.caml_create_string(n);n=0;for(var c=0,f=O.length-1|0;c<=f;++c){var _=O[c],s=0;if(_>=35)92!==_?_>=127?s=1:a[n]=_:s=2;else if(_>=32)_>=34?s=2:a[n]=_;else if(_>=14)s=1;else switch(_){case 8:a[n]=92,a[n=n+1|0]=98;break;case 9:a[n]=92,a[n=n+1|0]=116;break;case 10:a[n]=92,a[n=n+1|0]=110;break;case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 11:case 12:s=1;break;case 13:a[n]=92,a[n=n+1|0]=114}switch(s){case 1:a[n]=92,a[n=n+1|0]=48+(_/100|0)|0,a[n=n+1|0]=48+(_/10|0)%10|0,a[n=n+1|0]=48+_%10|0;break;case 2:a[n]=92,a[n=n+1|0]=_}n=n+1|0}return a},n.index=function(O,n){return g(O,O.length,0,n)},n.rindex=function(O,n){return h(O,O.length-1|0,n)},n.index_from=function(O,n,r){var t=O.length;if(n<0||n>t)throw[f.invalid_argument,"String.index_from / Bytes.index_from"];return g(O,t,n,r)},n.rindex_from=function(O,n,r){if(n<-1||n>=O.length)throw[f.invalid_argument,"String.rindex_from / Bytes.rindex_from"];return h(O,n,r)},n.contains=function(O,n){return p(O,0,n)},n.contains_from=p,n.rcontains_from=function(O,n,r){if(n<0||n>=O.length)throw[f.invalid_argument,"String.rcontains_from / Bytes.rcontains_from"];try{return h(O,n,r),!0}catch(O){if(O===f.not_found)return!1;throw O}},n.uppercase=function(O){return v(t.uppercase,O)},n.lowercase=function(O){return v(t.lowercase,O)},n.capitalize=function(O){return d(t.uppercase,O)},n.uncapitalize=function(O){return d(t.lowercase,O)},n.compare=y,n.unsafe_to_string=X,n.unsafe_of_string=b},function(O,n,r){"use strict";function t(O,n,r,t,e,i){var u=((n+O|0)+t|0)+i|0;return(u<<e|u>>>(32-e|0)|0)+r|0}function e(O,n,r,e,i,u,a){return t(n&r|(-1^n)&e,O,n,i,u,a)}function i(O,n,r,e,i,u,a){return t(n&e|r&(-1^e),O,n,i,u,a)}function u(O,n,r,e,i,u,a){return t(n^r^e,O,n,i,u,a)}function a(O,n,r,e,i,u,a){return t(r^(n|-1^e),O,n,i,u,a)}function o(O,n){var r=O[0],t=O[1],o=O[2],c=O[3];return t=a(t=a(t=a(t=a(t=u(t=u(t=u(t=u(t=i(t=i(t=i(t=i(t=e(t=e(t=e(t=e(t,o=e(o,c=e(c,r=e(r,t,o,c,n[0],7,-680876936),t,o,n[1],12,-389564586),r,t,n[2],17,606105819),c,r,n[3],22,-1044525330),o=e(o,c=e(c,r=e(r,t,o,c,n[4],7,-176418897),t,o,n[5],12,1200080426),r,t,n[6],17,-1473231341),c,r,n[7],22,-45705983),o=e(o,c=e(c,r=e(r,t,o,c,n[8],7,1770035416),t,o,n[9],12,-1958414417),r,t,n[10],17,-42063),c,r,n[11],22,-1990404162),o=e(o,c=e(c,r=e(r,t,o,c,n[12],7,1804603682),t,o,n[13],12,-40341101),r,t,n[14],17,-1502002290),c,r,n[15],22,1236535329),o=i(o,c=i(c,r=i(r,t,o,c,n[1],5,-165796510),t,o,n[6],9,-1069501632),r,t,n[11],14,643717713),c,r,n[0],20,-373897302),o=i(o,c=i(c,r=i(r,t,o,c,n[5],5,-701558691),t,o,n[10],9,38016083),r,t,n[15],14,-660478335),c,r,n[4],20,-405537848),o=i(o,c=i(c,r=i(r,t,o,c,n[9],5,568446438),t,o,n[14],9,-1019803690),r,t,n[3],14,-187363961),c,r,n[8],20,1163531501),o=i(o,c=i(c,r=i(r,t,o,c,n[13],5,-1444681467),t,o,n[2],9,-51403784),r,t,n[7],14,1735328473),c,r,n[12],20,-1926607734),o=u(o,c=u(c,r=u(r,t,o,c,n[5],4,-378558),t,o,n[8],11,-2022574463),r,t,n[11],16,1839030562),c,r,n[14],23,-35309556),o=u(o,c=u(c,r=u(r,t,o,c,n[1],4,-1530992060),t,o,n[4],11,1272893353),r,t,n[7],16,-155497632),c,r,n[10],23,-1094730640),o=u(o,c=u(c,r=u(r,t,o,c,n[13],4,681279174),t,o,n[0],11,-358537222),r,t,n[3],16,-722521979),c,r,n[6],23,76029189),o=u(o,c=u(c,r=u(r,t,o,c,n[9],4,-640364487),t,o,n[12],11,-421815835),r,t,n[15],16,530742520),c,r,n[2],23,-995338651),o=a(o,c=a(c,r=a(r,t,o,c,n[0],6,-198630844),t,o,n[7],10,1126891415),r,t,n[14],15,-1416354905),c,r,n[5],21,-57434055),o=a(o,c=a(c,r=a(r,t,o,c,n[12],6,1700485571),t,o,n[3],10,-1894986606),r,t,n[10],15,-1051523),c,r,n[1],21,-2054922799),o=a(o,c=a(c,r=a(r,t,o,c,n[8],6,1873313359),t,o,n[15],10,-30611744),r,t,n[6],15,-1560198380),c,r,n[13],21,1309151649),o=a(o,c=a(c,r=a(r,t,o,c,n[4],6,-145523070),t,o,n[11],10,-1120210379),r,t,n[2],15,718787259),c,r,n[9],21,-343485551),O[0]=r+O[0]|0,O[1]=t+O[1]|0,O[2]=o+O[2]|0,O[3]=c+O[3]|0,0}var c=[1732584193,-271733879,-1732584194,271733878],f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];n.caml_md5_string=function(O,n,r){var t=O.slice(n,r),e=t.length;c[0]=1732584193,c[1]=-271733879,c[2]=-1732584194,c[3]=271733878;for(var i=0;i<=15;++i)f[i]=0;for(var u=e/64|0,a=1;a<=u;++a){for(var _=0;_<=15;++_){var l=((a<<6)-64|0)+(_<<2)|0;f[_]=((t.charCodeAt(l)+(t.charCodeAt(l+1|0)<<8)|0)+(t.charCodeAt(l+2|0)<<16)|0)+(t.charCodeAt(l+3|0)<<24)|0}o(c,f)}for(var s=t.slice(u<<6),m=0;m<=15;++m)f[m]=0;for(var v=s.length-1|0,d=0;d<=v;++d)f[d/4|0]=f[d/4|0]|s.charCodeAt(d)<<(d%4<<3);var g=v+1|0;if(f[g/4|0]=f[g/4|0]|128<<(g%4<<3),g>55){o(c,f);for(var h=0;h<=15;++h)f[h]=0}return f[14]=e<<3,o(c,f),String.fromCharCode(255&c[0],c[0]>>8&255,c[0]>>16&255,c[0]>>24&255,255&c[1],c[1]>>8&255,c[1]>>16&255,c[1]>>24&255,255&c[2],c[2]>>8&255,c[2]>>16&255,c[2]>>24&255,255&c[3],c[3]>>8&255,c[3]>>16&255,c[3]>>24&255)}},function(O,n,r){"use strict";var t=r(14);var e=r(9).caml_nativeint_compare;n.zero=0,n.one=1,n.minus_one=-1,n.succ=function(O){return O+1},n.pred=function(O){return O-1},n.abs=function(O){return O>=0?O:-O},n.size=54,n.max_int=9007199254740991,n.min_int=-9007199254740991,n.lognot=function(O){return-1^O},n.to_string=function(O){return t.caml_nativeint_format("%d",O)},n.compare=e},function(O,n,r){"use strict";var t=r(34),e=r(3),i=r(37),u=r(4),a=r(39),o=r(40),c=r(6);function f(O,n,r){var t=[O],i=[[function(){return console.log("INVALID enqueue CALL!"),0}]],a=u._1(n,i),o=[0],f=function(O){var n=o[0];if(n)return o[0]=[[O,n[0]]],0;o[0]=[0];var r=u._2(a[2],t[0],O);t[0]=r;var i=o[0];if(i){var _=i[0];return _?(o[0]=0,e.iter(f,e.rev(_))):(o[0]=0,0)}throw[c.failure,"INVALID message queue state, should never be None during message processing!"]},_=[f];i[0]=_;return u._1(a[0],0),{pushMsg:f,shutdown:function(){i[0]=[function(){return console.log("INVALID message enqueued when shut down"),0}];var O=u._1(r,t[0]);return u._1(a[3],O),0},getHtmlString:function(){return u._1(a[1],t[0])}}}function _(O,n,r,t,e,c){if(c){var f=c[0];return function(c){var _=[0],l=[t],s=[0],m=function(){if(s[0]){var O=[u._1(n,l[0]),0],r=i.patchVNodesIntoElement(c,f,_[0],O);return _[0]=r,s[0]=0,0}return 0},v=function(){for(;f.childNodes.length>0;){var O=f.firstChild;null!==O&&f.removeChild(O)}return 0},d=[0],g=function(O){var n=u._1(r,O);return d[0]=o.run(c,c,d[0],n),0};return[function(){return v(),a.run(c,e),g(l[0]),s[0]=[-1],m(),0},function(O){return i.renderToHtmlString(u._1(n,O))},function(n,r){var t=u._2(O,n,r),e=t[0];return l[0]=e,a.run(c,t[1]),!s[0]&&(s[0]=[-1],m()),g(e),e},function(O){return s[0]=0,a.run(c,O),d[0]=o.run(c,c,d[0],0),_[0]=0,v(),0}]}}return function(c){var f=[0],_=function(O){var n=u._1(r,O);return f[0]=o.run(c,c,f[0],n),0};return[function(){return a.run(c,e),_(t),0},function(O){return i.renderToHtmlString(u._1(n,O))},function(n,r){var t=u._2(O,n,r),e=t[0];return a.run(c,t[1]),_(e),e},function(O){return a.run(c,O),f[0]=o.run(c,c,f[0],0),0}]}}function l(O,n,r){t.polyfills(0);var e=u._1(O[0],r),i=e[0],a=null==n?0:[n];return f(i,_(O[1],O[2],O[3],i,e[1],a),O[4])}function s(O,n,r){return l([O[0],O[1],O[2],O[3],function(){return 0}],n,r)}var m=i.map;n.programStateWrapper=f,n.programLoop=_,n.program=l,n.standardProgram=s,n.beginnerProgram=function(O,n,r){var t=O[1],e=O[0];return s([function(){return[e,0]},function(O,n){return[u._2(t,O,n),0]},O[2],function(){return 0}],n,0)},n.map=m},function(O,n,r){"use strict";var t=r(35),e=r(36);n.Event=0,n.Node=0,n.Document=0,n.$$Date=0,n.Window=0,n.Location=0,n.Json=0,n.$$XMLHttpRequest=0,n.FormData=0,n.polyfills=function(){return t.remove_polyfill(0),e.requestAnimationFrame_polyfill(0),0}},function(O,n,r){"use strict";function t(O,n,r){return O.style[n]=r,0}n.style=function(O){return O.style},n.getStyle=function(O,n){return O.style[n]},n.setStyle=t,n.setStyleProperty=function(O,n,r,e){var i=!!n&&n[0],u=O.style;return void 0!==u.setProperty?u.setProperty(r,e,i?"important":null):t(O,r,e)},n.childNodes=function(O){return O.childNodes},n.firstChild=function(O){return O.firstChild},n.appendChild=function(O,n){return O.appendChild(n)},n.removeChild=function(O,n){return O.removeChild(n)},n.insertBefore=function(O,n,r){return O.insertBefore(n,r)},n.remove=function(O,n){return O.remove(n)},n.setAttributeNS=function(O,n,r,t){return O.setAttributeNS(n,r,t)},n.setAttribute=function(O,n,r){return O.setAttribute(n,r)},n.setAttributeNsOptional=function(O,n,r,t){return""===n?O.setAttribute(r,t):O.setAttributeNS(n,r,t)},n.removeAttributeNS=function(O,n,r){return O.removeAttributeNS(n,r)},n.removeAttribute=function(O,n){return O.removeAttribute(n)},n.removeAttributeNsOptional=function(O,n,r){return""===n?O.removeAttribute(r):O.removeAttributeNS(n,r)},n.addEventListener=function(O,n,r,t){return O.addEventListener(n,r,t)},n.removeEventListener=function(O,n,r,t){return O.removeEventListener(n,r,t)},n.focus=function(O){return O.focus()},n.set_nodeValue=function(O,n){return O.nodeValue=n,0},n.get_nodeValue=function(O){return O.nodeValue},n.remove_polyfill=function(){"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)})}},function(O,n,r){"use strict";n.History=0,n.LocalStorage=0,n.history=function(){return window.history},n.localStorage=function(){return window.localStorage},n.$$location=function(){return window.location},n.requestAnimationFrame=function(O){return window.requestAnimationFrame(O)},n.cancelAnimationFrame=function(O){return window.cancelAnimationFrame(O)},n.$$clearTimeout=function(O){return window.clearTimeout(O)},n.$$setInterval=function(O,n){return window.setInterval(O,n)},n.$$setTimeout=function(O,n){return window.setTimeout(O,n)},n.addEventListener=function(O,n,r){return window.addEventListener(O,n,r)},n.removeEventListener=function(O,n,r){return window.removeEventListener(O,n,r)},n.requestAnimationFrame_polyfill=function(){return function(){for(var O=0,n=["ms","moz","webkit","o"],r=0;r<n.length&&!window.requestAnimationFrame;++r)window.requestAnimationFrame=window[n[r]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n[r]+"CancelAnimationFrame"]||window[n[r]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(n,r){var t=(new Date).getTime(),e=Math.max(0,16-(t-O)),i=window.setTimeout(function(){n(t+e)},e);return O=t+e,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(O){clearTimeout(O)})}()}},function(O,n,r){"use strict";var t=r(3),e=r(8),i=r(4),u=r(29),a=r(7),o=r(35),c=r(5),f=r(38),_=r(6),l=e.__(0,[""]);function s(O,n,r,t,i,u){return e.__(2,[O,n,r,t,i,u])}function m(O,n){return function(r){var t=i._1(n[0],r);return t?i._1(O[0][0],t[0]):0}}function v(O){if(O.tag){var n=O[0];return function(){return[n]}}return O[1]}function d(O,n){return n.tag?!(!O.tag||!a.caml_equal(n[0],O[0])):!O.tag&&n[0]===O[0]}function g(O,n,r,t){var e=[v(t)],i=m(O,e);return o.addEventListener(n,r,i,!1),[[i,e]]}function h(O,n,r){return r?(o.removeEventListener(O,n,r[0][0],!1),0):0}function p(O,n,r,t,e,i,u,a){var o=u[0];if(o){if(r===t){if(a[0]=u[0],d(e,i))return 0;var c=v(i);return o[0][1][0]=c,0}return u[0]=h(n,r,u[0]),a[0]=g(O,n,t,i),0}return a[0]=g(O,n,t,i),0}function y(O,n,r,e){if("number"==typeof e)return 0;switch(0|e.tag){case 0:return n[e[0]]=e[1],0;case 1:return o.setAttributeNsOptional(n,e[0],e[1],e[2]);case 2:throw console.log(["TODO: Add Data Unhandled",e[0],e[1]]),[_.failure,"TODO: Add Data Unhandled"];case 3:return e[2][0]=g(O,n,e[0],e[1]),0;case 4:return t.fold_left(function(O,r){return o.setStyleProperty(n,0,r[0],r[1])},0,e[0])}}function X(O,n,r,e){if("number"==typeof e)return 0;switch(0|e.tag){case 0:return n[e[0]]=void 0,0;case 1:return o.removeAttributeNsOptional(n,e[0],e[1]);case 2:throw console.log(["TODO: Remove Data Unhandled",e[0],e[1]]),[_.failure,"TODO: Remove Data Unhandled"];case 3:var i=e[2];return i[0]=h(n,e[0],i[0]),0;case 4:return t.fold_left(function(O,r){return o.setStyleProperty(n,0,r[0],null)},0,e[0])}}function b(O,n,r,t,e){return X(0,n,0,t),y(O,n,0,e),0}function w(O,n,r,e,i){if("number"==typeof i)throw[_.failure,"This should never be called as all entries through NoProp are gated."];switch(0|i.tag){case 0:return n[i[0]]=i[1],0;case 1:return o.setAttributeNsOptional(n,i[0],i[1],i[2]);case 2:throw console.log(["TODO: Mutate Data Unhandled",i[0],i[1]]),[_.failure,"TODO: Mutate Data Unhandled"];case 3:throw[_.failure,"This will never be called because it is gated"];case 4:if("number"==typeof e)throw[_.failure,"Passed a non-Style to a new Style as a Mutations while the old Style is not actually a style!"];if(4===e.tag)return t.fold_left2(function(O,r,t){var e=t[1],i=t[0],u=r[0];return u===i?r[1]===e?0:o.setStyleProperty(n,0,i,e):(o.setStyleProperty(n,0,u,null),o.setStyleProperty(n,0,i,e))},0,e[0],i[0]);throw[_.failure,"Passed a non-Style to a new Style as a Mutations while the old Style is not actually a style!"]}}function C(O,n,r,t,e){for(;;){var i=e,u=t,o=r;if(!u)return!i;var c=u[0],f=0;if(!i)return!1;if("number"==typeof c){if("number"==typeof i[0]){e=i[1],t=u[1],r=o+1|0;continue}f=1}else switch(0|c.tag){case 0:var _=i[0];if("number"!=typeof _&&!_.tag){c[0]===_[0]&&c[1]===_[1]||w(0,n,0,c,_),e=i[1],t=u[1],r=o+1|0;continue}f=1;break;case 1:var l=i[0];if("number"!=typeof l&&1===l.tag){c[0]===l[0]&&c[1]===l[1]&&c[2]===l[2]||w(0,n,0,c,l),e=i[1],t=u[1],r=o+1|0;continue}f=1;break;case 2:var s=i[0];if("number"!=typeof s&&2===s.tag){c[0]===s[0]&&c[1]===s[1]||w(0,n,0,c,s),e=i[1],t=u[1],r=o+1|0;continue}f=1;break;case 3:var m=i[0];if("number"!=typeof m&&3===m.tag){p(O,n,c[0],m[0],c[1],m[1],c[2],m[2]),e=i[1],t=u[1],r=o+1|0;continue}f=1;break;case 4:var v=i[0];if("number"!=typeof v&&4===v.tag){a.caml_equal(c[0],v[0])||w(0,n,0,c,v),e=i[1],t=u[1],r=o+1|0;continue}f=1}1!==f||(b(O,n,0,c,i[0]),e=i[1],t=u[1],r=o+1|0)}}function A(O,n,r,t){return C(O,n,0,r,t)}function x(O,n,r,e,i){if(2===i.tag){var u=i[4],a=c.caml_array_get(r,e),l=f.createElementNsOptional(i[0],i[1]);if(A(O,l,t.map(function(){return 0},u),u))return S(O,l,l.childNodes,0,0,i[5]),o.insertBefore(n,l,a),n.removeChild(a),0;throw[_.match_failure,["vdom.ml",319,30]]}throw[_.failure,"Node replacement should never be passed anything but a node itself"]}function k(O,n){for(;;){var r=n,e=O;switch(0|r.tag){case 0:var u=r[0];return document.createComment(u);case 1:var a=r[0];return document.createTextNode(a);case 2:var o=r[4],c=f.createElementNsOptional(r[0],r[1]);if(A(e,c,t.map(function(){return 0},o),o))return S(e,c,c.childNodes,0,0,r[5]),c;throw[_.match_failure,["vdom.ml",333,30]];case 3:var l=i._1(r[1],0);r[2][0]=l,n=l;continue;case 4:n=r[1],O=i._1(r[0],e);continue}}}function E(O,n,r,t,e,i){if(2===e.tag){if(2===i.tag){if(e[3]!==i[3]||e[1]!==i[1])return x(O,n,r,t,i);var u=c.caml_array_get(r,t),a=u.childNodes;return A(O,u,e[4],i[4])||(console.log("VDom: Failed swapping properties because the property list length changed, use `noProp` to swap properties instead, not by altering the list structure. This is a massive inefficiency until this issue is resolved."),x(O,n,r,t,i)),S(O,u,a,0,e[5],i[5])}throw[_.failure,"Non-node passed to patchVNodesOnElems_MutateNode"]}throw[_.failure,"Non-node passed to patchVNodesOnElems_MutateNode"]}function S(O,n,r,t,e,u){for(;;){var a=u,f=e,_=t;if(!f){if(a){var l=k(O,a[0]);n.appendChild(l),u=a[1],e=0,t=_+1|0;continue}return 0}var s=f[0],m=0;switch(0|s.tag){case 0:if(a){var v=a[0];if(!v.tag&&s[0]===v[0]){u=a[1],e=f[1],t=_+1|0;continue}m=1}else m=1;break;case 1:if(a){var d=a[0];if(1===d.tag){var g=d[0];if(s[0]!==g)c.caml_array_get(r,_).nodeValue=g;u=a[1],e=f[1],t=_+1|0;continue}m=1}else m=1;break;case 2:if(a){var h=a[0];if(2===h.tag){var p=a[1],y=h[2],X=h[1],b=h[0],w=f[1],C=s[2],A=s[1],x=s[0];if(C===y&&""!==C){u=p,e=w,t=_+1|0;continue}if(""===C||""===y){E(O,n,r,_,s,h),u=p,e=w,t=_+1|0;continue}var N=0,M=0;if(w){var L=w[0];if(2===L.tag){var T=w[1],q=L[2],P=L[1],$=L[0],B=0;if(p){var F=p[0];if(2===F.tag&&$===b&&P===X&&q===y&&x===F[0]&&A===F[1]&&C===F[2]){var V=c.caml_array_get(r,_),D=c.caml_array_get(r,_+1|0);n.removeChild(D),o.insertBefore(n,D,V),u=p[1],e=T,t=_+2|0;continue}B=4}else B=4;if(4===B){if($===b&&P===X&&q===y){var z=c.caml_array_get(r,_);n.removeChild(z),u=p,e=T,t=_+1|0;continue}M=3}}else M=3}else M=3;if(3===M)if(p){var R=p[0];if(2===R.tag&&x===R[0]&&A===R[1]&&C===R[2]){var I=c.caml_array_get(r,_),j=k(O,h);o.insertBefore(n,j,I),u=p,t=_+1|0;continue}N=2}else N=2;if(2===N){E(O,n,r,_,s,h),u=p,e=w,t=_+1|0;continue}}else m=1}else m=1;break;case 3:if(a){var H=a[0];if(3===H.tag){var U=a[1],G=H[2],W=H[1],J=H[0],K=f[1],Q=s[2],Y=s[0];if(Y===J){G[0]=Q[0],u=U,e=K,t=_+1|0;continue}var Z=0,OO=0;if(K){var nO=K[0];if(3===nO.tag){var rO=K[1],tO=nO[0],eO=0;if(U){var iO=U[0];if(3===iO.tag&&tO===J&&Y===iO[0]){var uO=c.caml_array_get(r,_),aO=c.caml_array_get(r,_+1|0);n.removeChild(aO),o.insertBefore(n,aO,uO),u=U[1],e=rO,t=_+2|0;continue}eO=4}else eO=4;if(4===eO){if(tO===J){var oO=c.caml_array_get(r,_);n.removeChild(oO);var cO=nO[2][0];G[0]=cO,u=U,e=rO,t=_+1|0;continue}OO=3}}else OO=3}else OO=3;if(3===OO)if(U){var fO=U[0];if(3===fO.tag&&fO[0]===Y){var _O=c.caml_array_get(r,_),lO=i._1(W,0);G[0]=lO;var sO=k(O,lO);o.insertBefore(n,sO,_O),u=U,t=_+1|0;continue}Z=2}else Z=2;if(2===Z){var mO=Q[0],vO=i._1(W,0);G[0]=vO,u=[vO,U],e=[mO,K];continue}}else m=1}else m=1;break;case 4:e=[s[1],f[1]];continue}if(1!==m);else{var dO=f[1];if(a){var gO=a[0];if(4===gO.tag){S(i._1(gO[0],O),n,r,_,[s,0],[gO[1],0]),u=a[1],e=dO,t=_+1|0;continue}var hO=c.caml_array_get(r,_),pO=k(O,gO);o.insertBefore(n,pO,hO),n.removeChild(hO),u=a[1],e=dO,t=_+1|0;continue}var yO=c.caml_array_get(r,_);n.removeChild(yO),u=0,e=dO}}}function N(O,n,r,t){return S(O,n,n.childNodes,0,r,t),t}n.noNode=l,n.comment=function(O){return e.__(0,[O])},n.text=function(O){return e.__(1,[O])},n.fullnode=s,n.node=function(O,n,r,t,e,i){return s(O?O[0]:"",n,r?r[0]:"",t?t[0]:"",e,i)},n.lazyGen=function(O,n){return e.__(3,[O,n,[l]])},n.noProp=0,n.prop=function(O,n){return e.__(0,[O,n])},n.onCB=function(O,n,r){return e.__(3,[O,e.__(0,[n,r]),[0]])},n.onMsg=function(O,n){return e.__(3,[O,e.__(1,[n]),[0]])},n.attribute=function(O,n,r){return e.__(1,[O,n,r])},n.data=function(O,n){return e.__(2,[O,n])},n.style=function(O,n){return e.__(4,[[[O,n],0]])},n.styles=function(O){return e.__(4,[O])},n.renderToHtmlString=function O(n){for(;;){var r=n;switch(0|r.tag){case 0:return"\x3c!-- "+r[0]+" --\x3e";case 1:return r[0];case 2:var e=r[1],a=r[0];return u.concat("",["<",[a,[""===a?"":":",[e,[u.concat("",t.map(function(O){var n=O;if("number"==typeof n)return"";switch(0|n.tag){case 0:return u.concat("",[" ",[n[0],['="',[n[1],['"',0]]]]]);case 1:return u.concat("",[" ",[n[1],['="',[n[2],['"',0]]]]]);case 2:return u.concat("",[" data-",[n[0],['="',[n[1],['"',0]]]]]);case 3:return"";case 4:return u.concat("",[' style="',[u.concat(";",t.map(function(O){return u.concat("",[O[0],[":",[O[1],[";",0]]]])},n[0])),['"',0]]])}},r[4])),[">",[u.concat("",t.map(O,r[5])),["</",[e,[">",0]]]]]]]]]]);case 3:n=i._1(r[1],0);continue;case 4:n=r[1];continue}}},n.emptyEventHandler=function(){return 0},n.emptyEventCB=function(){return 0},n.eventHandler=m,n.eventHandler_GetCB=v,n.compareEventHandlerTypes=d,n.eventHandler_Register=g,n.eventHandler_Unregister=h,n.eventHandler_Mutate=p,n.patchVNodesOnElems_PropertiesApply_Add=y,n.patchVNodesOnElems_PropertiesApply_Remove=X,n.patchVNodesOnElems_PropertiesApply_RemoveAdd=b,n.patchVNodesOnElems_PropertiesApply_Mutate=w,n.patchVNodesOnElems_PropertiesApply=C,n.patchVNodesOnElems_Properties=A,n.genEmptyProps=function(O){for(var n=0,r=O;;){var t=r,e=n;if(0===t)return e;r=t-1|0,n=[0,e]}},n.mapEmptyProps=function(O){return t.map(function(){return 0},O)},n.patchVNodesOnElems_ReplaceNode=x,n.patchVNodesOnElems_CreateElement=k,n.patchVNodesOnElems_MutateNode=E,n.patchVNodesOnElems=S,n.patchVNodesIntoElement=N,n.patchVNodeIntoElement=function(O,n,r,t){return N(O,n,[r,0],[t,0])},n.wrapCallbacks=function(O,n){return[[function(r){return i._1(n[0][0],i._1(O,r))}]]},n.map=function(O,n){return e.__(4,[function(n){return[[function(r){return i._1(n[0][0],i._1(O,r))}]]},n])}},function(O,n,r){"use strict";n.body=function(){return document.body},n.createElement=function(O){return document.createElement(O)},n.createElementNS=function(O,n){return document.createElementNS(O,n)},n.createComment=function(O){return document.createComment(O)},n.createTextNode=function(O){return document.createTextNode(O)},n.getElementById=function(O){return document.getElementById(O)},n.createElementNsOptional=function(O,n){return""===O?document.createElement(n):document.createElementNS(O,n)},n.$$location=function(){return document.location}},function(O,n,r){"use strict";var t=r(3),e=r(37),i=r(8),u=r(4);function a(O,n){if("number"==typeof n)return 0;switch(0|n.tag){case 1:return t.fold_left(function(n,r){return a(O,r)},0,n[0]);case 0:case 2:return u._1(n[0],O)}}n.none=0,n.batch=function(O){return i.__(1,[O])},n.call=function(O){return i.__(2,[O])},n.fnMsg=function(O){return i.__(2,[function(n){return u._1(n[0][0],u._1(O,0))}])},n.msg=function(O){return i.__(2,[function(n){return u._1(n[0][0],O)}])},n.run=a,n.map=function(O,n){return i.__(0,[function(r){return a(e.wrapCallbacks(O,r),n)}])}},function(O,n,r){"use strict";var t=r(3),e=r(8),i=r(4);n.none=0,n.batch=function(O){return e.__(0,[O])},n.registration=function(O,n){return e.__(1,[O,function(O){return i._1(n,O[0])},[0]])},n.map=function(O,n){return e.__(2,[function(n){return[[function(r){return i._1(n[0][0],i._1(O,r))}]]},n])},n.mapFunc=function(O,n){return e.__(2,[O,n])},n.run=function O(n,r,e,u){var a=function(O,n){for(;;){var r=n,e=O;if("number"==typeof r)return 0;switch(0|r.tag){case 0:var u=r[0];return u?t.iter(function(O){return function(n){return a(O,n)}}(e),u):0;case 1:return r[2][0]=[i._1(r[1],e)],0;case 2:var o=i._1(r[0],e);n=r[1],O=o;continue}}},o=function(O,n){for(;;){var r=n,e=O;if("number"==typeof r)return 0;switch(0|r.tag){case 0:var u=r[0];return u?t.iter(function(O){return function(n){return o(O,n)}}(e),u):0;case 1:var a=r[2],c=a[0];return c?(a[0]=0,i._1(c[0],0)):0;case 2:var f=i._1(r[0],e);n=r[1],O=f;continue}}},c=0;if("number"==typeof e){if("number"==typeof u)return u;c=1}else switch(0|e.tag){case 0:if("number"!=typeof u&&!u.tag)return function(t,e){for(;;){var i=e,u=t;if(u){var c=u[1],f=u[0];if(i){O(n,r,f,i[0]),e=i[1],t=c;continue}o(n,f),e=0,t=c}else{if(!i)return 0;a(r,i[0]),e=i[1],t=0}}}(e[0],u[0]),u;c=1;break;case 1:if("number"!=typeof u&&1===u.tag&&e[0]===u[0])return u[2][0]=e[2][0],u;c=1;break;case 2:if("number"!=typeof u&&2===u.tag)return O(i._1(e[0],n),i._1(u[0],r),e[1],u[1]),u;c=1}if(1===c)return o(n,e),a(r,u),u}},function(O,n,r){"use strict";var t=r(2),e=r(3),i=r(22),u=r(24),a=r(29),o=r(5);function c(O){return O?" ":"█"}function f(O){switch(O){case"X":case"█":return 0;default:return 1}}function _(O){return i.map(function(O){return i.map(f,O.split(""))},i.of_list(e.filter(function(O){return O.length>0})(i.to_list(O.split("\n")))))}var l=_("\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOXXXOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOXOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOXOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO\nOOOO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},O))},n.grid_of_string=_,n.string_of_grid=function(O){return i.map(function(O){return O.join("")},t.Grid[3](c)(O)).join("\n")},n.glider=l,n.spaaaceship=s,n.stillLifes=m,n.oscillators1=v,n.copperhead=d,n.trafficLight=g,n.oscillators2=h,n.golly=p,n.patterns=y,n.random_element=X,n.random=function(){return X(y)}},function(O,n,r){"use strict";var t=r(3),e=r(37),i=r(8),u=r(4),a=r(29);var o=e.lazyGen;var c=e.style;var f=e.onCB,_=e.onMsg;function l(O,n){var r=O?O[0]:"";return e.onCB("input",r,function(O){var r=O.target;if(void 0!==r){var t=r.value;return void 0!==t?u._1(n,t):0}return 0})}function s(O,n){var r=O?O[0]:"";return e.onCB("change",r,function(O){var r=O.target;if(void 0!==r){var t=r.value;return void 0!==t?u._1(n,t):0}return 0})}function m(O,n){var r=O?O[0]:"";return e.onCB("change",r,function(O){var r=O.target;if(void 0!==r){var t=r.checked;return void 0!==t?u._1(n,t):0}return 0})}var v=[function(O){return i.__(1,["","max",O])},function(O){return i.__(1,["","min",O])},function(O){return i.__(1,["","step",O])},function(O){return O?i.__(1,["","disabled","true"]):0},function(O){return O?i.__(1,["","selected","true"]):0},function(O){return i.__(1,["","accept-charset",O])},function(O){return i.__(1,["","rel",O])}],d=e.noNode;n.Cmds=0,n.noNode=d,n.text=function(O){return i.__(1,[O])},n.lazy1=o,n.node=function(O,n,r,t,i,u){var a=O?O[0]:"",o=r?r[0]:"",c=t?t[0]:"";return e.fullnode(a,n,o,c,i,u)},n.br=function(O){return e.fullnode("","br","br","br",O,0)},n.br$prime=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","br",i,u,r,t)},n.div=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","div",i,u,r,t)},n.span=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","span",i,u,r,t)},n.p=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","p",i,u,r,t)},n.pre=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","pre",i,u,r,t)},n.a=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","a",i,u,r,t)},n.section=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","section",i,u,r,t)},n.header=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","header",i,u,r,t)},n.footer=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","footer",i,u,r,t)},n.h1=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","h1",i,u,r,t)},n.h2=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","h2",i,u,r,t)},n.h3=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","h3",i,u,r,t)},n.h4=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","h4",i,u,r,t)},n.h5=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","h5",i,u,r,t)},n.h6=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","h6",i,u,r,t)},n.i=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","i",i,u,r,t)},n.strong=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","strong",i,u,r,t)},n.button=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","button",i,u,r,t)},n.input$prime=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","input",i,u,r,t)},n.textarea=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","textarea",i,u,r,t)},n.label=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","label",i,u,r,t)},n.ul=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","ul",i,u,r,t)},n.ol=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","ol",i,u,r,t)},n.li=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","li",i,u,r,t)},n.table=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","table",i,u,r,t)},n.thead=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","thead",i,u,r,t)},n.tfoot=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","tfoot",i,u,r,t)},n.tbody=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","tbody",i,u,r,t)},n.th=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","th",i,u,r,t)},n.tr=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","tr",i,u,r,t)},n.td=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","td",i,u,r,t)},n.progress=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","progress",i,u,r,t)},n.img=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","img",i,u,r,t)},n.select=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","select",i,u,r,t)},n.option$prime=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","option",i,u,r,t)},n.form=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","form",i,u,r,t)},n.nav=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","nav",i,u,r,t)},n.main=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","main",i,u,r,t)},n.aside=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","aside",i,u,r,t)},n.article=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","article",i,u,r,t)},n.details=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","details",i,u,r,t)},n.figcaption=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","figcaption",i,u,r,t)},n.figure=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","figure",i,u,r,t)},n.mark=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","mark",i,u,r,t)},n.summary=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","summary",i,u,r,t)},n.time=function(O,n,r,t){var i=O?O[0]:"",u=n?n[0]:"";return e.fullnode("","time",i,u,r,t)},n.noProp=0,n.id=function(O){return i.__(0,["id",O])},n.href=function(O){return i.__(1,["","href",O])},n.src=function(O){return i.__(1,["","src",O])},n.class$prime=function(O){return i.__(0,["className",O])},n.classList=function(O){var n=a.concat(" ",t.map(function(O){return O[0]},t.filter(function(O){return O[1]})(O)));return i.__(0,["className",n])},n.type$prime=function(O){return i.__(0,["type",O])},n.style=c,n.styles=function(O){return i.__(4,[O])},n.placeholder=function(O){return i.__(0,["placeholder",O])},n.autofocus=function(O){return O?i.__(0,["autofocus","autofocus"]):0},n.value=function(O){return i.__(0,["value",O])},n.name=function(O){return i.__(0,["name",O])},n.checked=function(O){return O?i.__(0,["checked","checked"]):0},n.for$prime=function(O){return i.__(0,["htmlFor",O])},n.hidden=function(O){return O?i.__(0,["hidden","hidden"]):0},n.target=function(O){return i.__(0,["target",O])},n.action=function(O){return i.__(0,["action",O])},n.method$prime=function(O){return i.__(0,["method",O])},n.onCB=f,n.onMsg=_,n.onInputOpt=l,n.onInput=function(O,n){return l([O?O[0]:""],function(O){return[u._1(n,O)]})},n.onChangeOpt=s,n.onChange=function(O,n){return s([O?O[0]:""],function(O){return[u._1(n,O)]})},n.onClick=function(O){return e.onMsg("click",O)},n.onDoubleClick=function(O){return e.onMsg("dblclick",O)},n.onBlur=function(O){return e.onMsg("blur",O)},n.onFocus=function(O){return e.onMsg("focus",O)},n.onCheckOpt=m,n.onCheck=function(O,n){return m([O?O[0]:""],function(O){return[u._1(n,O)]})},n.onMouseDown=function(O){return e.onMsg("mousedown",O)},n.onMouseUp=function(O){return e.onMsg("mouseup",O)},n.onMouseEnter=function(O){return e.onMsg("mouseenter",O)},n.onMouseLeave=function(O){return e.onMsg("mouseleave",O)},n.onMouseOver=function(O){return e.onMsg("mouseover",O)},n.onMouseOut=function(O){return e.onMsg("mouseout",O)},n.Attributes=v}]);