!function(){"use strict";vare=function(e){if(null===e)return"null";if(void0===e)return"undefined";vart=typeofe;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},t=function(e){return{eq:e}},n=t((function(e,t){returne===t})),o=function(e){returnt((function(t,n){if(t.length!==n.length)return!1;for(varo=t.length,r=0;r<o;r++)if(!e.eq(t[r],n[r]))return!1;return!0}))},r=function(e){returnt((function(r,s){vara=Object.keys(r),i=Object.keys(s);if(!function(e,n){returnfunction(e,n){returnt((function(t,o){returne.eq(n(t),n(o))}))}(o(e),(function(e){returnfunction(e,t){returnArray.prototype.slice.call(e).sort(t)}(e,n)}))}(n).eq(a,i))return!1;for(varl=a.length,d=0;d<l;d++){varc=a[d];if(!e.eq(r[c],s[c]))return!1}return!0}))},s=t((function(t,n){if(t===n)return!0;vara=e(t);returna===e(n)&&(function(e){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(e)}(a)?t===n:"array"===a?o(s).eq(t,n):"object"===a&&r(s).eq(t,n))}));consta=Object.getPrototypeOf,i=(e,t,n)=>{varo;return!!n(e,t.prototype)||(null===(o=e.constructor)||void0===o?void0:o.name)===t.name},l=e=>t=>(e=>{constt=typeofe;returnnull===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&i(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,d=e=>t=>typeoft===e,c=e=>t=>e===t,u=(e,t)=>f(e)&&i(e,t,((e,t)=>a(e)===t)),m=l("string"),f=l("object"),g=e=>u(e,Object),p=l("array"),h=c(null),b=d("boolean"),v=c(void0),y=e=>null==e,C=e=>!y(e),w=d("function"),x=d("number"),E=(e,t)=>{if(p(e)){for(letn=0,o=e.length;n<o;++n)if(!t(e[n]))return!1;return!0}return!1},_=()=>{},k=(e,t)=>(...n)=>e(t.apply(null,n)),S=(e,t)=>n=>e(t(n)),N=e=>()=>e,R=e=>e,A=(e,t)=>e===t;functionT(e,...t){return(...n)=>{consto=t.concat(n);returne.apply(null,o)}}constO=e=>t=>!e(t),B=e=>()=>{thrownewError(e)},P=e=>e(),D=e=>{e()},L=N(!1),M=N(!0);classI{constructor(e,t){this.tag=e,this.value=t}staticsome(e){returnnewI(!0,e)}staticnone(){returnI.singletonNone}fold(e,t){returnthis.tag?t(this.value):e()}isSome(){returnthis.tag}isNone(){return!this.tag}map(e){returnthis.tag?I.some(e(this.value)):I.none()}bind(e){returnthis.tag?e(this.value):I.none()}exists(e){returnthis.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:I.none()}getOr(e){returnthis.tag?this.value:e}or(e){returnthis.tag?this:e}getOrThunk(e){returnthis.tag?this.value:e()}orThunk(e){returnthis.tag?this:e()}getOrDie(e){if(this.tag)returnthis.value;thrownewError(null!=e?e:"Called getOrDie on None")}staticfrom(e){returnC(e)?I.some(e):I.none()}getOrNull(){returnthis.tag?this.value:null}getOrUndefined(){returnthis.value}each(e){this.tag&&e(this.value)}toArray(){returnthis.tag?[this.value]:[]}toString(){returnthis.tag?`some(${this.value})`:"none()"}}I.singletonNone=newI(!1);constF=Array.prototype.slice,U=Array.prototype.indexOf,z=Array.prototype.push,j=(e,t)=>U.call(e,t),H=(e,t)=>j(e,t)>-1,$=(e,t)=>{for(letn=0,o=e.length;n<o;n++)if(t(e[n],n))return!0;return!1},q=(e,t)=>{constn=e.length,o=newArray(n);for(letr=0;r<n;r++){constn=e[r];o[r]=t(n,r)}returno},V=(e,t)=>{for(letn=0,o=e.length;n<o;n++)t(e[n],n)},W=(e,t)=>{for(letn=e.length-1;n>=0;n--)t(e[n],n)},K=(e,t)=>{constn=[],o=[];for(letr=0,s=e.length;r<s;r++){consts=e[r];(t(s,r)?n:o).push(s)}return{pass:n,fail:o}},Y=(e,t)=>{constn=[];for(leto=0,r=e.length;o<r;o++){constr=e[o];t(r,o)&&n.push(r)}returnn},G=(e,t,n)=>(W(e,((e,o)=>{n=t(n,e,o)})),n),X=(e,t,n)=>(V(e,((e,o)=>{n=t(n,e,o)})),n),Q=(e,t,n)=>{for(leto=0,r=e.length;o<r;o++){constr=e[o];if(t(r,o))returnI.some(r);if(n(r,o))break}returnI.none()},J=(e,t)=>Q(e,t,L),Z=(e,t)=>{for(letn=0,o=e.length;n<o;n++)if(t(e[n],n))returnI.some(n);returnI.none()},ee=e=>{constt=[];for(letn=0,o=e.length;n<o;++n){if(!p(e[n]))thrownewError("Arr.flatten item "+n+" was not an array, input: "+e);z.apply(t,e[n])}returnt},te=(e,t)=>ee(q(e,t)),ne=(e,t)=>{for(