@jonahsnider/util
Advanced tools
Comparing version 7.0.0 to 7.0.1
@@ -19,4 +19,5 @@ export * from './array'; | ||
export * from './stopwatch'; | ||
export * from './string'; | ||
export * from './to-digits'; | ||
export * from './typed-event-emitter'; | ||
export * from './types'; |
@@ -1,2 +0,2 @@ | ||
"use strict";function t(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function e(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,s,"next",e)}function s(e){t(a,o,i,u,s,"throw",e)}u(void 0)}))}}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function a(t,e,r){return(a=i()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&o(i,r.prototype),i}).apply(null,arguments)}function u(t){var e="function"==typeof Map?new Map:void 0;return(u=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return a(t,arguments,n(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,t)})(t)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return s(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}function p(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}Object.defineProperty(exports,"__esModule",{value:!0});var f,l,d,h=(function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof f?e:f).prototype),i=new w(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=k(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var p={};function f(){}function l(){}function d(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,x=v&&v(v(R([])));x&&x!==e&&r.call(x,o)&&(h=x);var y=d.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,u){var s=c(t[o],t,i);if("throw"!==s.type){var p=s.arg,f=p.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){p.value=t,a(p)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function k(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function R(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return l.prototype=y.constructor=d,d.constructor=l,l.displayName=u(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new g(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),u(y,a,"Generator"),y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=R,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:R(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}(d={exports:{}}),d.exports),v=h.mark(k),x=h.mark(S),y=h.mark(b),m=h.mark(w),g=h.mark(R);function k(){var t,e,r,n,o,i=arguments;return h.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:for(t=i.length,e=new Array(t),r=0;r<t;r++)e[r]=i[r];n=0,o=e;case 2:if(!(n<o.length)){a.next=8;break}return a.delegateYield(o[n],"t0",5);case 5:n++,a.next=2;break;case 8:case"end":return a.stop()}}),v)}function S(t,e){var r,n,o;return h.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:r=c(t);case 1:if((n=r()).done){i.next=11;break}if(o=n.value,!e--){i.next=8;break}return i.next=6,o;case 6:i.next=9;break;case 8:return i.abrupt("break",11);case 9:i.next=1;break;case 11:case"end":return i.stop()}}),x)}function b(t,e){var r;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=0;case 1:if(!(r<e)){n.next=6;break}return n.delegateYield(t,"t0",3);case 3:r++,n.next=1;break;case 6:case"end":return n.stop()}}),y)}function w(t,e){var r;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=0;case 1:if(!(r<e)){n.next=7;break}return n.next=4,t;case 4:r++,n.next=1;break;case 7:case"end":return n.stop()}}),m)}function R(t,e){var r;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=0;case 1:if(!(r<e)){n.next=7;break}return n.next=4,t(r);case 4:r++,n.next=1;break;case 7:case"end":return n.stop()}}),g)}function T(t,e){var r=void 0;if("size"in t?r="size":"length"in t&&(r="length"),!r)throw new RangeError;return t[r]<e[r]?[e,t]:[t,e]}function E(t,e){return Array.from({length:e},(function(e,r){return t(r)}))}(f=exports.Rank||(exports.Rank={}))[f.Ace=1]="Ace",f[f.Two=2]="Two",f[f.Three=3]="Three",f[f.Four=4]="Four",f[f.Five=5]="Five",f[f.Six=6]="Six",f[f.Seven=7]="Seven",f[f.Eight=8]="Eight",f[f.Nine=9]="Nine",f[f.Ten=10]="Ten",f[f.Jack=11]="Jack",f[f.Queen=12]="Queen",f[f.King=13]="King",(l=exports.Suit||(exports.Suit={}))[l.Clubs=0]="Clubs",l[l.Diamonds=1]="Diamonds",l[l.Hearts=2]="Hearts",l[l.Spades=3]="Spades";var O,N,P=[{rank:exports.Rank.Ace,suit:exports.Suit.Clubs},{rank:exports.Rank.Two,suit:exports.Suit.Clubs},{rank:exports.Rank.Three,suit:exports.Suit.Clubs},{rank:exports.Rank.Four,suit:exports.Suit.Clubs},{rank:exports.Rank.Five,suit:exports.Suit.Clubs},{rank:exports.Rank.Six,suit:exports.Suit.Clubs},{rank:exports.Rank.Seven,suit:exports.Suit.Clubs},{rank:exports.Rank.Eight,suit:exports.Suit.Clubs},{rank:exports.Rank.Nine,suit:exports.Suit.Clubs},{rank:exports.Rank.Ten,suit:exports.Suit.Clubs},{rank:exports.Rank.Jack,suit:exports.Suit.Clubs},{rank:exports.Rank.Queen,suit:exports.Suit.Clubs},{rank:exports.Rank.King,suit:exports.Suit.Clubs},{rank:exports.Rank.Ace,suit:exports.Suit.Diamonds},{rank:exports.Rank.Two,suit:exports.Suit.Diamonds},{rank:exports.Rank.Three,suit:exports.Suit.Diamonds},{rank:exports.Rank.Four,suit:exports.Suit.Diamonds},{rank:exports.Rank.Five,suit:exports.Suit.Diamonds},{rank:exports.Rank.Six,suit:exports.Suit.Diamonds},{rank:exports.Rank.Seven,suit:exports.Suit.Diamonds},{rank:exports.Rank.Eight,suit:exports.Suit.Diamonds},{rank:exports.Rank.Nine,suit:exports.Suit.Diamonds},{rank:exports.Rank.Ten,suit:exports.Suit.Diamonds},{rank:exports.Rank.Jack,suit:exports.Suit.Diamonds},{rank:exports.Rank.Queen,suit:exports.Suit.Diamonds},{rank:exports.Rank.King,suit:exports.Suit.Diamonds},{rank:exports.Rank.Ace,suit:exports.Suit.Hearts},{rank:exports.Rank.Two,suit:exports.Suit.Hearts},{rank:exports.Rank.Three,suit:exports.Suit.Hearts},{rank:exports.Rank.Four,suit:exports.Suit.Hearts},{rank:exports.Rank.Five,suit:exports.Suit.Hearts},{rank:exports.Rank.Six,suit:exports.Suit.Hearts},{rank:exports.Rank.Seven,suit:exports.Suit.Hearts},{rank:exports.Rank.Eight,suit:exports.Suit.Hearts},{rank:exports.Rank.Nine,suit:exports.Suit.Hearts},{rank:exports.Rank.Ten,suit:exports.Suit.Hearts},{rank:exports.Rank.Jack,suit:exports.Suit.Hearts},{rank:exports.Rank.Queen,suit:exports.Suit.Hearts},{rank:exports.Rank.King,suit:exports.Suit.Hearts},{rank:exports.Rank.Ace,suit:exports.Suit.Spades},{rank:exports.Rank.Two,suit:exports.Suit.Spades},{rank:exports.Rank.Three,suit:exports.Suit.Spades},{rank:exports.Rank.Four,suit:exports.Suit.Spades},{rank:exports.Rank.Five,suit:exports.Suit.Spades},{rank:exports.Rank.Six,suit:exports.Suit.Spades},{rank:exports.Rank.Seven,suit:exports.Suit.Spades},{rank:exports.Rank.Eight,suit:exports.Suit.Spades},{rank:exports.Rank.Nine,suit:exports.Suit.Spades},{rank:exports.Rank.Ten,suit:exports.Suit.Spades},{rank:exports.Rank.Jack,suit:exports.Suit.Spades},{rank:exports.Rank.Queen,suit:exports.Suit.Spades},{rank:exports.Rank.King,suit:exports.Suit.Spades}],M=function(t){var e,r;function n(e,r){var n;return(n=t.call(this,r)||this).defaultValueOrDefaultValueFn=e,n.defaultValueIsFunction="function"==typeof n.defaultValueOrDefaultValueFn,n}return r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,n.prototype.get=function(e){return this.has(e)?t.prototype.get.call(this,e):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(e):this.defaultValueOrDefaultValueFn},n}(u(Map));function L(t){for(var e,r=t[0].map((function(t){return t.length})),n=c(t);!(e=n()).done;)for(var o=e.value,i=0;i<o.length;i++){var a=o[i].length;r[i]<a&&(r[i]=a)}return r}!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(O||(O={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(N||(N={}));var A={__proto__:null,get Status(){return O},get Method(){return N}};function F(t,e){return t+e}function _(t){var e=j(t);return t.map((function(t){return Math.pow(t-e,2)})).reduce(F)/(t.length-1)}function C(t,e,r){return 1/(e*Math.sqrt(2*Math.PI))*Math.pow(Math.E,-.5*Math.pow(t-r/e,2))}function j(t){var e=t.reduce(F);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function D(t,e){return Math.random()*(e-t)+t}function H(){return(H=e(h.mark((function t(e){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:return t.t0=t.sent,t.t1=void 0,t.abrupt("return",[t.t0,t.t1]);case 8:return t.prev=8,t.t2=t.catch(0),t.abrupt("return",[void 0,t.t2]);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))).apply(this,arguments)}var I=function(){function t(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}t.from=function(e){return new t(e[0],e[1])};var e=t.prototype;return e.has=function(t){return t>=this.lower&&t<=this.upper},e[Symbol.iterator]=h.mark((function t(){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.lower;case 2:return t.next=4,this.upper;case 4:case"end":return t.stop()}}),t,this)})),t}();function q(t,e){return t<e?-1:t>e?1:0}function U(t,e){return t<e?1:t>e?-1:0}var G={__proto__:null,ascending:function(t,e){return void 0===e&&"function"==typeof t?function(e,r){return q(t(e),t(r))}:q(t,e)},descending:function(t,e){return void 0===e&&"function"==typeof t?function(e,r){return U(t(e),t(r))}:U(t,e)}},V=function(){function t(){}t.start=function(){var t=new this;return t.start(),t};var e,r=t.prototype;return r.start=function(){this.startTime=process.hrtime.bigint()},r.end=function(){return Number(process.hrtime.bigint()-this.startTime)/1e6},(e=[{key:"started",get:function(){return void 0!==this.startTime}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}();exports.Bitwise={__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}},exports.DefaultMap=M,exports.Http=A,exports.Range=I,exports.Sort=G,exports.Stopwatch=V,exports.allDuplicates=function(t){for(var e,r=new Set,n=[],o=c(t);!(e=o()).done;){var i=e.value;r.has(i)?n.push(i):r.add(i)}return n},exports.binarySearch=function(t,e){for(var r=0,n=t.length-1;r<=n;){var o=Math.trunc((r+n)/2),i=e(t[o]);if(i<0)r=o+1;else{if(!(i>0))return t[o];n=o-1}}},exports.chunk=function(t,e){return t.length===e?t.map((function(t){return[t]})):E((function(r){return t.slice(r*e,r*e+e)}),Math.ceil(t.length/e))},exports.clamp=function(t,e,r){return t<e?e:t>r?r:t},exports.combineIterables=k,exports.count=function(t,e){for(var r,n=0,o=c(t);!(r=o()).done;)r.value===e&&n++;return n},exports.cycle=b,exports.difference=function(t,e){for(var r,n=new Set(t),o=c(e);!(r=o()).done;)n.delete(r.value);return n},exports.duplicates=function(t){for(var e,r=new Set,n=new Set,o=c(t);!(e=o()).done;){var i=e.value;r.has(i)?n.add(i):r.add(i)}return n},exports.every=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(!e(r.value))return!1;return!0},exports.fill=function(t,e){return Array.from({length:e},(function(){return t}))},exports.find=function(t,e){for(var r,n=c(t);!(r=n()).done;){var o=r.value;if(e(o))return o}},exports.first=function(t,e){if(void 0!==e)return S(t,e);for(var r,n=c(t);!(r=n()).done;)return r.value},exports.formatTable=function(t,e){void 0===e&&(e=" ");var r=L(t);return t.map((function(t){return t.map((function(t,e){return t.padEnd(r[e])})).join(e)})).join("\n")},exports.frequencyTable=function(t){for(var e,r=new Map,n=c(t);!(e=n()).done;){var o=e.value,i=r.get(o);r.set(o,(null!=i?i:0)+1)}return r},exports.holes=function(t){for(var e=[],r=0;r<t.length;r++)r in t||e.push(r);return e},exports.identical=function(t,e){if(Array.isArray(t)&&Array.isArray(e))return function(t,e){return t===e||t.length===e.length&&t.every((function(t,r){return t===e[r]}))}(t,e);if(t instanceof Set&&e instanceof Set)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(var r,n=c(t);!(r=n()).done;)if(!e.has(r.value))return!1;return!0}(t,e);if(t instanceof Map&&e instanceof Map)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(var r,n=c(t.entries());!(r=n()).done;){var o=r.value,i=o[0],a=o[1];if(!e.has(i)||e.get(i)!==a)return!1}return!0}(t,e);throw new RangeError("Expected both parameters to be an array, Set, or Map")},exports.includes=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(r.value===e)return!0;return!1},exports.intersection=function(t,e){for(var r,n=new Set,o=T(t,e),i=o[1],a=c(o[0]);!(r=a()).done;){var u=r.value;i.has(u)&&n.add(u)}return n},exports.invert=function(t){return function(){return-t.apply(void 0,arguments)}},exports.isDisjoint=function(t,e){for(var r,n=t instanceof Set?t:new Set(t),o=c(e);!(r=o()).done;)if(n.has(r.value))return!1;return!0},exports.isSubset=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(!e.has(r.value))return!1;return!0},exports.isSuperset=function(t,e){for(var r,n=c(e);!(r=n()).done;)if(!t.has(r.value))return!1;return!0},exports.join=function(t,e){void 0===e&&(e=",");for(var r="",n=t[Symbol.iterator](),o=n.next();;){var i=o;if(o=n.next(),r+=i.value,o.done)return r;r+=e}},exports.largeToSmall=T,exports.mapFill=E,exports.mapRepeat=R,exports.max=function(t,e){return e>t?e:t},exports.maxColumnLength=L,exports.mean=j,exports.median=function(t){var e=t.length/2;return t.length%2==0?(t[e-1]+t[e])/("bigint"==typeof t[0]?2n:2):t[Math.floor(e)]},exports.min=function(t,e){return e<t?e:t},exports.mode=function(t){for(var e,r=new Map,n=0,o=[],i=c(t);!(e=i()).done;){var a=e.value,u=r.get(a),s=void 0===u?1:u+1;r.set(a,s),s>n?(n=s,o=[a]):s===n&&o.push(a)}return o},exports.newDeck=function(){return[].concat(P)},exports.normaldist=C,exports.not=function(t){return function(){return!t.apply(void 0,arguments)}},exports.nullish=function(t){return null==t},exports.padEnd=function(t,e,r){t.push.apply(t,w(r,e-t.length))},exports.padStart=function(t,e,r){t.unshift.apply(t,w(r,e-t.length))},exports.partition=function(t,e){for(var r,n=[],o=[],i=0,a=c(t);!(r=a()).done;){var u=r.value;(e(u,i++)?n:o).push(u)}return[n,o]},exports.product=function(t,e){return t*e},exports.pull=function(t,e){var r=t.indexOf(e);return-1===r?[]:t.splice(r,1)},exports.random=D,exports.randomInt=function(t,e){return Math.floor(D(Math.ceil(t),Math.floor(e)))},exports.regExpUnion=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return new RegExp(e.map((function(t){return"("+t.source+")"})).join("|"))},exports.rename=function(t,e,n){var o;return e===n?r({},t):function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)e.indexOf(r=i[n])>=0||(o[r]=t[r]);return o}(r({},t,((o={})[n]=t[e],o)),[e].map(p))},exports.repeat=w,exports.same=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=e.map((function(t){return t[Symbol.iterator]()})),o=function(){for(var t,e=n.map((function(t){return t.next()})),r=e[0],o=r.done,i=r.value,a=c(e);!(t=a()).done;){var u=t.value;if(u.done)return{v:e.every((function(t){return t.done===o}))};if(u.value!==i)return{v:!1}}};;){var i=o();if("object"==typeof i)return i.v}},exports.sample=function(t){return t[Math.floor(Math.random()*t.length)]},exports.settled=function(t){return H.apply(this,arguments)},exports.shuffle=function(t,e){void 0===e&&(e=!0);for(var r=e?t:[].concat(t),n=r.length-1;n>0;n--){var o=Math.floor(Math.random()*(n+1)),i=[r[o],r[n]];r[n]=i[0],r[o]=i[1]}if(!e)return r},exports.some=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(e(r.value))return!0;return!1},exports.sortObject=function(t,e){return Object.entries(t).sort((function(t,r){return e(t[1],r[1])}))},exports.standardNormaldist=function(t){return C(t,1,0)},exports.stddev=function(t){return Math.sqrt(_(t))},exports.sum=F,exports.symmetricDifference=function(t,e){for(var r,n=new Set(t),o=c(e);!(r=o()).done;){var i=r.value;n.has(i)?n.delete(i):n.add(i)}return n},exports.toDigits=function(t,e){var r=Math.pow(10,e);return Math.round(t*r*(1+Number.EPSILON))/r},exports.union=function(t,e){return new Set(k(t,e))},exports.variance=_; | ||
"use strict";function t(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function e(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function u(e){t(a,o,i,u,s,"next",e)}function s(e){t(a,o,i,u,s,"throw",e)}u(void 0)}))}}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function n(t){return(n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function a(t,e,r){return(a=i()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&o(i,r.prototype),i}).apply(null,arguments)}function u(t){var e="function"==typeof Map?new Map:void 0;return(u=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return a(t,arguments,n(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,t)})(t)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return s(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}function p(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}Object.defineProperty(exports,"__esModule",{value:!0});var f,l,d,h=(function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=Object.create((e&&e.prototype instanceof f?e:f).prototype),i=new w(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=k(a,r);if(u){if(u===p)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var s=c(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}(t,r,i),o}function c(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var p={};function f(){}function l(){}function d(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,x=v&&v(v(R([])));x&&x!==e&&r.call(x,o)&&(h=x);var y=d.prototype=f.prototype=Object.create(h);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function g(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,u){var s=c(t[o],t,i);if("throw"!==s.type){var p=s.arg,f=p.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(f).then((function(t){p.value=t,a(p)}),(function(t){return n("throw",t,a,u)}))}u(s.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function k(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,k(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=c(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,p;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function b(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function R(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return l.prototype=y.constructor=d,d.constructor=l,l.displayName=u(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===l||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,a,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},m(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new g(s(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(y),u(y,a,"Generator"),y[o]=function(){return this},y.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=R,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),b(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;b(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:R(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),p}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}(d={exports:{}}),d.exports),v=h.mark(k),x=h.mark(S),y=h.mark(b),m=h.mark(w),g=h.mark(R);function k(){var t,e,r,n,o,i=arguments;return h.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:for(t=i.length,e=new Array(t),r=0;r<t;r++)e[r]=i[r];n=0,o=e;case 2:if(!(n<o.length)){a.next=8;break}return a.delegateYield(o[n],"t0",5);case 5:n++,a.next=2;break;case 8:case"end":return a.stop()}}),v)}function S(t,e){var r,n,o;return h.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:r=c(t);case 1:if((n=r()).done){i.next=11;break}if(o=n.value,!e--){i.next=8;break}return i.next=6,o;case 6:i.next=9;break;case 8:return i.abrupt("break",11);case 9:i.next=1;break;case 11:case"end":return i.stop()}}),x)}function b(t,e){var r;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=0;case 1:if(!(r<e)){n.next=6;break}return n.delegateYield(t,"t0",3);case 3:r++,n.next=1;break;case 6:case"end":return n.stop()}}),y)}function w(t,e){var r;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=0;case 1:if(!(r<e)){n.next=7;break}return n.next=4,t;case 4:r++,n.next=1;break;case 7:case"end":return n.stop()}}),m)}function R(t,e){var r;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=0;case 1:if(!(r<e)){n.next=7;break}return n.next=4,t(r);case 4:r++,n.next=1;break;case 7:case"end":return n.stop()}}),g)}function T(t,e){var r=void 0;if("size"in t?r="size":"length"in t&&(r="length"),!r)throw new RangeError;return t[r]<e[r]?[e,t]:[t,e]}function E(t,e){return Array.from({length:e},(function(e,r){return t(r)}))}(f=exports.Rank||(exports.Rank={}))[f.Ace=1]="Ace",f[f.Two=2]="Two",f[f.Three=3]="Three",f[f.Four=4]="Four",f[f.Five=5]="Five",f[f.Six=6]="Six",f[f.Seven=7]="Seven",f[f.Eight=8]="Eight",f[f.Nine=9]="Nine",f[f.Ten=10]="Ten",f[f.Jack=11]="Jack",f[f.Queen=12]="Queen",f[f.King=13]="King",(l=exports.Suit||(exports.Suit={}))[l.Clubs=0]="Clubs",l[l.Diamonds=1]="Diamonds",l[l.Hearts=2]="Hearts",l[l.Spades=3]="Spades";var O,N,P=[{rank:exports.Rank.Ace,suit:exports.Suit.Clubs},{rank:exports.Rank.Two,suit:exports.Suit.Clubs},{rank:exports.Rank.Three,suit:exports.Suit.Clubs},{rank:exports.Rank.Four,suit:exports.Suit.Clubs},{rank:exports.Rank.Five,suit:exports.Suit.Clubs},{rank:exports.Rank.Six,suit:exports.Suit.Clubs},{rank:exports.Rank.Seven,suit:exports.Suit.Clubs},{rank:exports.Rank.Eight,suit:exports.Suit.Clubs},{rank:exports.Rank.Nine,suit:exports.Suit.Clubs},{rank:exports.Rank.Ten,suit:exports.Suit.Clubs},{rank:exports.Rank.Jack,suit:exports.Suit.Clubs},{rank:exports.Rank.Queen,suit:exports.Suit.Clubs},{rank:exports.Rank.King,suit:exports.Suit.Clubs},{rank:exports.Rank.Ace,suit:exports.Suit.Diamonds},{rank:exports.Rank.Two,suit:exports.Suit.Diamonds},{rank:exports.Rank.Three,suit:exports.Suit.Diamonds},{rank:exports.Rank.Four,suit:exports.Suit.Diamonds},{rank:exports.Rank.Five,suit:exports.Suit.Diamonds},{rank:exports.Rank.Six,suit:exports.Suit.Diamonds},{rank:exports.Rank.Seven,suit:exports.Suit.Diamonds},{rank:exports.Rank.Eight,suit:exports.Suit.Diamonds},{rank:exports.Rank.Nine,suit:exports.Suit.Diamonds},{rank:exports.Rank.Ten,suit:exports.Suit.Diamonds},{rank:exports.Rank.Jack,suit:exports.Suit.Diamonds},{rank:exports.Rank.Queen,suit:exports.Suit.Diamonds},{rank:exports.Rank.King,suit:exports.Suit.Diamonds},{rank:exports.Rank.Ace,suit:exports.Suit.Hearts},{rank:exports.Rank.Two,suit:exports.Suit.Hearts},{rank:exports.Rank.Three,suit:exports.Suit.Hearts},{rank:exports.Rank.Four,suit:exports.Suit.Hearts},{rank:exports.Rank.Five,suit:exports.Suit.Hearts},{rank:exports.Rank.Six,suit:exports.Suit.Hearts},{rank:exports.Rank.Seven,suit:exports.Suit.Hearts},{rank:exports.Rank.Eight,suit:exports.Suit.Hearts},{rank:exports.Rank.Nine,suit:exports.Suit.Hearts},{rank:exports.Rank.Ten,suit:exports.Suit.Hearts},{rank:exports.Rank.Jack,suit:exports.Suit.Hearts},{rank:exports.Rank.Queen,suit:exports.Suit.Hearts},{rank:exports.Rank.King,suit:exports.Suit.Hearts},{rank:exports.Rank.Ace,suit:exports.Suit.Spades},{rank:exports.Rank.Two,suit:exports.Suit.Spades},{rank:exports.Rank.Three,suit:exports.Suit.Spades},{rank:exports.Rank.Four,suit:exports.Suit.Spades},{rank:exports.Rank.Five,suit:exports.Suit.Spades},{rank:exports.Rank.Six,suit:exports.Suit.Spades},{rank:exports.Rank.Seven,suit:exports.Suit.Spades},{rank:exports.Rank.Eight,suit:exports.Suit.Spades},{rank:exports.Rank.Nine,suit:exports.Suit.Spades},{rank:exports.Rank.Ten,suit:exports.Suit.Spades},{rank:exports.Rank.Jack,suit:exports.Suit.Spades},{rank:exports.Rank.Queen,suit:exports.Suit.Spades},{rank:exports.Rank.King,suit:exports.Suit.Spades}],A=function(t){var e,r;function n(e,r){var n;return(n=t.call(this,r)||this).defaultValueOrDefaultValueFn=e,n.defaultValueIsFunction="function"==typeof n.defaultValueOrDefaultValueFn,n}return r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,n.prototype.get=function(e){return this.has(e)?t.prototype.get.call(this,e):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(e):this.defaultValueOrDefaultValueFn},n}(u(Map));function L(t){for(var e,r=t[0].map((function(t){return t.length})),n=c(t);!(e=n()).done;)for(var o=e.value,i=0;i<o.length;i++){var a=o[i].length;r[i]<a&&(r[i]=a)}return r}!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(O||(O={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(N||(N={}));var M={__proto__:null,get Status(){return O},get Method(){return N}};function F(t,e){return t+e}function _(t){var e=j(t);return t.map((function(t){return Math.pow(t-e,2)})).reduce(F)/(t.length-1)}function C(t,e,r){return 1/(e*Math.sqrt(2*Math.PI))*Math.pow(Math.E,-.5*Math.pow(t-r/e,2))}function j(t){var e=t.reduce(F);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function D(t,e){return Math.random()*(e-t)+t}function H(){return(H=e(h.mark((function t(e){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:return t.t0=t.sent,t.t1=void 0,t.abrupt("return",[t.t0,t.t1]);case 8:return t.prev=8,t.t2=t.catch(0),t.abrupt("return",[void 0,t.t2]);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))).apply(this,arguments)}var I=function(){function t(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}t.from=function(e){return new t(e[0],e[1])};var e=t.prototype;return e.has=function(t){return t>=this.lower&&t<=this.upper},e[Symbol.iterator]=h.mark((function t(){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.lower;case 2:return t.next=4,this.upper;case 4:case"end":return t.stop()}}),t,this)})),t}();function q(t,e){return t<e?-1:t>e?1:0}function U(t,e){return t<e?1:t>e?-1:0}var G={__proto__:null,ascending:function(t,e){return void 0===e&&"function"==typeof t?function(e,r){return q(t(e),t(r))}:q(t,e)},descending:function(t,e){return void 0===e&&"function"==typeof t?function(e,r){return U(t(e),t(r))}:U(t,e)}},V=function(){function t(){}t.start=function(){var t=new this;return t.start(),t};var e,r=t.prototype;return r.start=function(){this.startTime=process.hrtime.bigint()},r.end=function(){return Number(process.hrtime.bigint()-this.startTime)/1e6},(e=[{key:"started",get:function(){return void 0!==this.startTime}}])&&function(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(t.prototype,e),t}();exports.Bitwise={__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}},exports.DefaultMap=A,exports.Http=M,exports.Range=I,exports.Sort=G,exports.Stopwatch=V,exports.allDuplicates=function(t){for(var e,r=new Set,n=[],o=c(t);!(e=o()).done;){var i=e.value;r.has(i)?n.push(i):r.add(i)}return n},exports.binarySearch=function(t,e){for(var r=0,n=t.length-1;r<=n;){var o=Math.trunc((r+n)/2),i=e(t[o]);if(i<0)r=o+1;else{if(!(i>0))return t[o];n=o-1}}},exports.capitalize=function(t){var e=t.charAt(0).toUpperCase();return""+e+t.slice(e.length)},exports.chunk=function(t,e){return t.length===e?t.map((function(t){return[t]})):E((function(r){return t.slice(r*e,r*e+e)}),Math.ceil(t.length/e))},exports.clamp=function(t,e,r){return t<e?e:t>r?r:t},exports.combineIterables=k,exports.count=function(t,e){for(var r,n=0,o=c(t);!(r=o()).done;)r.value===e&&n++;return n},exports.cycle=b,exports.difference=function(t,e){for(var r,n=new Set(t),o=c(e);!(r=o()).done;)n.delete(r.value);return n},exports.duplicates=function(t){for(var e,r=new Set,n=new Set,o=c(t);!(e=o()).done;){var i=e.value;r.has(i)?n.add(i):r.add(i)}return n},exports.every=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(!e(r.value))return!1;return!0},exports.fill=function(t,e){return Array.from({length:e},(function(){return t}))},exports.find=function(t,e){for(var r,n=c(t);!(r=n()).done;){var o=r.value;if(e(o))return o}},exports.first=function(t,e){if(void 0!==e)return S(t,e);for(var r,n=c(t);!(r=n()).done;)return r.value},exports.formatTable=function(t,e){void 0===e&&(e=" ");var r=L(t);return t.map((function(t){return t.map((function(t,e){return t.padEnd(r[e])})).join(e)})).join("\n")},exports.frequencyTable=function(t){for(var e,r=new Map,n=c(t);!(e=n()).done;){var o=e.value,i=r.get(o);r.set(o,(null!=i?i:0)+1)}return r},exports.holes=function(t){for(var e=[],r=0;r<t.length;r++)r in t||e.push(r);return e},exports.identical=function(t,e){if(Array.isArray(t)&&Array.isArray(e))return function(t,e){return t===e||t.length===e.length&&t.every((function(t,r){return t===e[r]}))}(t,e);if(t instanceof Set&&e instanceof Set)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(var r,n=c(t);!(r=n()).done;)if(!e.has(r.value))return!1;return!0}(t,e);if(t instanceof Map&&e instanceof Map)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(var r,n=c(t.entries());!(r=n()).done;){var o=r.value,i=o[0],a=o[1];if(!e.has(i)||e.get(i)!==a)return!1}return!0}(t,e);throw new RangeError("Expected both parameters to be an array, Set, or Map")},exports.includes=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(r.value===e)return!0;return!1},exports.intersection=function(t,e){for(var r,n=new Set,o=T(t,e),i=o[1],a=c(o[0]);!(r=a()).done;){var u=r.value;i.has(u)&&n.add(u)}return n},exports.invert=function(t){return function(){return-t.apply(void 0,arguments)}},exports.isDisjoint=function(t,e){for(var r,n=t instanceof Set?t:new Set(t),o=c(e);!(r=o()).done;)if(n.has(r.value))return!1;return!0},exports.isSubset=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(!e.has(r.value))return!1;return!0},exports.isSuperset=function(t,e){for(var r,n=c(e);!(r=n()).done;)if(!t.has(r.value))return!1;return!0},exports.join=function(t,e){void 0===e&&(e=",");for(var r="",n=t[Symbol.iterator](),o=n.next();;){var i=o;if(o=n.next(),r+=i.value,o.done)return r;r+=e}},exports.largeToSmall=T,exports.lines=function(t){return t.split("\n").map((function(t){return t.trim()})).filter((function(t){return t.length>0}))},exports.mapFill=E,exports.mapRepeat=R,exports.max=function(t,e){return e>t?e:t},exports.maxColumnLength=L,exports.mean=j,exports.median=function(t){var e=t.length/2;return t.length%2==0?(t[e-1]+t[e])/("bigint"==typeof t[0]?2n:2):t[Math.floor(e)]},exports.min=function(t,e){return e<t?e:t},exports.mode=function(t){for(var e,r=new Map,n=0,o=[],i=c(t);!(e=i()).done;){var a=e.value,u=r.get(a),s=void 0===u?1:u+1;r.set(a,s),s>n?(n=s,o=[a]):s===n&&o.push(a)}return o},exports.multiReplace=function(t,e){for(var r=Object.entries(e),n="",o=0;o<t.length;)t:do{for(var i,a=c(r);!(i=a()).done;){var u=i.value,s=u[0],p=u[1];if(t.slice(o).startsWith(s)){n+=p,o+=s.length;break t}}n+=t[o++]}while(0);return n},exports.newDeck=function(){return[].concat(P)},exports.normaldist=C,exports.not=function(t){return function(){return!t.apply(void 0,arguments)}},exports.nullish=function(t){return null==t},exports.padEnd=function(t,e,r){t.push.apply(t,w(r,e-t.length))},exports.padStart=function(t,e,r){t.unshift.apply(t,w(r,e-t.length))},exports.partition=function(t,e){for(var r,n=[],o=[],i=0,a=c(t);!(r=a()).done;){var u=r.value;(e(u,i++)?n:o).push(u)}return[n,o]},exports.product=function(t,e){return t*e},exports.pull=function(t,e){var r=t.indexOf(e);return-1===r?[]:t.splice(r,1)},exports.random=D,exports.randomInt=function(t,e){return Math.floor(D(Math.ceil(t),Math.floor(e)))},exports.regExpUnion=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return new RegExp(e.map((function(t){return"("+t.source+")"})).join("|"))},exports.rename=function(t,e,n){var o;return e===n?r({},t):function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)e.indexOf(r=i[n])>=0||(o[r]=t[r]);return o}(r({},t,((o={})[n]=t[e],o)),[e].map(p))},exports.repeat=w,exports.same=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=e.map((function(t){return t[Symbol.iterator]()})),o=function(){for(var t,e=n.map((function(t){return t.next()})),r=e[0],o=r.done,i=r.value,a=c(e);!(t=a()).done;){var u=t.value;if(u.done)return{v:e.every((function(t){return t.done===o}))};if(u.value!==i)return{v:!1}}};;){var i=o();if("object"==typeof i)return i.v}},exports.sample=function(t){return t[Math.floor(Math.random()*t.length)]},exports.settled=function(t){return H.apply(this,arguments)},exports.shuffle=function(t,e){void 0===e&&(e=!0);for(var r=e?t:[].concat(t),n=r.length-1;n>0;n--){var o=Math.floor(Math.random()*(n+1)),i=[r[o],r[n]];r[n]=i[0],r[o]=i[1]}if(!e)return r},exports.some=function(t,e){for(var r,n=c(t);!(r=n()).done;)if(e(r.value))return!0;return!1},exports.sortObject=function(t,e){return Object.entries(t).sort((function(t,r){return e(t[1],r[1])}))},exports.standardNormaldist=function(t){return C(t,1,0)},exports.stddev=function(t){return Math.sqrt(_(t))},exports.sum=F,exports.symmetricDifference=function(t,e){for(var r,n=new Set(t),o=c(e);!(r=o()).done;){var i=r.value;n.has(i)?n.delete(i):n.add(i)}return n},exports.toDigits=function(t,e){var r=Math.pow(10,e);return Math.round(t*r*(1+Number.EPSILON))/r},exports.truncate=function(t,e,r){return void 0===r&&(r=""),t.length>e?""+t.slice(0,e)+r:t},exports.uncapitalize=function(t){var e=t.charAt(0).toLowerCase();return""+e+t.slice(e.length)},exports.union=function(t,e){return new Set(k(t,e))},exports.variance=_; | ||
//# sourceMappingURL=util.cjs.production.min.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self)["@jonahsnider/util"]={})}(this,(function(t){"use strict";function e(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function n(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)}))}}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function u(t,e,n){return(u=a()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function c(t){var e="function"==typeof Map?new Map:void 0;return(c=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return u(t,arguments,o(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),i(n,t)})(t)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=t[Symbol.iterator]()).next.bind(n)}function l(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}var d,p,h=function(t,e){return function(t){var e=function(t){var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new R(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=S(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,i),o}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function d(){}function p(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(x([])));y&&y!==e&&n.call(y,o)&&(h=y);var m=p.prototype=l.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function S(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function x(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return d.prototype=m.constructor=p,p.constructor=d,d.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(k.prototype),k.prototype[i]=function(){return this},t.AsyncIterator=k,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new k(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),u(m,a,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=x,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:x(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}(e={exports:{}}),e.exports}(),v=h.mark(S),y=h.mark(b),m=h.mark(w),g=h.mark(R),k=h.mark(x);function S(){var t,e,n,r,o,i=arguments;return h.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:for(t=i.length,e=new Array(t),n=0;n<t;n++)e[n]=i[n];r=0,o=e;case 2:if(!(r<o.length)){a.next=8;break}return a.delegateYield(o[r],"t0",5);case 5:r++,a.next=2;break;case 8:case"end":return a.stop()}}),v)}function b(t,e){var n,r,o;return h.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:n=f(t);case 1:if((r=n()).done){i.next=11;break}if(o=r.value,!e--){i.next=8;break}return i.next=6,o;case 6:i.next=9;break;case 8:return i.abrupt("break",11);case 9:i.next=1;break;case 11:case"end":return i.stop()}}),y)}function w(t,e){var n;return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=0;case 1:if(!(n<e)){r.next=6;break}return r.delegateYield(t,"t0",3);case 3:n++,r.next=1;break;case 6:case"end":return r.stop()}}),m)}function R(t,e){var n;return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=0;case 1:if(!(n<e)){r.next=7;break}return r.next=4,t;case 4:n++,r.next=1;break;case 7:case"end":return r.stop()}}),g)}function x(t,e){var n;return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=0;case 1:if(!(n<e)){r.next=7;break}return r.next=4,t(n);case 4:n++,r.next=1;break;case 7:case"end":return r.stop()}}),k)}function T(t,e){var n=void 0;if("size"in t?n="size":"length"in t&&(n="length"),!n)throw new RangeError;return t[n]<e[n]?[e,t]:[t,e]}function E(t,e){return Array.from({length:e},(function(e,n){return t(n)}))}(d=t.Rank||(t.Rank={}))[d.Ace=1]="Ace",d[d.Two=2]="Two",d[d.Three=3]="Three",d[d.Four=4]="Four",d[d.Five=5]="Five",d[d.Six=6]="Six",d[d.Seven=7]="Seven",d[d.Eight=8]="Eight",d[d.Nine=9]="Nine",d[d.Ten=10]="Ten",d[d.Jack=11]="Jack",d[d.Queen=12]="Queen",d[d.King=13]="King",(p=t.Suit||(t.Suit={}))[p.Clubs=0]="Clubs",p[p.Diamonds=1]="Diamonds",p[p.Hearts=2]="Hearts",p[p.Spades=3]="Spades";var O,N,P=[{rank:t.Rank.Ace,suit:t.Suit.Clubs},{rank:t.Rank.Two,suit:t.Suit.Clubs},{rank:t.Rank.Three,suit:t.Suit.Clubs},{rank:t.Rank.Four,suit:t.Suit.Clubs},{rank:t.Rank.Five,suit:t.Suit.Clubs},{rank:t.Rank.Six,suit:t.Suit.Clubs},{rank:t.Rank.Seven,suit:t.Suit.Clubs},{rank:t.Rank.Eight,suit:t.Suit.Clubs},{rank:t.Rank.Nine,suit:t.Suit.Clubs},{rank:t.Rank.Ten,suit:t.Suit.Clubs},{rank:t.Rank.Jack,suit:t.Suit.Clubs},{rank:t.Rank.Queen,suit:t.Suit.Clubs},{rank:t.Rank.King,suit:t.Suit.Clubs},{rank:t.Rank.Ace,suit:t.Suit.Diamonds},{rank:t.Rank.Two,suit:t.Suit.Diamonds},{rank:t.Rank.Three,suit:t.Suit.Diamonds},{rank:t.Rank.Four,suit:t.Suit.Diamonds},{rank:t.Rank.Five,suit:t.Suit.Diamonds},{rank:t.Rank.Six,suit:t.Suit.Diamonds},{rank:t.Rank.Seven,suit:t.Suit.Diamonds},{rank:t.Rank.Eight,suit:t.Suit.Diamonds},{rank:t.Rank.Nine,suit:t.Suit.Diamonds},{rank:t.Rank.Ten,suit:t.Suit.Diamonds},{rank:t.Rank.Jack,suit:t.Suit.Diamonds},{rank:t.Rank.Queen,suit:t.Suit.Diamonds},{rank:t.Rank.King,suit:t.Suit.Diamonds},{rank:t.Rank.Ace,suit:t.Suit.Hearts},{rank:t.Rank.Two,suit:t.Suit.Hearts},{rank:t.Rank.Three,suit:t.Suit.Hearts},{rank:t.Rank.Four,suit:t.Suit.Hearts},{rank:t.Rank.Five,suit:t.Suit.Hearts},{rank:t.Rank.Six,suit:t.Suit.Hearts},{rank:t.Rank.Seven,suit:t.Suit.Hearts},{rank:t.Rank.Eight,suit:t.Suit.Hearts},{rank:t.Rank.Nine,suit:t.Suit.Hearts},{rank:t.Rank.Ten,suit:t.Suit.Hearts},{rank:t.Rank.Jack,suit:t.Suit.Hearts},{rank:t.Rank.Queen,suit:t.Suit.Hearts},{rank:t.Rank.King,suit:t.Suit.Hearts},{rank:t.Rank.Ace,suit:t.Suit.Spades},{rank:t.Rank.Two,suit:t.Suit.Spades},{rank:t.Rank.Three,suit:t.Suit.Spades},{rank:t.Rank.Four,suit:t.Suit.Spades},{rank:t.Rank.Five,suit:t.Suit.Spades},{rank:t.Rank.Six,suit:t.Suit.Spades},{rank:t.Rank.Seven,suit:t.Suit.Spades},{rank:t.Rank.Eight,suit:t.Suit.Spades},{rank:t.Rank.Nine,suit:t.Suit.Spades},{rank:t.Rank.Ten,suit:t.Suit.Spades},{rank:t.Rank.Jack,suit:t.Suit.Spades},{rank:t.Rank.Queen,suit:t.Suit.Spades},{rank:t.Rank.King,suit:t.Suit.Spades}],M=function(t){var e,n;function r(e,n){var r;return(r=t.call(this,n)||this).defaultValueOrDefaultValueFn=e,r.defaultValueIsFunction="function"==typeof r.defaultValueOrDefaultValueFn,r}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.prototype.get=function(e){return this.has(e)?t.prototype.get.call(this,e):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(e):this.defaultValueOrDefaultValueFn},r}(c(Map));function L(t){for(var e,n=t[0].map((function(t){return t.length})),r=f(t);!(e=r()).done;)for(var o=e.value,i=0;i<o.length;i++){var a=o[i].length;n[i]<a&&(n[i]=a)}return n}!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(O||(O={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(N||(N={}));var A={__proto__:null,get Status(){return O},get Method(){return N}};function F(t,e){return t+e}function _(t){var e=C(t);return t.map((function(t){return Math.pow(t-e,2)})).reduce(F)/(t.length-1)}function j(t,e,n){return 1/(e*Math.sqrt(2*Math.PI))*Math.pow(Math.E,-.5*Math.pow(t-n/e,2))}function C(t){var e=t.reduce(F);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function D(t,e){return Math.random()*(e-t)+t}function H(){return(H=n(h.mark((function t(e){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:return t.t0=t.sent,t.t1=void 0,t.abrupt("return",[t.t0,t.t1]);case 8:return t.prev=8,t.t2=t.catch(0),t.abrupt("return",[void 0,t.t2]);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))).apply(this,arguments)}var I=function(){function t(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}t.from=function(e){return new t(e[0],e[1])};var e=t.prototype;return e.has=function(t){return t>=this.lower&&t<=this.upper},e[Symbol.iterator]=h.mark((function t(){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.lower;case 2:return t.next=4,this.upper;case 4:case"end":return t.stop()}}),t,this)})),t}();function q(t,e){return t<e?-1:t>e?1:0}function U(t,e){return t<e?1:t>e?-1:0}var G={__proto__:null,ascending:function(t,e){return void 0===e&&"function"==typeof t?function(e,n){return q(t(e),t(n))}:q(t,e)},descending:function(t,e){return void 0===e&&"function"==typeof t?function(e,n){return U(t(e),t(n))}:U(t,e)}},V=function(){function t(){}t.start=function(){var t=new this;return t.start(),t};var e,n=t.prototype;return n.start=function(){this.startTime=process.hrtime.bigint()},n.end=function(){return Number(process.hrtime.bigint()-this.startTime)/1e6},(e=[{key:"started",get:function(){return void 0!==this.startTime}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),t}();t.Bitwise={__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}},t.DefaultMap=M,t.Http=A,t.Range=I,t.Sort=G,t.Stopwatch=V,t.allDuplicates=function(t){for(var e,n=new Set,r=[],o=f(t);!(e=o()).done;){var i=e.value;n.has(i)?r.push(i):n.add(i)}return r},t.binarySearch=function(t,e){for(var n=0,r=t.length-1;n<=r;){var o=Math.trunc((n+r)/2),i=e(t[o]);if(i<0)n=o+1;else{if(!(i>0))return t[o];r=o-1}}},t.chunk=function(t,e){return t.length===e?t.map((function(t){return[t]})):E((function(n){return t.slice(n*e,n*e+e)}),Math.ceil(t.length/e))},t.clamp=function(t,e,n){return t<e?e:t>n?n:t},t.combineIterables=S,t.count=function(t,e){for(var n,r=0,o=f(t);!(n=o()).done;)n.value===e&&r++;return r},t.cycle=w,t.difference=function(t,e){for(var n,r=new Set(t),o=f(e);!(n=o()).done;)r.delete(n.value);return r},t.duplicates=function(t){for(var e,n=new Set,r=new Set,o=f(t);!(e=o()).done;){var i=e.value;n.has(i)?r.add(i):n.add(i)}return r},t.every=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(!e(n.value))return!1;return!0},t.fill=function(t,e){return Array.from({length:e},(function(){return t}))},t.find=function(t,e){for(var n,r=f(t);!(n=r()).done;){var o=n.value;if(e(o))return o}},t.first=function(t,e){if(void 0!==e)return b(t,e);for(var n,r=f(t);!(n=r()).done;)return n.value},t.formatTable=function(t,e){void 0===e&&(e=" ");var n=L(t);return t.map((function(t){return t.map((function(t,e){return t.padEnd(n[e])})).join(e)})).join("\n")},t.frequencyTable=function(t){for(var e,n=new Map,r=f(t);!(e=r()).done;){var o=e.value,i=n.get(o);n.set(o,(null!=i?i:0)+1)}return n},t.holes=function(t){for(var e=[],n=0;n<t.length;n++)n in t||e.push(n);return e},t.identical=function(t,e){if(Array.isArray(t)&&Array.isArray(e))return function(t,e){return t===e||t.length===e.length&&t.every((function(t,n){return t===e[n]}))}(t,e);if(t instanceof Set&&e instanceof Set)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(var n,r=f(t);!(n=r()).done;)if(!e.has(n.value))return!1;return!0}(t,e);if(t instanceof Map&&e instanceof Map)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(var n,r=f(t.entries());!(n=r()).done;){var o=n.value,i=o[0],a=o[1];if(!e.has(i)||e.get(i)!==a)return!1}return!0}(t,e);throw new RangeError("Expected both parameters to be an array, Set, or Map")},t.includes=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(n.value===e)return!0;return!1},t.intersection=function(t,e){for(var n,r=new Set,o=T(t,e),i=o[1],a=f(o[0]);!(n=a()).done;){var u=n.value;i.has(u)&&r.add(u)}return r},t.invert=function(t){return function(){return-t.apply(void 0,arguments)}},t.isDisjoint=function(t,e){for(var n,r=t instanceof Set?t:new Set(t),o=f(e);!(n=o()).done;)if(r.has(n.value))return!1;return!0},t.isSubset=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(!e.has(n.value))return!1;return!0},t.isSuperset=function(t,e){for(var n,r=f(e);!(n=r()).done;)if(!t.has(n.value))return!1;return!0},t.join=function(t,e){void 0===e&&(e=",");for(var n="",r=t[Symbol.iterator](),o=r.next();;){var i=o;if(o=r.next(),n+=i.value,o.done)return n;n+=e}},t.largeToSmall=T,t.mapFill=E,t.mapRepeat=x,t.max=function(t,e){return e>t?e:t},t.maxColumnLength=L,t.mean=C,t.median=function(t){var e=t.length/2;return t.length%2==0?(t[e-1]+t[e])/("bigint"==typeof t[0]?2n:2):t[Math.floor(e)]},t.min=function(t,e){return e<t?e:t},t.mode=function(t){for(var e,n=new Map,r=0,o=[],i=f(t);!(e=i()).done;){var a=e.value,u=n.get(a),c=void 0===u?1:u+1;n.set(a,c),c>r?(r=c,o=[a]):c===r&&o.push(a)}return o},t.newDeck=function(){return[].concat(P)},t.normaldist=j,t.not=function(t){return function(){return!t.apply(void 0,arguments)}},t.nullish=function(t){return null==t},t.padEnd=function(t,e,n){t.push.apply(t,R(n,e-t.length))},t.padStart=function(t,e,n){t.unshift.apply(t,R(n,e-t.length))},t.partition=function(t,e){for(var n,r=[],o=[],i=0,a=f(t);!(n=a()).done;){var u=n.value;(e(u,i++)?r:o).push(u)}return[r,o]},t.product=function(t,e){return t*e},t.pull=function(t,e){var n=t.indexOf(e);return-1===n?[]:t.splice(n,1)},t.random=D,t.randomInt=function(t,e){return Math.floor(D(Math.ceil(t),Math.floor(e)))},t.regExpUnion=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new RegExp(e.map((function(t){return"("+t.source+")"})).join("|"))},t.rename=function(t,e,n){var o;return e===n?r({},t):function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)e.indexOf(n=i[r])>=0||(o[n]=t[n]);return o}(r({},t,((o={})[n]=t[e],o)),[e].map(l))},t.repeat=R,t.same=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=e.map((function(t){return t[Symbol.iterator]()})),o=function(){for(var t,e=r.map((function(t){return t.next()})),n=e[0],o=n.done,i=n.value,a=f(e);!(t=a()).done;){var u=t.value;if(u.done)return{v:e.every((function(t){return t.done===o}))};if(u.value!==i)return{v:!1}}};;){var i=o();if("object"==typeof i)return i.v}},t.sample=function(t){return t[Math.floor(Math.random()*t.length)]},t.settled=function(t){return H.apply(this,arguments)},t.shuffle=function(t,e){void 0===e&&(e=!0);for(var n=e?t:[].concat(t),r=n.length-1;r>0;r--){var o=Math.floor(Math.random()*(r+1)),i=[n[o],n[r]];n[r]=i[0],n[o]=i[1]}if(!e)return n},t.some=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(e(n.value))return!0;return!1},t.sortObject=function(t,e){return Object.entries(t).sort((function(t,n){return e(t[1],n[1])}))},t.standardNormaldist=function(t){return j(t,1,0)},t.stddev=function(t){return Math.sqrt(_(t))},t.sum=F,t.symmetricDifference=function(t,e){for(var n,r=new Set(t),o=f(e);!(n=o()).done;){var i=n.value;r.has(i)?r.delete(i):r.add(i)}return r},t.toDigits=function(t,e){var n=Math.pow(10,e);return Math.round(t*n*(1+Number.EPSILON))/n},t.union=function(t,e){return new Set(S(t,e))},t.variance=_,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self)["@jonahsnider/util"]={})}(this,(function(t){"use strict";function e(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function n(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)}))}}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function o(t){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function u(t,e,n){return(u=a()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function c(t){var e="function"==typeof Map?new Map:void 0;return(c=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return u(t,arguments,o(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),i(n,t)})(t)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function f(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,void 0):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=t[Symbol.iterator]()).next.bind(n)}function l(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}var p,d,h=function(t,e){return function(t){var e=function(t){var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new R(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return{value:void 0,done:!0}}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=S(a,n);if(u){if(u===f)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,i),o}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function p(){}function d(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,y=v&&v(v(x([])));y&&y!==e&&n.call(y,o)&&(h=y);var m=d.prototype=l.prototype=Object.create(h);function g(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function S(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=s(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function x(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return p.prototype=m.constructor=d,d.constructor=p,p.displayName=u(d,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,u(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},g(k.prototype),k.prototype[i]=function(){return this},t.AsyncIterator=k,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new k(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},g(m),u(m,a,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=x,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:x(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=e}catch(t){Function("r","regeneratorRuntime = r")(e)}}(e={exports:{}}),e.exports}(),v=h.mark(S),y=h.mark(b),m=h.mark(w),g=h.mark(R),k=h.mark(x);function S(){var t,e,n,r,o,i=arguments;return h.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:for(t=i.length,e=new Array(t),n=0;n<t;n++)e[n]=i[n];r=0,o=e;case 2:if(!(r<o.length)){a.next=8;break}return a.delegateYield(o[r],"t0",5);case 5:r++,a.next=2;break;case 8:case"end":return a.stop()}}),v)}function b(t,e){var n,r,o;return h.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:n=f(t);case 1:if((r=n()).done){i.next=11;break}if(o=r.value,!e--){i.next=8;break}return i.next=6,o;case 6:i.next=9;break;case 8:return i.abrupt("break",11);case 9:i.next=1;break;case 11:case"end":return i.stop()}}),y)}function w(t,e){var n;return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=0;case 1:if(!(n<e)){r.next=6;break}return r.delegateYield(t,"t0",3);case 3:n++,r.next=1;break;case 6:case"end":return r.stop()}}),m)}function R(t,e){var n;return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=0;case 1:if(!(n<e)){r.next=7;break}return r.next=4,t;case 4:n++,r.next=1;break;case 7:case"end":return r.stop()}}),g)}function x(t,e){var n;return h.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=0;case 1:if(!(n<e)){r.next=7;break}return r.next=4,t(n);case 4:n++,r.next=1;break;case 7:case"end":return r.stop()}}),k)}function T(t,e){var n=void 0;if("size"in t?n="size":"length"in t&&(n="length"),!n)throw new RangeError;return t[n]<e[n]?[e,t]:[t,e]}function E(t,e){return Array.from({length:e},(function(e,n){return t(n)}))}(p=t.Rank||(t.Rank={}))[p.Ace=1]="Ace",p[p.Two=2]="Two",p[p.Three=3]="Three",p[p.Four=4]="Four",p[p.Five=5]="Five",p[p.Six=6]="Six",p[p.Seven=7]="Seven",p[p.Eight=8]="Eight",p[p.Nine=9]="Nine",p[p.Ten=10]="Ten",p[p.Jack=11]="Jack",p[p.Queen=12]="Queen",p[p.King=13]="King",(d=t.Suit||(t.Suit={}))[d.Clubs=0]="Clubs",d[d.Diamonds=1]="Diamonds",d[d.Hearts=2]="Hearts",d[d.Spades=3]="Spades";var O,N,P=[{rank:t.Rank.Ace,suit:t.Suit.Clubs},{rank:t.Rank.Two,suit:t.Suit.Clubs},{rank:t.Rank.Three,suit:t.Suit.Clubs},{rank:t.Rank.Four,suit:t.Suit.Clubs},{rank:t.Rank.Five,suit:t.Suit.Clubs},{rank:t.Rank.Six,suit:t.Suit.Clubs},{rank:t.Rank.Seven,suit:t.Suit.Clubs},{rank:t.Rank.Eight,suit:t.Suit.Clubs},{rank:t.Rank.Nine,suit:t.Suit.Clubs},{rank:t.Rank.Ten,suit:t.Suit.Clubs},{rank:t.Rank.Jack,suit:t.Suit.Clubs},{rank:t.Rank.Queen,suit:t.Suit.Clubs},{rank:t.Rank.King,suit:t.Suit.Clubs},{rank:t.Rank.Ace,suit:t.Suit.Diamonds},{rank:t.Rank.Two,suit:t.Suit.Diamonds},{rank:t.Rank.Three,suit:t.Suit.Diamonds},{rank:t.Rank.Four,suit:t.Suit.Diamonds},{rank:t.Rank.Five,suit:t.Suit.Diamonds},{rank:t.Rank.Six,suit:t.Suit.Diamonds},{rank:t.Rank.Seven,suit:t.Suit.Diamonds},{rank:t.Rank.Eight,suit:t.Suit.Diamonds},{rank:t.Rank.Nine,suit:t.Suit.Diamonds},{rank:t.Rank.Ten,suit:t.Suit.Diamonds},{rank:t.Rank.Jack,suit:t.Suit.Diamonds},{rank:t.Rank.Queen,suit:t.Suit.Diamonds},{rank:t.Rank.King,suit:t.Suit.Diamonds},{rank:t.Rank.Ace,suit:t.Suit.Hearts},{rank:t.Rank.Two,suit:t.Suit.Hearts},{rank:t.Rank.Three,suit:t.Suit.Hearts},{rank:t.Rank.Four,suit:t.Suit.Hearts},{rank:t.Rank.Five,suit:t.Suit.Hearts},{rank:t.Rank.Six,suit:t.Suit.Hearts},{rank:t.Rank.Seven,suit:t.Suit.Hearts},{rank:t.Rank.Eight,suit:t.Suit.Hearts},{rank:t.Rank.Nine,suit:t.Suit.Hearts},{rank:t.Rank.Ten,suit:t.Suit.Hearts},{rank:t.Rank.Jack,suit:t.Suit.Hearts},{rank:t.Rank.Queen,suit:t.Suit.Hearts},{rank:t.Rank.King,suit:t.Suit.Hearts},{rank:t.Rank.Ace,suit:t.Suit.Spades},{rank:t.Rank.Two,suit:t.Suit.Spades},{rank:t.Rank.Three,suit:t.Suit.Spades},{rank:t.Rank.Four,suit:t.Suit.Spades},{rank:t.Rank.Five,suit:t.Suit.Spades},{rank:t.Rank.Six,suit:t.Suit.Spades},{rank:t.Rank.Seven,suit:t.Suit.Spades},{rank:t.Rank.Eight,suit:t.Suit.Spades},{rank:t.Rank.Nine,suit:t.Suit.Spades},{rank:t.Rank.Ten,suit:t.Suit.Spades},{rank:t.Rank.Jack,suit:t.Suit.Spades},{rank:t.Rank.Queen,suit:t.Suit.Spades},{rank:t.Rank.King,suit:t.Suit.Spades}],A=function(t){var e,n;function r(e,n){var r;return(r=t.call(this,n)||this).defaultValueOrDefaultValueFn=e,r.defaultValueIsFunction="function"==typeof r.defaultValueOrDefaultValueFn,r}return n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.prototype.get=function(e){return this.has(e)?t.prototype.get.call(this,e):this.defaultValueIsFunction?this.defaultValueOrDefaultValueFn(e):this.defaultValueOrDefaultValueFn},r}(c(Map));function L(t){for(var e,n=t[0].map((function(t){return t.length})),r=f(t);!(e=r()).done;)for(var o=e.value,i=0;i<o.length;i++){var a=o[i].length;n[i]<a&&(n[i]=a)}return n}!function(t){t[t.Continue=100]="Continue",t[t.SwitchingProtocols=101]="SwitchingProtocols",t[t.EarlyHints=103]="EarlyHints",t[t.Ok=200]="Ok",t[t.Created=201]="Created",t[t.Accepted=202]="Accepted",t[t.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",t[t.NoContent=204]="NoContent",t[t.ResetContent=205]="ResetContent",t[t.PartialContent=206]="PartialContent",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.Found=302]="Found",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.LengthRequired=411]="LengthRequired",t[t.PreconditionFailed=412]="PreconditionFailed",t[t.PayloadTooLarge=413]="PayloadTooLarge",t[t.UriTooLong=414]="UriTooLong",t[t.UnsupportedMediaType=415]="UnsupportedMediaType",t[t.RangeNotSatisfiable=416]="RangeNotSatisfiable",t[t.ExpectationFailed=417]="ExpectationFailed",t[t.ImATeapot=418]="ImATeapot",t[t.UnprocessableEntity=422]="UnprocessableEntity",t[t.TooEarly=425]="TooEarly",t[t.UpgradeRequired=426]="UpgradeRequired",t[t.PreconditionRequired=428]="PreconditionRequired",t[t.TooManyRequests=429]="TooManyRequests",t[t.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",t[t.UnavailableForLegalReasons=451]="UnavailableForLegalReasons",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout",t[t.HttpVersionNotSupported=505]="HttpVersionNotSupported",t[t.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",t[t.InsufficientStorage=507]="InsufficientStorage",t[t.LoopDetected=508]="LoopDetected",t[t.NotExtended=510]="NotExtended",t[t.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(O||(O={})),function(t){t.Get="GET",t.Head="HEAD",t.Post="POST",t.Put="PUT",t.Delete="DELETE",t.Connect="CONNECT",t.Options="OPTIONS",t.Trace="TRACE",t.Patch="PATCH"}(N||(N={}));var M={__proto__:null,get Status(){return O},get Method(){return N}};function F(t,e){return t+e}function _(t){var e=C(t);return t.map((function(t){return Math.pow(t-e,2)})).reduce(F)/(t.length-1)}function j(t,e,n){return 1/(e*Math.sqrt(2*Math.PI))*Math.pow(Math.E,-.5*Math.pow(t-n/e,2))}function C(t){var e=t.reduce(F);return e/("bigint"==typeof e?BigInt(t.length):t.length)}function D(t,e){return Math.random()*(e-t)+t}function H(){return(H=n(h.mark((function t(e){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e;case 3:return t.t0=t.sent,t.t1=void 0,t.abrupt("return",[t.t0,t.t1]);case 8:return t.prev=8,t.t2=t.catch(0),t.abrupt("return",[void 0,t.t2]);case 11:case"end":return t.stop()}}),t,null,[[0,8]])})))).apply(this,arguments)}var I=function(){function t(t,e){if(this.lower=t,this.upper=e,t>e)throw new RangeError("lower must be less than upper")}t.from=function(e){return new t(e[0],e[1])};var e=t.prototype;return e.has=function(t){return t>=this.lower&&t<=this.upper},e[Symbol.iterator]=h.mark((function t(){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.lower;case 2:return t.next=4,this.upper;case 4:case"end":return t.stop()}}),t,this)})),t}();function q(t,e){return t<e?-1:t>e?1:0}function U(t,e){return t<e?1:t>e?-1:0}var G={__proto__:null,ascending:function(t,e){return void 0===e&&"function"==typeof t?function(e,n){return q(t(e),t(n))}:q(t,e)},descending:function(t,e){return void 0===e&&"function"==typeof t?function(e,n){return U(t(e),t(n))}:U(t,e)}},V=function(){function t(){}t.start=function(){var t=new this;return t.start(),t};var e,n=t.prototype;return n.start=function(){this.startTime=process.hrtime.bigint()},n.end=function(){return Number(process.hrtime.bigint()-this.startTime)/1e6},(e=[{key:"started",get:function(){return void 0!==this.startTime}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),t}();t.Bitwise={__proto__:null,and:function(t,e){return t&e},or:function(t,e){return t|e},xor:function(t,e){return t^e}},t.DefaultMap=A,t.Http=M,t.Range=I,t.Sort=G,t.Stopwatch=V,t.allDuplicates=function(t){for(var e,n=new Set,r=[],o=f(t);!(e=o()).done;){var i=e.value;n.has(i)?r.push(i):n.add(i)}return r},t.binarySearch=function(t,e){for(var n=0,r=t.length-1;n<=r;){var o=Math.trunc((n+r)/2),i=e(t[o]);if(i<0)n=o+1;else{if(!(i>0))return t[o];r=o-1}}},t.capitalize=function(t){var e=t.charAt(0).toUpperCase();return""+e+t.slice(e.length)},t.chunk=function(t,e){return t.length===e?t.map((function(t){return[t]})):E((function(n){return t.slice(n*e,n*e+e)}),Math.ceil(t.length/e))},t.clamp=function(t,e,n){return t<e?e:t>n?n:t},t.combineIterables=S,t.count=function(t,e){for(var n,r=0,o=f(t);!(n=o()).done;)n.value===e&&r++;return r},t.cycle=w,t.difference=function(t,e){for(var n,r=new Set(t),o=f(e);!(n=o()).done;)r.delete(n.value);return r},t.duplicates=function(t){for(var e,n=new Set,r=new Set,o=f(t);!(e=o()).done;){var i=e.value;n.has(i)?r.add(i):n.add(i)}return r},t.every=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(!e(n.value))return!1;return!0},t.fill=function(t,e){return Array.from({length:e},(function(){return t}))},t.find=function(t,e){for(var n,r=f(t);!(n=r()).done;){var o=n.value;if(e(o))return o}},t.first=function(t,e){if(void 0!==e)return b(t,e);for(var n,r=f(t);!(n=r()).done;)return n.value},t.formatTable=function(t,e){void 0===e&&(e=" ");var n=L(t);return t.map((function(t){return t.map((function(t,e){return t.padEnd(n[e])})).join(e)})).join("\n")},t.frequencyTable=function(t){for(var e,n=new Map,r=f(t);!(e=r()).done;){var o=e.value,i=n.get(o);n.set(o,(null!=i?i:0)+1)}return n},t.holes=function(t){for(var e=[],n=0;n<t.length;n++)n in t||e.push(n);return e},t.identical=function(t,e){if(Array.isArray(t)&&Array.isArray(e))return function(t,e){return t===e||t.length===e.length&&t.every((function(t,n){return t===e[n]}))}(t,e);if(t instanceof Set&&e instanceof Set)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(var n,r=f(t);!(n=r()).done;)if(!e.has(n.value))return!1;return!0}(t,e);if(t instanceof Map&&e instanceof Map)return function(t,e){if(t===e)return!0;if(t.size!==e.size)return!1;for(var n,r=f(t.entries());!(n=r()).done;){var o=n.value,i=o[0],a=o[1];if(!e.has(i)||e.get(i)!==a)return!1}return!0}(t,e);throw new RangeError("Expected both parameters to be an array, Set, or Map")},t.includes=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(n.value===e)return!0;return!1},t.intersection=function(t,e){for(var n,r=new Set,o=T(t,e),i=o[1],a=f(o[0]);!(n=a()).done;){var u=n.value;i.has(u)&&r.add(u)}return r},t.invert=function(t){return function(){return-t.apply(void 0,arguments)}},t.isDisjoint=function(t,e){for(var n,r=t instanceof Set?t:new Set(t),o=f(e);!(n=o()).done;)if(r.has(n.value))return!1;return!0},t.isSubset=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(!e.has(n.value))return!1;return!0},t.isSuperset=function(t,e){for(var n,r=f(e);!(n=r()).done;)if(!t.has(n.value))return!1;return!0},t.join=function(t,e){void 0===e&&(e=",");for(var n="",r=t[Symbol.iterator](),o=r.next();;){var i=o;if(o=r.next(),n+=i.value,o.done)return n;n+=e}},t.largeToSmall=T,t.lines=function(t){return t.split("\n").map((function(t){return t.trim()})).filter((function(t){return t.length>0}))},t.mapFill=E,t.mapRepeat=x,t.max=function(t,e){return e>t?e:t},t.maxColumnLength=L,t.mean=C,t.median=function(t){var e=t.length/2;return t.length%2==0?(t[e-1]+t[e])/("bigint"==typeof t[0]?2n:2):t[Math.floor(e)]},t.min=function(t,e){return e<t?e:t},t.mode=function(t){for(var e,n=new Map,r=0,o=[],i=f(t);!(e=i()).done;){var a=e.value,u=n.get(a),c=void 0===u?1:u+1;n.set(a,c),c>r?(r=c,o=[a]):c===r&&o.push(a)}return o},t.multiReplace=function(t,e){for(var n=Object.entries(e),r="",o=0;o<t.length;)t:do{for(var i,a=f(n);!(i=a()).done;){var u=i.value,c=u[0],s=u[1];if(t.slice(o).startsWith(c)){r+=s,o+=c.length;break t}}r+=t[o++]}while(0);return r},t.newDeck=function(){return[].concat(P)},t.normaldist=j,t.not=function(t){return function(){return!t.apply(void 0,arguments)}},t.nullish=function(t){return null==t},t.padEnd=function(t,e,n){t.push.apply(t,R(n,e-t.length))},t.padStart=function(t,e,n){t.unshift.apply(t,R(n,e-t.length))},t.partition=function(t,e){for(var n,r=[],o=[],i=0,a=f(t);!(n=a()).done;){var u=n.value;(e(u,i++)?r:o).push(u)}return[r,o]},t.product=function(t,e){return t*e},t.pull=function(t,e){var n=t.indexOf(e);return-1===n?[]:t.splice(n,1)},t.random=D,t.randomInt=function(t,e){return Math.floor(D(Math.ceil(t),Math.floor(e)))},t.regExpUnion=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new RegExp(e.map((function(t){return"("+t.source+")"})).join("|"))},t.rename=function(t,e,n){var o;return e===n?r({},t):function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)e.indexOf(n=i[r])>=0||(o[n]=t[n]);return o}(r({},t,((o={})[n]=t[e],o)),[e].map(l))},t.repeat=R,t.same=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=e.map((function(t){return t[Symbol.iterator]()})),o=function(){for(var t,e=r.map((function(t){return t.next()})),n=e[0],o=n.done,i=n.value,a=f(e);!(t=a()).done;){var u=t.value;if(u.done)return{v:e.every((function(t){return t.done===o}))};if(u.value!==i)return{v:!1}}};;){var i=o();if("object"==typeof i)return i.v}},t.sample=function(t){return t[Math.floor(Math.random()*t.length)]},t.settled=function(t){return H.apply(this,arguments)},t.shuffle=function(t,e){void 0===e&&(e=!0);for(var n=e?t:[].concat(t),r=n.length-1;r>0;r--){var o=Math.floor(Math.random()*(r+1)),i=[n[o],n[r]];n[r]=i[0],n[o]=i[1]}if(!e)return n},t.some=function(t,e){for(var n,r=f(t);!(n=r()).done;)if(e(n.value))return!0;return!1},t.sortObject=function(t,e){return Object.entries(t).sort((function(t,n){return e(t[1],n[1])}))},t.standardNormaldist=function(t){return j(t,1,0)},t.stddev=function(t){return Math.sqrt(_(t))},t.sum=F,t.symmetricDifference=function(t,e){for(var n,r=new Set(t),o=f(e);!(n=o()).done;){var i=n.value;r.has(i)?r.delete(i):r.add(i)}return r},t.toDigits=function(t,e){var n=Math.pow(10,e);return Math.round(t*n*(1+Number.EPSILON))/n},t.truncate=function(t,e,n){return void 0===n&&(n=""),t.length>e?""+t.slice(0,e)+n:t},t.uncapitalize=function(t){var e=t.charAt(0).toLowerCase();return""+e+t.slice(e.length)},t.union=function(t,e){return new Set(S(t,e))},t.variance=_,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=util.umd.production.min.js.map |
{ | ||
"name": "@jonahsnider/util", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"description": "A useful collection of optimized utility functions", | ||
@@ -5,0 +5,0 @@ "homepage": "https://util.jonah.pw/", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1105769
11920