es-toolkit 1.51.0-dev.2069 → 1.51.0-dev.2071
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser.global.js +3 -3
- package/dist/fp/iterator/cartesianProduct.d.mts +23 -0
- package/dist/fp/iterator/cartesianProduct.d.ts +23 -0
- package/dist/fp/iterator/cartesianProduct.js +28 -0
- package/dist/fp/iterator/cartesianProduct.mjs +28 -0
- package/dist/fp/iterator/index.d.mts +2 -1
- package/dist/fp/iterator/index.d.ts +2 -1
- package/dist/fp/iterator/index.js +2 -0
- package/dist/fp/iterator/index.mjs +2 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -0
- package/dist/index.mjs +3 -1
- package/dist/iterator/cartesianProduct.d.mts +33 -0
- package/dist/iterator/cartesianProduct.d.ts +33 -0
- package/dist/iterator/cartesianProduct.js +95 -0
- package/dist/iterator/cartesianProduct.mjs +95 -0
- package/dist/iterator/index.d.mts +2 -1
- package/dist/iterator/index.d.ts +2 -1
- package/dist/iterator/index.js +2 -0
- package/dist/iterator/index.mjs +2 -1
- package/dist/util/defer.d.mts +27 -0
- package/dist/util/defer.d.ts +27 -0
- package/dist/util/defer.js +31 -0
- package/dist/util/defer.mjs +31 -0
- package/dist/util/deferAsync.d.mts +30 -0
- package/dist/util/deferAsync.d.ts +30 -0
- package/dist/util/deferAsync.js +34 -0
- package/dist/util/deferAsync.mjs +34 -0
- package/dist/util/index.d.mts +3 -1
- package/dist/util/index.d.ts +3 -1
- package/dist/util/index.js +4 -0
- package/dist/util/index.mjs +3 -1
- package/package.json +1 -1
package/dist/browser.global.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e._={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(...e){if(e.length===0)return[[]];let t=1;for(let n=0;n<e.length;n++)t*=e[n].length;if(t===0)return[];let n=e.length,r=Array(t);for(let i=0;i<t;i++){let t=Array(n),a=i;for(let r=n-1;r>=0;r--){let n=e[r],i=n.length;t[r]=n[a%i],a=Math.floor(a/i)}r[i]=t}return r}function n(e,t){if(!Number.isInteger(t)||t<=0)throw Error(`Size must be an integer greater than zero.`);let n=Math.ceil(e.length/t),r=Array(n);for(let i=0;i<n;i++){let n=i*t,a=n+t;r[i]=e.slice(n,a)}return r}function r(e,t){let n=[],r;for(let i=0;i<e.length;i++){let a=t(e[i]);i===0||a!==r?n.push([e[i]]):n[n.length-1].push(e[i]),r=a}return n}function i(e,t){if(!Number.isInteger(t)||t<0)throw Error(`r must be a non-negative integer.`);let n=e.length;if(t>n)return[];if(t===0)return[[]];let r=Array(t);for(let e=0;e<t;e++)r[e]=e;let i=[];for(;;){let a=Array(t);for(let n=0;n<t;n++)a[n]=e[r[n]];i.push(a);let o=t-1;for(;o>=0&&r[o]===o+n-t;)o--;if(o<0)return i;r[o]++;for(let e=o+1;e<t;e++)r[e]=r[e-1]+1}}function a(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];r&&t.push(r)}return t}function o(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function s(e,t,n){let r=new Set(t.map(e=>n(e)));return e.filter(e=>!r.has(n(e)))}function c(e,t,n){return e.filter(e=>t.every(t=>!n(e,t)))}function l(e,t){return t=Math.max(t,0),e.slice(t)}function u(e,t){return t=Math.min(-t,0),t===0?e.slice():e.slice(0,t)}function d(e,t){for(let n=e.length-1;n>=0;n--)if(!t(e[n],n,e))return e.slice(0,n+1);return[]}function f(e,t){let n=e.findIndex((e,n,r)=>!t(e,n,r));return n===-1?[]:e.slice(n)}function p(e,t,n=0,r=e.length){let i=e.length,a=Math.max(n>=0?n:i+n,0),o=Math.min(r>=0?r:i+r,i);for(let n=a;n<o;n++)e[n]=t;return e}var m=class{capacity;available;deferredTasks=[];constructor(e){this.capacity=e,this.available=e}async acquire(){if(this.available>0){this.available--;return}return new Promise(e=>{this.deferredTasks.push(e)})}release(){let e=this.deferredTasks.shift();if(e!=null){e();return}this.available<this.capacity&&this.available++}};function h(e,t){let n=new m(t);return async function(...t){try{return await n.acquire(),await e.apply(this,t)}finally{n.release()}}}async function ee(e,t,n){n?.concurrency!=null&&(t=h(t,n.concurrency));let r=await Promise.all(e.map(t));return e.filter((e,t)=>r[t])}function te(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}async function ne(e,t,n){return n?.concurrency!=null&&(t=h(t,n.concurrency)),te(await Promise.all(e.map(t)))}async function re(e,t,n){n?.concurrency!=null&&(t=h(t,n.concurrency)),await Promise.all(e.map(t))}function ie(e,t){let n={};for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);Object.hasOwn(n,a)||(n[a]=[]),n[a].push(i)}return n}function ae(e){return e[0]}function oe(e){return e.slice(0,-1)}function se(e,t){let n=new Set(t);return e.filter(e=>n.has(e))}function ce(e,t,n){let r=[],i=new Set(t.map(n));for(let t=0;t<e.length;t++){let a=e[t],o=n(a);i.has(o)&&(r.push(a),i.delete(o))}return r}function le(e,t,n){return e.filter(e=>t.some(t=>n(e,t)))}function ue(e,t){return o(t,e).length===0}function de(e,t,n){return c(t,e,n).length===0}function fe(e){return e[e.length-1]}function pe(e,t,n){return n?.concurrency!=null&&(t=h(t,n.concurrency)),Promise.all(e.map(t))}function me(e,t){let n=new Set(t),r=0;for(let t=0;t<e.length;t++)if(!n.has(e[t])){if(!Object.hasOwn(e,t)){delete e[r++];continue}e[r++]=e[t]}return e.length=r,e}async function he(e,t,n){let r=0;n??(n=e[0],r=1);let i=n;for(let n=r;n<e.length;n++)i=await t(i,e[n],n,e);return i}function ge(e,t){let n=e.slice(),r=[],i=0;for(let a=0;a<e.length;a++){if(t(e[a],a,n)){r.push(e[a]);continue}if(!Object.hasOwn(e,a)){delete e[i++];continue}e[i++]=e[a]}return e.length=i,r}function _e(e){return e[Math.floor(Math.random()*e.length)]}function ve(e,t){if(t??(t=e,e=0),e>=t)throw Error(`Invalid input: The maximum value must be greater than the minimum value.`);return Math.random()*(t-e)+e}function ye(e,t){return Math.floor(ve(e,t))}function be(e,t){if(t>e.length)throw Error(`Size must be less than or equal to the length of array.`);let n=Array(t),r=new Set;for(let i=e.length-t,a=0;i<e.length;i++,a++){let t=ye(0,i+1);r.has(t)&&(t=i),r.add(t),n[a]=e[t]}return n}function xe(e){let t=e.slice();for(let e=t.length-1;e>=1;e--){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}function Se(e){return e.slice(1)}function Ce(e,t){return e.slice(0,t)}function we(e,t){return t<=0||e.length===0?[]:e.slice(-t)}function Te(e,t,n=0,r=e.length){let i=e.length,a=Math.max(n>=0?n:i+n,0),o=Math.min(r>=0?r:i+r,i),s=e.slice();for(let e=a;e<o;e++)s[e]=t;return s}function g(e){return[...new Set(e)]}function Ee(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function De(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.every(e=>!t(e,i))&&n.push(i)}return n}function Oe(e){let t=0;for(let n=0;n<e.length;n++)e[n].length>t&&(t=e[n].length);let n=Array(t);for(let r=0;r<t;r++){n[r]=Array(e.length);for(let t=0;t<e.length;t++)n[r][t]=e[t][r]}return n}function ke(e,t,n=1,{partialWindows:r=!1}={}){if(t<=0||!Number.isInteger(t))throw Error(`Size must be a positive integer.`);if(n<=0||!Number.isInteger(n))throw Error(`Step must be a positive integer.`);let i=[],a=r?e.length:e.length-t+1;for(let r=0;r<a;r+=n)i.push(e.slice(r,r+t));return i}function Ae(e,...t){return o(e,t)}function je(...e){let t=0;for(let n=0;n<e.length;n++)e[n].length>t&&(t=e[n].length);let n=e.length,r=Array(t);for(let i=0;i<t;++i){let t=Array(n);for(let r=0;r<n;++r)t[r]=e[r][i];r[i]=t}return r}let Me=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})(),Ne=Me.DOMException===void 0?Error:Me.DOMException;var Pe=class extends Ne{constructor(e=`The operation was aborted`){super(e)}},Fe=class extends Ne{constructor(e=`The operation was timed out`){super(e)}};function Ie(e,t){if(!Number.isInteger(e)||e<0)throw Error(`n must be a non-negative integer.`);let n=0;return(...r)=>{if(++n>=e)return t(...r)}}function Le(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}async function Re(){}function ze(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function Be(...e){return function(...t){let n=e.length?e[0].apply(this,t):t[0];for(let t=1;t<e.length;t++)n=e[t].call(this,n);return n}}function Ve(...e){return Be(...e.reverse())}function _(e){return e}function He(e){return((...t)=>!e(...t))}function Ue(){}function We(e){let t=!1,n;return function(...r){return t||(t=!0,n=e(...r)),n}}function Ge(e,...t){return Ke(e,qe,...t)}function Ke(e,t,...n){let r=function(...r){let i=0,a=n.slice().map(e=>e===t?r[i++]:e),o=r.slice(i);return e.apply(this,a.concat(o))};return e.prototype&&(r.prototype=Object.create(e.prototype)),r}let qe=Symbol(`partial.placeholder`);Ge.placeholder=qe;function Je(e,...t){return Ye(e,Xe,...t)}function Ye(e,t,...n){let r=function(...r){let i=n.filter(e=>e===t).length,a=Math.max(r.length-i,0),o=r.slice(0,a),s=a,c=n.slice().map(e=>e===t?r[s++]:e);return e.apply(this,o.concat(c))};return e.prototype&&(r.prototype=Object.create(e.prototype)),r}let Xe=Symbol(`partialRight.placeholder`);Je.placeholder=Xe;function Ze(e,t=e.length-1){return function(...n){let r=n.slice(t),i=n.slice(0,t);for(;i.length<t;)i.push(void 0);return e.apply(this,[...i,r])}}function Qe(e,{signal:t}={}){return new Promise((n,r)=>{let i=()=>{r(new Pe)},a=()=>{clearTimeout(o),i()};if(t?.aborted)return i();let o=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e);t?.addEventListener(`abort`,a,{once:!0})})}let $e=()=>!0;async function et(e,t){let n,r,i,a;typeof t==`number`?(n=0,r=t,i=void 0,a=$e):(n=t?.delay??0,r=t?.retries??1/0,i=t?.signal,a=t?.shouldRetry??$e);let o;for(let t=0;t<=r;t++){if(i?.aborted)throw o??Error(`The retry operation was aborted due to an abort signal.`);try{return await e()}catch(e){if(o=e,!a(e,t))throw e;t<r&&await Qe(typeof n==`function`?n(t,o):n)}}throw o}function tt(e){if(e.length===0)return NaN;let t=e.slice().sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}function nt(e,t){return tt(e.map(e=>t(e)))}function rt(e,t){if(Number.isNaN(Number(t)))throw Error(`Expected percentile to be a number but got "${t}".`);if(t<0)throw Error(`Expected percentile to be >= 0 but got "${t}".`);if(t>100)throw Error(`Expected percentile to be <= 100 but got "${t}".`);if(e.length===0)return NaN;let n=e.slice().sort((e,t)=>(Number.isNaN(e)?-1/0:e)-(Number.isNaN(t)?-1/0:t));return t===0?n[0]:n[Math.ceil(n.length*(t/100))-1]}function v(e,t,n=1){if(t??(t=e,e=0),!Number.isInteger(n)||n===0)throw Error(`The step value must be a non-zero integer.`);let r=Math.max(Math.ceil((t-e)/n),0),i=Array(r);for(let t=0;t<r;t++)i[t]=e+t*n;return i}function it(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function at(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ot(e){if(it(e))return e;if(Array.isArray(e)||at(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function st(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function y(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}let ct=`[object RegExp]`,lt=`[object String]`,ut=`[object Number]`,dt=`[object Boolean]`,ft=`[object Arguments]`,pt=`[object Symbol]`,mt=`[object Date]`,ht=`[object Map]`,gt=`[object Set]`,_t=`[object Array]`,vt=`[object ArrayBuffer]`,yt=`[object Object]`,bt=`[object DataView]`,xt=`[object Uint8Array]`,St=`[object Uint8ClampedArray]`,Ct=`[object Uint16Array]`,wt=`[object Uint32Array]`,Tt=`[object Int8Array]`,Et=`[object Int16Array]`,Dt=`[object Int32Array]`,Ot=`[object Float32Array]`,kt=`[object Float64Array]`;function b(e){return Me.Buffer!==void 0&&Me.Buffer.isBuffer(e)}function At(e,t){return x(e,void 0,e,new Map,t)}function x(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(it(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=x(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,x(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(x(a,void 0,n,r,i));return t}if(b(e))return e.subarray();if(at(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=x(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),S(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),S(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),S(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,S(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),S(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),S(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),S(t,e,n,r,i),t}if(typeof e==`object`&&jt(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),S(t,e,n,r,i),t}return e}function S(e,t,n=e,r,i){let a=[...Object.keys(t),...st(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=x(t[s],s,n,r,i))}}function jt(e){switch(y(e)){case ft:case _t:case vt:case bt:case dt:case mt:case Ot:case kt:case Tt:case Et:case Dt:case ht:case ut:case yt:case ct:case gt:case lt:case pt:case xt:case St:case Ct:case wt:return!0;default:return!1}}function Mt(e){return x(e,void 0,e,new Map,void 0)}function Nt(e){if(typeof e!=`object`||!e)return e;Object.freeze(e);let t=Object.keys(e);for(let n=0;n<t.length;n++){let r=e[t[n]];typeof r==`object`&&r&&!Object.isFrozen(r)&&Nt(r)}return e}function Pt(e,t){return Object.keys(e).find(n=>t(e[n],n,e))}function C(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)===`[object Object]`:!1}function Ft(e,{delimiter:t=`.`,preserveArrays:n=!1}={}){return It(e,``,t,n)}function It(e,t,n,r){let i={},a=Object.keys(e);for(let o=0;o<a.length;o++){let s=a[o],c=e[s],l=t?`${t}${n}${s}`:s;if(C(c)&&Object.keys(c).length>0){Object.assign(i,It(c,l,n,r));continue}if(Array.isArray(c)&&!r&&c.length>0){Object.assign(i,It(c,l,n,r));continue}i[l]=c}return i}function Lt(e){let t={},n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=e[i];t[a]=i}return t}function Rt(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let a=r[i],o=e[a];n[t(o,a,e)]=o}return n}async function zt(e,t,n){let r={},i=Object.keys(e);return n?.concurrency&&(t=h(t,n.concurrency)),await Promise.all(i.map(async n=>{let i=e[n];r[await t(i,n,e)]=i})),r}function Bt(e,t){let n={},r=Object.keys(e);for(let i=0;i<r.length;i++){let a=r[i],o=e[a];n[a]=t(o,a,e)}return n}async function Vt(e,t,n){let r={},i=Object.keys(e);return n?.concurrency&&(t=h(t,n.concurrency)),await Promise.all(i.map(async n=>{r[n]=await t(e[n],n,e)})),r}function Ht(e){return C(e)||Array.isArray(e)}function w(e){return e===`__proto__`}function T(e,t,n){let r=Object.keys(t);for(let i=0;i<r.length;i++){let a=r[i];if(w(a))continue;let o=t[a],s=e[a],c=n(s,o,a,e,t);c===void 0?Ht(o)&&Ht(s)?e[a]=T(s,o,n):Array.isArray(o)?e[a]=T([],o,n):C(o)?e[a]=T({},o,n):(s===void 0||o!==void 0)&&(e[a]=o):e[a]=c}return e}function Ut(e,t){let n=Object.keys(e).sort(t),r={};for(let t=0;t<n.length;t++){let i=n[t];r[i]=e[i]}return r}function E(e){return Array.isArray(e)}function Wt(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()}let Gt=/\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;function Kt(e){return Array.from(e.match(Gt)??[])}function qt(e){let t=Kt(e);if(t.length===0)return``;let[n,...r]=t;return`${n.toLowerCase()}${r.map(e=>Wt(e)).join(``)}`}function Jt(e){if(E(e))return e.map(e=>Jt(e));if(C(e)){let t={},n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=qt(i);t[a]=Jt(e[i])}return t}return e}function D(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Yt(e){return Kt(e).map(e=>e.toUpperCase()).join(`_`)}function Xt(e){if(E(e))return e.map(e=>Xt(e));if(D(e)){let t={},n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=Yt(i);t[a]=Xt(e[i])}return t}return e}function Zt(e){return Kt(e).map(e=>e.toLowerCase()).join(`-`)}function Qt(e){if(E(e))return e.map(e=>Qt(e));if(D(e)){let t={},n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=Zt(i);t[a]=Qt(e[i])}return t}return e}function $t(e,t){return T(Mt(e),t,function e(t,n){if(Ht(n)&&Ht(t))return T(ot(t),n,e);if(Array.isArray(n))return T([],n,e);if(C(n))return T({},n,e)})}function en(e){return Kt(e).map(e=>Wt(e)).join(``)}function tn(e){if(E(e))return e.map(e=>tn(e));if(D(e)){let t={},n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=en(i);t[a]=tn(e[i])}return t}return e}function nn(e){return Kt(e).map(e=>e.toLowerCase()).join(`_`)}function rn(e){if(E(e))return e.map(e=>rn(e));if(D(e)){let t={},n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=nn(i);t[a]=rn(e[i])}return t}return e}function an(e){return e instanceof ArrayBuffer}function on(e){return typeof Blob>`u`?!1:e instanceof Blob}function sn(){return typeof window<`u`&&window?.document!=null}function cn(e){return e instanceof Date}function ln(e){return C(e)&&Object.keys(e).length===0}function O(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function un(e,t,n){return dn(e,t,void 0,void 0,void 0,void 0,n)}function dn(e,t,n,r,i,a,o){let s=o(e,t,n,r,i,a);if(s!==void 0)return s;if(typeof e==typeof t)switch(typeof e){case`bigint`:case`string`:case`boolean`:case`symbol`:case`undefined`:return e===t;case`number`:return e===t||Object.is(e,t);case`function`:return e===t;case`object`:return fn(e,t,a,o)}return fn(e,t,a,o)}function fn(e,t,n,r){if(Object.is(e,t))return!0;let i=y(e),a=y(t);if(i===`[object Arguments]`&&(i=yt),a===`[object Arguments]`&&(a=yt),i!==a)return!1;switch(i){case lt:return e.toString()===t.toString();case ut:return O(e.valueOf(),t.valueOf());case dt:case mt:case pt:return Object.is(e.valueOf(),t.valueOf());case ct:return e.source===t.source&&e.flags===t.flags;case`[object Function]`:return e===t}n??=new Map;let o=n.get(e),s=n.get(t);if(o!=null&&s!=null)return o===t;n.set(e,t),n.set(t,e);try{switch(i){case ht:if(e.size!==t.size)return!1;for(let[i,a]of e.entries())if(!t.has(i)||!dn(a,t.get(i),i,e,t,n,r))return!1;return!0;case gt:{if(e.size!==t.size)return!1;let i=Array.from(e.values()),a=Array.from(t.values());for(let o=0;o<i.length;o++){let s=i[o],c=a.findIndex(i=>dn(s,i,void 0,e,t,n,r));if(c===-1)return!1;a.splice(c,1)}return!0}case _t:case xt:case St:case Ct:case wt:case`[object BigUint64Array]`:case Tt:case Et:case Dt:case`[object BigInt64Array]`:case Ot:case kt:if(b(e)!==b(t)||e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!dn(e[i],t[i],i,e,t,n,r))return!1;return!0;case vt:return e.byteLength===t.byteLength?fn(new Uint8Array(e),new Uint8Array(t),n,r):!1;case bt:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:fn(new Uint8Array(e),new Uint8Array(t),n,r);case`[object Error]`:return e.name===t.name&&e.message===t.message;case yt:{if(!(fn(e.constructor,t.constructor,n,r)||C(e)&&C(t)))return!1;let i=[...Object.keys(e),...st(e)],a=[...Object.keys(t),...st(t)];if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++){let o=i[a],s=e[o];if(!Object.hasOwn(t,o))return!1;let c=t[o];if(!dn(s,c,o,e,t,n,r))return!1}return!0}default:return!1}}finally{n.delete(e),n.delete(t)}}function pn(e,t){return un(e,t,Ue)}function mn(e){return typeof File>`u`?!1:on(e)&&e instanceof File}function k(e){return typeof e==`function`}function hn(e){return e!=null&&typeof e[Symbol.iterator]==`function`}function gn(e){if(typeof e!=`string`)return!1;try{return JSON.parse(e),!0}catch{return!1}}function _n(e){switch(typeof e){case`object`:return e===null||vn(e)||yn(e);case`string`:case`number`:case`boolean`:return!0;default:return!1}}function vn(e){return Array.isArray(e)?e.every(e=>_n(e)):!1}function yn(e){if(!C(e))return!1;let t=Reflect.ownKeys(e);for(let n=0;n<t.length;n++){let r=t[n],i=e[r];if(typeof r!=`string`||!_n(i))return!1}return!0}function bn(e){return Number.isSafeInteger(e)&&e>=0}function xn(e){return e instanceof Map}function A(e){return e==null}function Sn(){return typeof process<`u`&&process?.versions?.node!=null}function Cn(e){return e!=null}function wn(e){return e===null}function Tn(e){return e instanceof Promise}function En(e){return e instanceof RegExp}function Dn(e){return e instanceof Set}function On(e){return typeof e==`symbol`}function kn(e){return e===void 0}function An(e){return e instanceof WeakMap}function jn(e){return e instanceof WeakSet}async function Mn(e){let t=Object.keys(e),n=await Promise.all(t.map(t=>e[t])),r={};for(let e=0;e<t.length;e++)r[t[e]]=n[e];return r}var Nn=class{semaphore=new m(1);get isLocked(){return this.semaphore.available===0}async acquire(){return this.semaphore.acquire()}release(){this.semaphore.release()}};function Pn(e,{signal:t}={}){return new Promise((n,r)=>{let i=()=>{clearTimeout(a)};if(t?.aborted)return;let a=setTimeout(()=>{t?.removeEventListener(`abort`,i),r(new Fe)},e);t?.addEventListener(`abort`,i,{once:!0})})}async function Fn(e,t,{signal:n}={}){return Promise.race([e(),Pn(t,{signal:n})])}let In=new Map([[`Æ`,`Ae`],[`Ð`,`D`],[`Ø`,`O`],[`Þ`,`Th`],[`ß`,`ss`],[`æ`,`ae`],[`ð`,`d`],[`ø`,`o`],[`þ`,`th`],[`Đ`,`D`],[`đ`,`d`],[`Ħ`,`H`],[`ħ`,`h`],[`ı`,`i`],[`IJ`,`IJ`],[`ij`,`ij`],[`ĸ`,`k`],[`Ŀ`,`L`],[`ŀ`,`l`],[`Ł`,`L`],[`ł`,`l`],[`ʼn`,`'n`],[`Ŋ`,`N`],[`ŋ`,`n`],[`Œ`,`Oe`],[`œ`,`oe`],[`Ŧ`,`T`],[`ŧ`,`t`],[`ſ`,`s`]]);function Ln(e){e=e.normalize(`NFD`);let t=``;for(let n=0;n<e.length;n++){let r=e[n];r>=`̀`&&r<=`ͯ`||r>=`⃐`&&r<=``||r>=`︠`&&r<=`︯`||(t+=In.get(r)??r)}return t}function Rn(e,...t){switch(typeof e){case`function`:return function(t,...n){return e(zn(t),...n)};case`string`:return Bn(e);default:{let n=e[0];for(let r=0;r<t.length;r++)n+=String(t[r])+e[r+1];return Bn(n)}}}function zn(e){let t=Bn(e.join(`\0`)).split(`\0`);return Object.assign(t,{raw:t})}function Bn(e){e=e.replace(/\r\n/g,`
|
|
2
2
|
`);let t=e.split(`
|
|
3
3
|
`);t.length>0&&t[0].trim()===``&&t.shift(),t.length>0&&t[t.length-1].trim()===``&&t.pop();let n=1/0;for(let e=0;e<t.length;e++){let r=t[e];if(r.trim()===``)continue;let i=0;for(;i<r.length&&(r[i]===` `||r[i]===` `);)i++;i<n&&(n=i)}if(n===1/0)return``;for(let e=0;e<t.length;e++)t[e].trim()===``?t[e]=``:t[e]=t[e].slice(n);return t.join(`
|
|
4
|
-
`)}let Vn={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Hn(e){return e.replace(/[&<>"']/g,e=>Vn[e])}function Un(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`)}function Wn(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function Gn(e){return[...e].reverse().join(``)}function Kn(e,t){if(t===void 0)return e.trimEnd();let n=e.length;switch(typeof t){case`string`:if(t.length!==1)throw Error(`The 'chars' parameter should be a single character string.`);for(;n>0&&e[n-1]===t;)n--;break;case`object`:for(;n>0&&t.includes(e[n-1]);)n--}return e.substring(0,n)}function qn(e,t){if(t===void 0)return e.trimStart();let n=0;switch(typeof t){case`string`:if(t.length!==1)throw Error(`The 'chars' parameter should be a single character string.`);for(;n<e.length&&e[n]===t;)n++;break;case`object`:for(;n<e.length&&t.includes(e[n]);)n++}return e.substring(n)}function Jn(e,t){return t===void 0?e.trim():qn(Kn(e,t),t)}let Yn={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`};function Xn(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,e=>Yn[e]||`'`)}function Zn(e){return e.substring(0,1).toUpperCase()+e.substring(1)}async function Qn(e){try{return[null,await e()]}catch(e){return[e,null]}}function $n(e,t){if(!e)throw typeof t==`string`?Error(t):t}function er(e){return arguments.length===0?[]:Array.isArray(e)?e:[e]}function j(e){return Array.isArray(e)?e:Array.from(e)}function M(e){return e!=null&&typeof e!=`function`&&bn(e.length)}function tr(e,t=1){if(t=Math.max(Math.floor(t),0),t===0||!M(e)||Number.isNaN(t))return[];let r=j(e);return r.length===0?[]:isFinite(t)?n(r,t):[r]}function nr(e){return M(e)?a(Array.from(e)):[]}function rr(...e){return te(e)}let ir=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function ar(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:ir.test(e);default:return!1}}function N(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function P(e){return e==null?``:or(e)}function or(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(or).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function F(e){if(Array.isArray(e))return e.map(N);if(typeof e==`symbol`)return[e];e=P(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let l=e[r];if(a)l===`\\`&&r+1<n?(r++,i+=e[r]):l===a?a=``:i+=l;else if(o)if(l===`"`||l===`'`)a=l,s=!0;else if(l===`]`){if(o=!1,!s&&i.includes(`.`)&&!c.test(i)){let e=i.split(`.`);for(let n=0;n<e.length;n++)e[n]!==``&&t.push(e[n])}else t.push(i);i=``}else i+=l;else if(l===`[`)o=!0,s=!1,i&&=(t.push(i),``);else if(l===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=l;r++}return i&&t.push(i),t}function I(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(w(t))return n;let r=e[t];return r===void 0?ar(t)&&!Object.hasOwn(e,t)?I(e,F(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=N(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return sr(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),w(t))return n;let r=e[t];return r===void 0?n:r}}}function sr(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||w(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}function cr(e){return function(t){return I(t,e)}}function L(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function lr(e,t,n){return typeof n==`function`?ur(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?ur(t,r,e,s,!1):!!c},new Map,!0):lr(e,t,()=>void 0)}function ur(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return dr(e,t,n,r,i);case`function`:return Object.keys(t).length>0?ur(e,{...t},n,r,i):O(e,t);default:return L(e)&&i?typeof t==`string`?t===``:!0:O(e,t)}}function dr(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return pr(e,t,n,r);if(t instanceof Map)return fr(e,t,n,r);if(t instanceof Set)return mr(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)it(e)&&(e=Object(e));else{let t=y(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;i<a.length;i++){let o=a[i];if(!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function fr(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function pr(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function mr(e,t,n,r){return t.size===0?!0:e instanceof Set?pr([...e],[...t],n,r):!1}function hr(e,t){return lr(e,t,()=>void 0)}function gr(e){return e=Mt(e),t=>hr(t,e)}function _r(e,t){return At(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(y(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),S(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case ut:case lt:case dt:{let t=new e.constructor(e?.valueOf());return S(t,e),t}case ft:{let t={};return S(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function vr(e){return _r(e)}let yr=/^(?:0|[1-9]\d*)$/;function br(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return yr.test(e)}}function R(e){return typeof e==`object`&&!!e&&y(e)===`[object Arguments]`}function xr(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&ar(t)&&!(t in Object(e))?F(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||R(r))&&br(t)&&t<r.length))return!1;r=r[t]}return!0}function Sr(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=N(e);break}return t=vr(t),function(n){let r=I(n,e);return r===void 0?xr(n,e):t===void 0?r===void 0:hr(r,t)}}function z(e){if(e==null)return _;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?Sr(e[0],e[1]):gr(e);default:return cr(e)}}function Cr(e,t){if(e==null)return{};let n=M(e)?Array.from(e):Object.values(e),r=z(t??void 0),i=Object.create(null);for(let e=0;e<n.length;e++){let t=n[e],a=r(t);i[a]=(i[a]??0)+1}return i}function wr(e){return e===0?0:e}function B(e){return typeof e==`object`&&!!e}function V(e){return B(e)&&M(e)}function Tr(e,...t){if(!V(e))return[];let n=Array.from(e),r=[];for(let e=0;e<t.length;e++){let n=t[e];V(n)&&r.push(...Array.from(n))}return o(n,r).map(wr)}function H(e){if(!(!M(e)||e.length===0))return fe(j(e))}function Er(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(V(r))for(let e=0;e<r.length;e++)t.push(r[e])}return t}function Dr(e,...t){if(!V(e))return[];let n=H(t),r=Er(t);return V(n)?o(Array.from(e),r).map(wr):s(Array.from(e),r,z(n)).map(wr)}function Or(e,...t){if(!V(e))return[];let n=H(t),r=Er(t);return typeof n==`function`?c(Array.from(e),r,n):o(Array.from(e),r)}function U(e){return typeof e==`symbol`||e instanceof Symbol}function W(e){return U(e)?NaN:Number(e)}function G(e){return e?(e=W(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function K(e){let t=G(e),n=t%1;return n?t-n:t}function kr(e,t=1,n){return M(e)?(t=n?1:K(t),l(j(e),t)):[]}function Ar(e,t=1,n){return M(e)?(t=n?1:K(t),u(j(e),t)):[]}function jr(e,t=_){return M(e)?Mr(j(e),t):[]}function Mr(e,t){switch(typeof t){case`function`:return d(e,(e,n,r)=>!!t(e,n,r));case`object`:if(Array.isArray(t)&&t.length===2){let n=t[0],r=t[1];return d(e,Sr(n,r))}else return d(e,gr(t));case`symbol`:case`number`:case`string`:return d(e,cr(t))}}function Nr(e,t=_){return M(e)?Pr(j(e),t):[]}function Pr(e,t){switch(typeof t){case`function`:return f(e,(e,n,r)=>!!t(e,n,r));case`object`:if(Array.isArray(t)&&t.length===2){let n=t[0],r=t[1];return f(e,Sr(n,r))}else return f(e,gr(t));case`number`:case`symbol`:case`string`:return f(e,cr(t))}}function Fr(e,t=_){if(!e)return e;let n=M(e)?v(0,e.length):Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=e[i];if(t(a,i,e)===!1)break}return e}function Ir(e,t=_){if(!e)return e;let n=M(e)?v(0,e.length):Object.keys(e);for(let r=n.length-1;r>=0;r--){let i=n[r],a=e[i];if(t(a,i,e)===!1)break}return e}function q(e,t,n){return L(n)&&(typeof t==`number`&&M(n)&&br(t)&&t<n.length||typeof t==`string`&&t in n)?O(n[t],e):!1}function Lr(e){return typeof e==`string`||e instanceof String}function Rr(e,t,n=0,r=e?e.length:0){return M(e)?Lr(e)?e:(n&&typeof n!=`number`&&q(e,t,n)&&(n=0,r=e.length),n=K(n),r=K(r),n||=0,r||=0,p(e,t,n,r)):[]}function zr(e,t=_){if(!e)return[];if(t=z(t),!Array.isArray(e)){let n=[],r=Object.keys(e),i=M(e)?e.length:r.length;for(let a=0;a<i;a++){let i=r[a],o=e[i];t(o,i,e)&&n.push(o)}return n}let n=[],r=e.length;for(let i=0;i<r;i++){let r=e[i];t(r,i,e)&&n.push(r)}return n}function Br(e,t=_,n=0){if(!e)return;let r=z(t),i=M(e)?v(0,e.length):Object.keys(e);n=K(n),n||=0,n<0&&(n=Math.max(i.length+n,0));for(let t=n;t<i.length;t++){let n=i[t],a=e[n];if(r(a,n,e))return a}}function J(e){return e}function Vr(e,t=J,n=0){if(!e)return-1;n=K(n),n<0&&(n=Math.max(e.length+n,0));let r=Array.from(e).slice(n),i=z(t),a=r.findIndex(i);return a===-1?-1:a+n}function Hr(e,t=_,n){if(!e)return;let r=Array.isArray(e)?e.length:Object.keys(e).length;n=K(n??r-1),n=n<0?Math.max(r+n,0):Math.min(n,r-1);let i=z(t);if(!Array.isArray(e)){let t=Object.keys(e);for(let r=n;r>=0;r--){let n=t[r],a=e[n];if(i(a,n,e))return a}return}return e.slice(0,n+1).findLast(i)}function Ur(e,t=_,n=e?e.length-1:0){if(!e)return-1;Number.isNaN(n)&&(n=0),n=n<0?Math.max(e.length+n,0):Math.min(n,e.length-1);let r=j(e).slice(0,n+1);switch(typeof t){case`function`:return r.findLastIndex(t);case`object`:if(Array.isArray(t)&&t.length===2){let e=t[0],n=t[1];return r.findLastIndex(Sr(e,n))}else return r.findLastIndex(gr(t));case`number`:case`symbol`:case`string`:return r.findLastIndex(cr(t))}}function Wr(e){if(M(e))return ae(j(e))}function Gr(e,t=1){if(!M(e))return[];let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Kr(o)&&t<r?i(o,t+1):n.push(o)}};return i(Array.from(e),0),n}function Kr(e){return E(e)||R(e)||!!(e&&e[Symbol.isConcatSpreadable])}function qr(e,t=_){if(!e)return[];let n=M(e)?v(0,e.length):Object.keys(e),r=z(t),i=Array(n.length);for(let t=0;t<n.length;t++){let a=n[t],o=e[a];i[t]=r(o,a,e)}return i}function Jr(e,t=_,n=1){return e==null?[]:Gr(qr(e,z(t)),n)}function Yr(e,t){return Jr(e,t,1)}function Xr(e,t){return Jr(e,t,1/0)}function Zr(e){return Gr(e,1)}function Qr(e){return Gr(e,1/0)}function $r(e,t=_){return e==null?{}:ie(M(e)?j(e):Object.values(e),z(t))}function ei(e,t,n,r){if(e==null)return!1;if(n=r||!n?0:K(n),Lr(e))return n>e.length||t instanceof RegExp?!1:(n<0&&(n=Math.max(0,e.length+n)),e.includes(t,n));if(Array.isArray(e))return e.includes(t,n);if(M(e)){n<0&&(n=Math.max(0,e.length+n));for(let r=n;r<e.length;r++)if(O(e[r],t))return!0;return!1}let i=Object.keys(e);n<0&&(n=Math.max(0,i.length+n));for(let r=n;r<i.length;r++)if(O(Reflect.get(e,i[r]),t))return!0;return!1}function ti(e,t,n){if(!M(e))return-1;if(Number.isNaN(t)){n=K(n??0),n<0&&(n=Math.max(0,e.length+n));for(let t=n;t<e.length;t++)if(Number.isNaN(e[t]))return t;return-1}return Array.from(e).indexOf(t,n)}function ni(e){return M(e)?oe(Array.from(e)):[]}function ri(...e){if(e.length===0||!V(e[0]))return[];let t=g(j(e[0]));for(let n=1;n<e.length;n++){let r=e[n];if(!V(r))return[];t=se(t,j(r))}return t}function ii(e,...t){if(!V(e))return[];let n=fe(t),r=!V(n),i=r?t.length-1:t.length,a=r?z(n):_,o=typeof n==`function`?e=>a(e):a;if(i<=0)return Ee(j(e),o);let s=g(j(e));for(let e=0;e<i;++e){let n=t[e];if(!V(n))return[];s=ce(s,j(n),o)}return s}function ai(e,...t){if(e==null)return[];let n=H(t),r=O,i=g;typeof n==`function`&&(r=n,i=e=>De(e,r),t.pop());let a=i(j(e));for(let e=0;e<t.length;++e){let n=t[e];if(n==null)return[];a=le(a,j(n),r)}return a}function oi(e,t,...n){if(A(e))return[];let r=M(e)?Array.from(e):Object.values(e),i=[];for(let e=0;e<r.length;e++){let a=r[e];if(k(t)){i.push(t.apply(a,n));continue}let o=I(a,t),s=a,c=Array.isArray(t)?t:F(t);c.length>1&&(s=I(a,c.slice(0,-1))),i.push(o?.apply(s,n))}return i}function si(e,t){return M(e)?Array.from(e).join(t):``}function ci(e,t=_,n){let r=arguments.length>=3;if(!e)return n;let i,a=0;M(e)?(i=v(0,e.length),!r&&e.length>0&&(n=e[0],a+=1)):(i=Object.keys(e),!r&&i.length>0&&(n=e[i[0]],a+=1));for(let r=a;r<i.length;r++){let a=i[r],o=e[a];n=t(n,o,a,e)}return n}function li(e,t){if(!M(e)&&!B(e))return{};let n=z(t??_);return ci(e,(e,t)=>{let r=n(t);return e[r]=t,e},{})}function ui(e,t,n){if(!M(e)||e.length===0)return-1;let r=e.length,i=n===void 0?r-1:K(n);if(n!==void 0&&(i=i<0?Math.max(r+i,0):Math.min(i,r-1)),Number.isNaN(t)){for(let t=i;t>=0;t--)if(Number.isNaN(e[t]))return t;return-1}for(let n=i;n>=0;n--)if(e[n]===t)return n;return-1}function di(e,t=0){if(!(!M(e)||e.length===0))return t=K(t),t<0&&(t+=e.length),e[t]}function fi(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}let pi=(e,t,n)=>{if(e!==t){let r=fi(e),i=fi(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},mi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hi=/^\w*$/;function gi(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||U(e)?!0:typeof e==`string`&&(hi.test(e)||!mi.test(e))||t!=null&&Object.hasOwn(t,e)}function _i(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=M(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r<t.length&&n!=null;++r)n=n[t[r]];return r>0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||gi(e)?e:{key:e,path:F(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=pi(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function vi(e,t=_){if(!e)return[[],[]];let n=M(e)?e:Object.values(e);t=z(t);let r=[],i=[];for(let e=0;e<n.length;e++){let a=n[e];t(a)?r.push(a):i.push(a)}return[r,i]}function yi(e,...t){return me(e,t)}function bi(e,t=[]){return A(t)?e:me(e,Array.from(t))}function xi(e,t,n){let r=z(n),i=new Set(Array.from(t).map(e=>r(e))),a=0;for(let t=0;t<e.length;t++){let n=r(e[t]);if(!i.has(n)){if(!Object.hasOwn(e,t)){delete e[a++];continue}e[a++]=e[t]}}return e.length=a,e}function Si(e,t){let n=e.length;t??=Array(n);for(let r=0;r<n;r++)t[r]=e[r];return t}function Ci(e,t,n){if(e?.length==null||t?.length==null)return e;e===t&&(t=Si(t));let r=0;n??=(e,t)=>O(e,t);let i=Array.isArray(t)?t:Array.from(t),a=i.includes(void 0);for(let t=0;t<e.length;t++){if(t in e){i.some(r=>n(e[t],r))||(e[r++]=e[t]);continue}a||delete e[r++]}return e.length=r,e}function wi(e,...t){if(t.length===0)return[];let n=[];for(let e=0;e<t.length;e++){let r=t[e];if(!M(r)||Lr(r)){n.push(r);continue}for(let e=0;e<r.length;e++)n.push(r[e])}let r=[];for(let t=0;t<n.length;t++)r.push(I(e,n[t]));return r}function Ti(e,t){if(e==null)return!0;switch(typeof t){case`symbol`:case`number`:case`object`:if(Array.isArray(t))return Ei(e,t);if(typeof t==`number`?t=N(t):typeof t==`object`&&(t=Object.is(t?.valueOf(),-0)?`-0`:String(t)),w(t))return!1;if(e?.[t]===void 0)return!0;try{return delete e[t],!0}catch{return!1}case`string`:if(e?.[t]===void 0&&ar(t)&&!Object.hasOwn(e,t))return Ei(e,F(t));if(w(t))return!1;try{return delete e[t],!0}catch{return!1}}}function Ei(e,t){let n=t.length===1?e:I(e,t.slice(0,-1)),r=t[t.length-1];if(n?.[r]===void 0)return!0;if(w(r))return!1;try{return delete n[r],!0}catch{return!1}}function Di(e,...t){let n=Gr(t,1);if(!e)return Array(n.length);let r=wi(e,n),i=n.map(t=>br(t,e.length)?Number(t):t).sort((e,t)=>t-e);for(let t of new Set(i)){if(br(t,e.length)){Array.prototype.splice.call(e,t,1);continue}if(gi(t,e)){delete e[N(t)];continue}Ti(e,E(t)?t:F(t))}return r}function Oi(e,t=_,n){let r=arguments.length>=3;if(!e)return n;let i,a;M(e)?(i=v(0,e.length).reverse(),!r&&e.length>0?(n=e[e.length-1],a=1):a=0):(i=Object.keys(e).reverse(),!r&&i.length>0?(n=e[i[0]],a=1):a=0);for(let r=a;r<i.length;r++){let a=i[r],o=e[a];n=t(n,o,a,e)}return n}function ki(e){if(typeof e!=`function`)throw TypeError(`Expected a function`);return function(...t){return!e.apply(this,t)}}function Ai(e,t=_){return zr(e,ki(z(t)))}function ji(e,t=_){return ge(e,z(t))}function Mi(e){return e==null?e:Array.prototype.reverse.call(e)}function Ni(e){if(e!=null)return M(e)?_e(j(e)):_e(Object.values(e))}function Pi(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=W(n),e=Math.min(e,Number.isNaN(n)?0:n)),t!==void 0&&(t=W(t),e=Math.max(e,Number.isNaN(t)?0:t)),e}function Fi(e){return xn(e)}function Ii(e){return Dn(e)}function Li(e){return e==null?[]:M(e)||Fi(e)||Ii(e)?Array.from(e):typeof e==`object`?hn(e)?Array.from(e):Object.values(e):[]}function Ri(e,t,n){let r=Li(e);return t=(n?q(e,t,n):t===void 0)?1:K(t),t=Pi(t,0,r.length),be(r,t)}function zi(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function Y(e){return at(e)}function Bi(e,t){if(e=K(e),e<1||!Number.isSafeInteger(e))return[];let n=Array(e);for(let r=0;r<e;r++)n[r]=typeof t==`function`?t(r):r;return n}function X(e){if(M(e))return Vi(e);let t=Object.keys(Object(e));return zi(e)?t.filter(e=>e!==`constructor`):t}function Vi(e){let t=Bi(e.length,e=>`${e}`),n=new Set(t);b(e)&&(n.add(`offset`),n.add(`parent`)),Y(e)&&(n.add(`buffer`),n.add(`byteLength`),n.add(`byteOffset`));let r=Object.keys(e).filter(e=>!n.has(e));return Array.isArray(e)?[...t,...r]:[...t.filter(t=>Object.hasOwn(e,t)),...r]}function Hi(e){if(e==null)return[];let t=X(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n}function Ui(e){return e==null}function Wi(e){return Ui(e)?[]:E(e)?xe(e):M(e)?xe(Array.from(e)):B(e)?xe(Hi(e)):[]}let Gi=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`),Ki=`\\ud800-\\udfff`,qi=`[${Ki}]`,Ji=`[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]`,Yi=`\\ud83c[\\udffb-\\udfff]`,Xi=`(?:${Ji}|${Yi})`,Zi=`[^${Ki}]`,Qi=`(?:\\ud83c[\\udde6-\\uddff]){2}`,$i=`[\\ud800-\\udbff][\\udc00-\\udfff]`,ea=`${Xi}?`,ta=`[\\ufe0e\\ufe0f]?`,na=`(?:\\u200d(?:${[Zi,Qi,$i].join(`|`)})${ta}${ea})*`,ra=ta+ea+na,ia=`(?:${[`${Zi}${Ji}?`,Ji,Qi,$i,qi].join(`|`)})`,aa=RegExp(`${Yi}(?=${Yi})|${ia}${ra}`,`g`);function oa(e){let t=0;for(aa.lastIndex=0;aa.test(e);)++t;return t}function sa(e){return A(e)?0:typeof e==`string`?Gi.test(e)?oa(e):e.length:M(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length}function ca(e,t,n){if(!M(e))return[];let r=e.length;n===void 0?n=r:typeof n!=`number`&&q(e,t,n)&&(t=0,n=r),t=K(t),n=K(n),t=t<0?Math.max(r+t,0):Math.min(t,r),n=n<0?Math.max(r+n,0):Math.min(n,r);let i=Math.max(n-t,0),a=Array(i);for(let n=0;n<i;++n)a[n]=e[t+n];return a}function la(e,t,n){if(!e)return!1;n&&q(e,t,n)&&(t=void 0),t??=_;let r=Array.isArray(e)?e:Object.values(e);switch(typeof t){case`function`:if(!Array.isArray(e)){let n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=e[i];if(t(a,i,e))return!0}return!1}for(let n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1;case`object`:if(Array.isArray(t)&&t.length===2){let n=t[0],i=t[1],a=Sr(n,i);if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(a(e[t]))return!0;return!1}return r.some(a)}else{let n=gr(t);if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(n(e[t]))return!0;return!1}return r.some(n)}case`number`:case`symbol`:case`string`:{let n=cr(t);if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(n(e[t]))return!0;return!1}return r.some(n)}}}function ua(e,...t){let n=t.length;return n>1&&q(e,t[0],t[1])?t=[]:n>2&&q(t[0],t[1],t[2])&&(t=[t[0]]),_i(e,te(t),[`asc`])}function da(e){return typeof e==`number`||B(e)&&y(e)===`[object Number]`}function fa(e){return da(e)&&Number.isNaN(Number(e))}function pa(e,t,n=J,r){if(Ui(e)||e.length===0)return 0;let i=0,a=e.length,o=z(n),s=o(t),c=fa(s),l=wn(s),u=U(s),d=kn(s);for(;i<a;){let t,n=Math.floor((i+a)/2),f=o(e[n]),p=!kn(f),m=wn(f),h=!fa(f),ee=U(f);t=c?r||h:d?h&&(r||p):l?h&&p&&(r||!m):u?h&&p&&!m&&(r||!ee):m||ee?!1:r?f<=s:f<s,t?i=n+1:a=n}return Math.min(a,4294967294)}function ma(e,t){if(A(e))return 0;let n=0,r=e.length;if(da(t)&&t===t&&r<=2147483647){for(;n<r;){let i=n+r>>>1,a=e[i];!wn(a)&&!On(a)&&a<t?n=i+1:r=i}return r}return pa(e,t,e=>e)}function ha(e,t){if(!e?.length)return-1;let n=ma(e,t);return n<e.length&&O(e[n],t)?n:-1}function ga(e,t,n){return pa(e,t,n,!0)}function _a(e,t){if(A(e))return 0;let n=e.length;if(!da(t)||Number.isNaN(t)||n>2147483647)return ga(e,t,e=>e);let r=0;for(;r<n;){let i=r+n>>>1,a=e[i];!wn(a)&&!On(a)&&a<=t?r=i+1:n=i}return n}function va(e,t){if(!e?.length)return-1;let n=_a(e,t)-1;return n>=0&&O(e[n],t)?n:-1}function ya(e){return M(e)?Se(j(e)):[]}function ba(e,t=1,n){return t=n||t===void 0?1:K(t),t<1||!M(e)?[]:Ce(j(e),t)}function xa(e,t=1,n){return t=n?1:K(t),t<=0||!M(e)?[]:we(j(e),t)}function Sa(e,t){if(!M(e))return[];let n=j(e),r=n.findLastIndex(He(z(t??_)));return n.slice(r+1)}function Ca(e,t){if(!M(e))return[];let n=j(e),r=n.findIndex(ki(z(t??J)));return r===-1?n:n.slice(0,r)}function wa(...e){return g(Jr(e.filter(V),e=>Array.from(e),1))}function Ta(...e){let t=fe(e),n=Er(e);return V(t)||t==null?g(n):Ee(n,Le(z(t),1)).map(wr)}function Ea(...e){let t=fe(e),n=Er(e);return V(t)||t==null?g(n):De(n,t)}function Da(e){return M(e)?g(Array.from(e)):[]}function Oa(e,t=_){return M(e)?Ee(Array.from(e),Le(z(t),1)).map(wr):[]}function ka(e,t){return M(e)?typeof t==`function`?De(Array.from(e),(e,n)=>t(n,e)):Da(Array.from(e)):[]}function Aa(e){return!V(e)||!e.length?[]:(e=E(e)?e:Array.from(e),e=e.filter(e=>V(e)),Oe(e))}function ja(e,t){if(!V(e)||!e.length)return[];let n=E(e)?Oe(e):Oe(Array.from(e,e=>Array.from(e)));if(!t)return n;let r=Array(n.length);for(let e=0;e<n.length;e++){let i=n[e];r[e]=t(...i)}return r}function Ma(e,...t){return V(e)?Ae(Array.from(e),...t):[]}function Na(...e){let t=new Map;for(let n=0;n<e.length;n++){let r=e[n];if(!V(r))continue;let i=new Set(Li(r));for(let e of i)t.has(e)?t.set(e,t.get(e)+1):t.set(e,1)}let n=[];for(let[e,r]of t)r===1&&n.push(e);return n}function Pa(...e){let t=H(e),n=_;!V(t)&&t!=null&&(n=z(t),e=e.slice(0,-1));let r=e.filter(V);return Dr(Ta(...r,n),Ta(...ke(r,2).map(([e,t])=>ii(e,t,n)),n),n)}function Fa(...e){let t=H(e),n=(e,t)=>e===t;typeof t==`function`&&(n=t,e=e.slice(0,-1));let r=e.filter(V);return Or(Ea(...r,n),Ea(...ke(r,2).map(([e,t])=>ai(e,t,n)),n),n)}function Ia(...e){return e.length?je(...e.filter(e=>V(e))):[]}let La=(e,t,n)=>{let r=e[t];(!(Object.hasOwn(e,t)&&O(r,n))||n===void 0&&!(t in e))&&(e[t]=n)};function Ra(e=[],t=[]){e||=[],t||=[];let n={};for(let r=0;r<e.length;r++)La(n,e[r],t[r]);return n}function za(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function Ba(e,t,n,r){if(e==null&&!L(e))return e;let i;i=gi(t,e)?[t]:Array.isArray(t)?t:F(t);let a=n(I(e,i)),o=e;for(let t=0;t<i.length&&o!=null;t++){let n=N(i[t]);if(za(n))return e;let s;if(t===i.length-1)s=a;else{let a=o[n],c=r?.(a,n,e);s=c===void 0?L(a)?a:br(i[t+1])?[]:{}:c}La(o,n,s),o=o[n]}return e}function Va(e,t,n){return Ba(e,t,()=>n,()=>void 0)}function Ha(e,t){let n={};if(!M(e))return n;M(t)||(t=[]);let r=je(Array.from(e),Array.from(t));for(let e=0;e<r.length;e++){let[t,i]=r[e];t!=null&&Va(n,t,i)}return n}function Ua(...e){let t=e.pop();if(k(t)||(e.push(t),t=void 0),!e?.length)return[];let n=Aa(e);return t==null?n:n.map(e=>t(...e))}function Wa(e,t){if(typeof t!=`function`)throw TypeError(`Expected a function`);return e=K(e),function(...n){if(--e<1)return t.apply(this,n)}}function Ga(e,t=e.length,n){return n&&(t=e.length),(Number.isNaN(t)||t<0)&&(t=0),Le(e,t)}function Ka(e,...t){try{return e(...t)}catch(e){return e instanceof Error?e:Error(e)}}function qa(e,t){if(typeof t!=`function`)throw TypeError(`Expected a function`);let n;return e=K(e),function(...r){return--e>0&&(n=t.apply(this,r)),e<=1&&t&&(t=void 0),n}}function Ja(e,t,...n){let r=function(...i){let a=[],o=0;for(let e=0;e<n.length;e++){let t=n[e];t===Ja.placeholder?a.push(i[o++]):a.push(t)}for(let e=o;e<i.length;e++)a.push(i[e]);return this instanceof r?new e(...a):e.apply(t,a)};return r}Ja.placeholder=Symbol(`bind.placeholder`);function Ya(e,t,...n){let r=function(...i){let a=[],o=0;for(let e=0;e<n.length;e++){let t=n[e];t===Ya.placeholder?a.push(i[o++]):a.push(t)}for(let e=o;e<i.length;e++)a.push(i[e]);return this instanceof r?new e[t](...a):e[t].apply(e,a)};return r}Ya.placeholder=Symbol(`bindKey.placeholder`);function Xa(e,t=e.length,n){t=n?e.length:t,t=Number.parseInt(t,10),(Number.isNaN(t)||t<1)&&(t=0);let r=function(...n){let i=n.filter(e=>e===Xa.placeholder),a=n.length-i.length;return a<t?Za(e,t-a,n):this instanceof r?new e(...n):e.apply(this,n)};return r.placeholder=$a,r}function Za(e,t,n){function r(...i){let a=i.filter(e=>e===Xa.placeholder),o=i.length-a.length;return i=Qa(i,n),o<t?Za(e,t-o,i):this instanceof r?new e(...i):e.apply(this,i)}return r.placeholder=$a,r}function Qa(e,t){let n=[],r=0;for(let i=0;i<t.length;i++){let a=t[i];a===Xa.placeholder&&r<e.length?n.push(e[r++]):n.push(a)}for(let t=r;t<e.length;t++)n.push(e[t]);return n}let $a=Symbol(`curry.placeholder`);Xa.placeholder=$a;function eo(e,t=e.length,n){t=n?e.length:t,t=Number.parseInt(t,10),(Number.isNaN(t)||t<1)&&(t=0);let r=function(...n){let i=n.filter(e=>e===eo.placeholder),a=n.length-i.length;return a<t?to(e,t-a,n):this instanceof r?new e(...n):e.apply(this,n)};return r.placeholder=ro,r}function to(e,t,n){function r(...i){let a=i.filter(e=>e===eo.placeholder),o=i.length-a.length;return i=no(i,n),o<t?to(e,t-o,i):this instanceof r?new e(...i):e.apply(this,i)}return r.placeholder=ro,r}function no(e,t){let n=t.filter(e=>e===eo.placeholder).length,r=Math.max(e.length-n,0),i=[],a=0;for(let t=0;t<r;t++)i.push(e[a++]);for(let n=0;n<t.length;n++){let r=t[n];r===eo.placeholder&&a<e.length?i.push(e[a++]):i.push(r)}return i}let ro=Symbol(`curryRight.placeholder`);eo.placeholder=ro;function io(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=ze(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?((r||i)&&(s=e.apply(this,t)),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function ao(e,...t){if(typeof e!=`function`)throw TypeError(`Expected a function`);return setTimeout(e,1,...t)}function oo(e,t,...n){if(typeof e!=`function`)throw TypeError(`Expected a function`);return setTimeout(e,W(t)||0,...n)}function so(e){return function(...t){return e.apply(this,t.reverse())}}function co(...e){let t=te(e,1);if(t.some(e=>typeof e!=`function`))throw TypeError(`Expected a function`);return Be(...t)}function lo(...e){let t=te(e,1);if(t.some(e=>typeof e!=`function`))throw TypeError(`Expected a function`);return Ve(...t)}function uo(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(uo.Cache||Map),n}uo.Cache=Map;function fo(e=0){return function(...t){return t.at(K(e))}}function po(e){return We(e)}function mo(e,...t){if(typeof e!=`function`)throw TypeError(`Expected a function`);let n=t.flat();return function(...t){let r=Math.min(t.length,n.length),i=[...t];for(let e=0;e<r;e++)i[e]=z(n[e]??_).call(this,t[e]);return e.apply(this,i)}}function ho(e,...t){return Ke(e,ho.placeholder,...t)}ho.placeholder=Symbol(`compat.partial.placeholder`);function go(e,...t){return Ye(e,go.placeholder,...t)}go.placeholder=Symbol(`compat.partialRight.placeholder`);function _o(e,...t){let n=Zr(t);return function(...t){let r=n.map(e=>t[e]).slice(0,t.length);for(let e=r.length;e<t.length;e++)r.push(t[e]);return e.apply(this,r)}}function vo(e,t=e.length-1){return t=Number.parseInt(t,10),(Number.isNaN(t)||t<0)&&(t=e.length-1),Ze(e,t)}function yo(e,t=0){return t=Number.parseInt(t,10),(Number.isNaN(t)||t<0)&&(t=0),function(...n){let r=n[t],i=n.slice(0,t);return r&&i.push(...r),e.apply(this,i)}}function bo(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return io(e,t,{leading:r,maxWait:t,trailing:i})}function xo(e){return Ga(e,1)}function So(e,t){return function(...n){return(k(t)?t:_).apply(this,[e,...n])}}function Co(e,t){return e===void 0&&t===void 0?0:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=P(e),t=P(t)):(e=W(e),t=W(t)),e+t)}function wo(e,t,n=0){if(t=Number(t),Object.is(t,-0)&&(t=`-0`),n=Math.min(Number.parseInt(n,10),292),n&&Number.isFinite(Number(t))){let[r,i=0]=t.toString().split(`e`),a=Math[e](Number(`${r}e${Number(i)+n}`));Object.is(a,-0)&&(a=`-0`);let[o,s=0]=a.toString().split(`e`);return Number(`${o}e${Number(s)-n}`)}return Math[e](Number(t))}function To(e,t=0){return wo(`ceil`,e,t)}function Eo(e,t){return e===void 0&&t===void 0?1:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=P(e),t=P(t)):(e=W(e),t=W(t)),e/t)}function Do(e,t=0){return wo(`floor`,e,t)}function Oo(e,t,n){return t=G(t),n===void 0?(n=t,t=0):n=G(n),e=W(e),e>=Math.min(t,n)&&e<Math.max(t,n)}function ko(e){if(!e||e.length===0)return;let t;for(let n=0;n<e.length;n++){let r=e[n];r==null||Number.isNaN(r)||typeof r==`symbol`||(t===void 0||r>t)&&(t=r)}return t}function Ao(e,t=_){if(e==null)return;let n=j(e);if(n.length===0)return;let r=z(t),i,a;for(let e=0;e<n.length;e++){let t=n[e],o=r(t,e,n);o==null||Number.isNaN(o)||typeof o==`symbol`||(a===void 0||o>a)&&(a=o,i=t)}return i}function jo(e,t){if(!e||!e.length)return 0;t!=null&&(t=z(t));let n;for(let r=0;r<e.length;r++){let i=t?t(e[r]):e[r];i!==void 0&&(n===void 0?n=i:n+=i)}return n}function Mo(e){return jo(e)}function No(e){let t=e?e.length:0;return t===0?NaN:Mo(e)/t}function Po(e,t){let n=e==null?0:e.length;return n?jo(e,z(t??_))/n:NaN}function Fo(e){if(!e||e.length===0)return;let t;for(let n=0;n<e.length;n++){let r=e[n];r==null||Number.isNaN(r)||typeof r==`symbol`||(t===void 0||r<t)&&(t=r)}return t}function Io(e,t=_){if(e==null)return;let n=j(e);if(n.length===0)return;let r=z(t),i,a;for(let e=0;e<n.length;e++){let t=n[e],o=r(t,e,n);o==null||Number.isNaN(o)||typeof o==`symbol`||(a===void 0||o<a)&&(a=o,i=t)}return i}function Lo(e,t){return e===void 0&&t===void 0?1:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=P(e),t=P(t)):(e=W(e),t=W(t)),e*t)}function Ro(e,t=0,n){return n&&(t=0),Number.parseInt(P(e),t)}function zo(...e){let t=0,n=1,r=!1;switch(e.length){case 1:typeof e[0]==`boolean`?r=e[0]:n=e[0];break;case 2:if(typeof e[1]==`boolean`){n=e[0],r=e[1];break}else t=e[0],n=e[1];case 3:typeof e[2]==`object`&&e[2]!=null&&e[2][e[1]]===e[0]?(t=0,n=e[0],r=!1):(t=e[0],n=e[1],r=e[2])}return typeof t!=`number`&&(t=Number(t)),typeof n!=`number`&&(n=Number(n)),t||=0,n||=0,t>n&&([t,n]=[n,t]),!r&&(!Number.isInteger(t)||!Number.isInteger(n))&&(r=!0),t=Pi(t,-(2**53-1),2**53-1),n=Pi(n,-(2**53-1),2**53-1),t===n?t:r?ve(t,n):ye(t,n+1)}function Bo(e,t,n){n&&typeof n!=`number`&&q(e,t,n)&&(t=n=void 0),e=G(e),t===void 0?(t=e,e=0):t=G(t),n=n===void 0?e<t?1:-1:G(n);let r=Math.max(Math.ceil((t-e)/(n||1)),0),i=Array(r);for(let t=0;t<r;t++)i[t]=e,e+=n;return i}function Vo(e,t,n){n&&typeof n!=`number`&&q(e,t,n)&&(t=n=void 0),e=G(e),t===void 0?(t=e,e=0):t=G(t),n=n===void 0?e<t?1:-1:G(n);let r=Math.max(Math.ceil((t-e)/(n||1)),0),i=Array(r);for(let t=r-1;t>=0;t--)i[t]=e,e+=n;return i}function Ho(e,t=0){return wo(`round`,e,t)}function Uo(e,t){return e===void 0&&t===void 0?0:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=P(e),t=P(t)):(e=W(e),t=W(t)),e-t)}function Wo(...e){}function Go(e,...t){for(let n=0;n<t.length;n++)Ko(e,t[n]);return e}function Ko(e,t){let n=X(t);for(let r=0;r<n.length;r++){let i=n[r];(!(i in e)||!O(e[i],t[i]))&&(e[i]=t[i])}}function Z(e){if(e==null)return[];switch(typeof e){case`object`:case`function`:return M(e)?Yo(e):zi(e)?Jo(e):qo(e);default:return qo(Object(e))}}function qo(e){let t=[];for(let n in e)t.push(n);return t}function Jo(e){return qo(e).filter(e=>e!==`constructor`)}function Yo(e){let t=Bi(e.length,e=>`${e}`),n=new Set(t);b(e)&&(n.add(`offset`),n.add(`parent`)),Y(e)&&(n.add(`buffer`),n.add(`byteLength`),n.add(`byteOffset`));let r=qo(e).filter(e=>!n.has(e));return Array.isArray(e)?[...t,...r]:[...t.filter(t=>Object.hasOwn(e,t)),...r]}function Xo(e,...t){for(let n=0;n<t.length;n++)Zo(e,t[n]);return e}function Zo(e,t){let n=Z(t);for(let r=0;r<n.length;r++){let i=n[r];(!(i in e)||!O(e[i],t[i]))&&(e[i]=t[i])}}function Qo(e,...t){let n=t[t.length-1];typeof n==`function`?t.pop():n=void 0;for(let r=0;r<t.length;r++)$o(e,t[r],n);return e}function $o(e,t,n){let r=Z(t);for(let i=0;i<r.length;i++){let a=r[i],o=e[a],s=t[a],c=n?.(o,s,a,e,t)??s;(!(a in e)||!O(o,c))&&(e[a]=c)}}function es(e,...t){let n=t[t.length-1];typeof n==`function`?t.pop():n=void 0;for(let r=0;r<t.length;r++)ts(e,t[r],n);return e}function ts(e,t,n){let r=X(t);for(let i=0;i<r.length;i++){let a=r[i],o=e[a],s=t[a],c=n?.(o,s,a,e,t)??s;(!(a in e)||!O(o,c))&&(e[a]=c)}}function ns(e){if(it(e))return e;let t=y(e);if(!rs(e))return{};if(E(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(Y(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?os(r,e):is(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return is(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return ss(n,e),is(n,e),as(n,e),n}function rs(e){switch(y(e)){case ft:case _t:case vt:case bt:case dt:case mt:case Ot:case kt:case Tt:case Et:case Dt:case ht:case ut:case yt:case ct:case gt:case lt:case pt:case xt:case St:case Ct:case wt:return!0;default:return!1}}function is(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function as(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function os(e,t){let n=t.valueOf().length;for(let r in t)Object.hasOwn(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function ss(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}function cs(e,t){if(!t)return ns(e);let n=t(e);return n===void 0?ns(e):n}function ls(e,t){let n=L(e)?Object.create(e):{};if(t!=null){let e=X(t);for(let r=0;r<e.length;r++){let i=e[r],a=t[i];La(n,i,a)}}return n}function us(e,...t){e=Object(e);let n=Object.prototype,r=t.length,i=r>2?t[2]:void 0;i&&q(t[0],t[1],i)&&(r=1);for(let i=0;i<r;i++){if(A(t[i]))continue;let r=t[i],a=Object.keys(r);for(let t=0;t<a.length;t++){let i=a[t],o=e[i];(o===void 0||!Object.hasOwn(e,i)&&O(o,n[i]))&&(e[i]=r[i])}}return e}function ds(e,...t){e=Object(e);for(let n=0;n<t.length;n++){let r=t[n];r!=null&&fs(e,r,new WeakMap)}return e}function fs(e,t,n){for(let r in t){let i=t[r],a=e[r];if(a===void 0||!Object.hasOwn(e,r)){e[r]=ps(i,n);continue}n.get(i)!==a&&ms(a,i,n)}}function ps(e,t){if(t.has(e))return t.get(e);if(D(e)){let n={};return t.set(e,n),fs(n,e,t),n}return e}function ms(e,t,n){if(D(e)&&D(t)){n.set(t,e),fs(e,t,n);return}Array.isArray(e)&&Array.isArray(t)&&(n.set(t,e),hs(e,t,n))}function hs(e,t,n){let r=Math.min(t.length,e.length);for(let i=0;i<r;i++)D(e[i])&&D(t[i])&&fs(e[i],t[i],n);for(let n=r;n<t.length;n++)e.push(t[n])}function gs(e){let t=Array(e.size),n=e.keys(),r=e.values();for(let e=0;e<t.length;e++)t[e]=[n.next().value,r.next().value];return t}function _s(e){let t=Array(e.size),n=e.values();for(let e=0;e<t.length;e++){let r=n.next().value;t[e]=[r,r]}return t}function vs(e){if(e==null)return[];if(e instanceof Set)return _s(e);if(e instanceof Map)return gs(e);let t=X(e),n=Array(t.length);for(let r=0;r<t.length;r++){let i=t[r];n[r]=[i,e[i]]}return n}function ys(e){if(e==null)return[];if(e instanceof Set)return _s(e);if(e instanceof Map)return gs(e);let t=Z(e),n=Array(t.length);for(let r=0;r<t.length;r++){let i=t[r];n[r]=[i,e[i]]}return n}function bs(e,t){if(L(e))return Pt(e,z(t??J))}function xs(e,t){if(!L(e))return;let n=z(t??J);return Object.keys(e).findLast(t=>n(e[t],t,e))}function Ss(e,t=_){if(e==null)return e;for(let n in e)if(t(e[n],n,e)===!1)break;return e}function Cs(e,t=_){if(e==null)return e;let n=[];for(let t in e)n.push(t);for(let r=n.length-1;r>=0;r--){let i=n[r];if(t(e[i],i,e)===!1)break}return e}function ws(e,t=_){if(e==null)return e;let n=Object(e),r=X(e);for(let e=0;e<r.length;++e){let i=r[e];if(t(n[i],i,n)===!1)break}return e}function Ts(e,t=_){if(e==null)return e;let n=Object(e),r=X(e);for(let e=r.length-1;e>=0;--e){let i=r[e];if(t(n[i],i,n)===!1)break}return e}function Es(e){if(!M(e))return{};let t={};for(let n=0;n<e.length;n++){let[r,i]=e[n];t[r]=i}return t}function Ds(e){return e==null?[]:X(e).filter(t=>typeof e[t]==`function`)}function Os(e){if(e==null)return[];let t=[];for(let n in e)k(e[n])&&t.push(n);return t}function ks(e,t){if(e==null)return!1;let n;if(n=Array.isArray(t)?t:typeof t==`string`&&ar(t)&&!(t in Object(e))?F(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!(t in Object(r)))&&!((Array.isArray(r)||R(r))&&br(t)&&t<r.length))return!1;r=r[t]}return!0}function As(e){return Lt(e)}function js(e,t){let n={};if(A(e))return n;t??=_;let r=Object.keys(e),i=z(t);for(let t=0;t<r.length;t++){let a=r[t],o=e[a],s=i(o);Array.isArray(n[s])?n[s].push(a):n[s]=[a]}return n}function Ms(e,t=_){return e==null?{}:Rt(e,z(t))}function Ns(e,t=_){return e==null?{}:Bt(e,z(t))}function Ps(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=Fs(i,t,r,new Map)}return i}function Fs(e,t,n,r){if(it(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return ot(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...st(t)];for(let a=0;a<i.length;a++){let o=i[a];if(w(o))continue;let s=t[o],c=e[o];if(R(s)&&(s={...s}),R(c)&&(c={...c}),b(s)&&(s=vr(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(V(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||B(c)&&B(s)&&(D(c)||D(s)||Y(c)||Y(s))?e[o]=Fs(c,s,n,r):c==null&&D(s)?e[o]=Fs({},s,n,r):c==null&&Y(s)?e[o]=vr(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function Is(e,...t){return Ps(e,...t,Ue)}function Ls(e){let t=[];for(;e;)t.push(...st(e)),e=Object.getPrototypeOf(e);return t}function Rs(e,...t){if(e==null)return{};t=Zr(t);let n=zs(e,t);for(let e=0;e<t.length;e++){let r=t[e];switch(typeof r){case`object`:if(Array.isArray(r))Ti(n,r);else{let e=Array.from(r);for(let t=0;t<e.length;t++)Ti(n,e[t])}break;case`string`:case`symbol`:case`number`:Ti(n,r);break}}return n}function zs(e,t){return t.some(e=>Array.isArray(e)||ar(e))?Vs(e):Bs(e)}function Bs(e){let t={},n=[...Z(e),...Ls(e)];for(let r=0;r<n.length;r++){let i=n[r];t[i]=e[i]}return t}function Vs(e){let t={},n=[...Z(e),...Ls(e)];for(let r=0;r<n.length;r++){let i=n[r];t[i]=_r(e[i],e=>{if(!D(e))return e})}return t}function Hs(e,t){if(e==null)return{};let n={},r=z(t??J),i=[...Z(e),...Ls(e)];for(let t=0;t<i.length;t++){let a=U(i[t])?i[t]:i[t].toString(),o=e[a];r(o,a,e)||(n[a]=o)}return n}function Us(e,...t){if(Ui(e))return{};let n={};for(let r=0;r<t.length;r++){let i=t[r];switch(typeof i){case`object`:Array.isArray(i)||(i=M(i)?Array.from(i):[i]);break;case`string`:case`symbol`:case`number`:i=[i];break}for(let t of i){let r=I(e,t);r===void 0&&!xr(e,t)||(typeof t==`string`&&Object.hasOwn(e,t)?n[t]=e[t]:Va(n,t,r))}}return n}function Ws(e,t){if(e==null)return{};let n=z(t??J),r={},i=M(e)?v(0,e.length):[...Z(e),...Ls(e)];for(let t=0;t<i.length;t++){let a=U(i[t])?i[t]:i[t].toString(),o=e[a];n(o,a,e)&&(r[a]=o)}return r}function Gs(e){return function(t){return I(e,t)}}function Ks(e,t,n){gi(t,e)?t=[t]:Array.isArray(t)||(t=F(P(t)));let r=Math.max(t.length,1);for(let i=0;i<r;i++){let r=e?.[N(t[i])];if(r===void 0)return typeof n==`function`?n.call(e):n;e=typeof r==`function`?r.call(e):r}return e}function qs(e,t,n,r){let i;return i=typeof r==`function`?r:()=>void 0,Ba(e,t,()=>n,i)}function Js(e,...t){return us(vr(e),...t)}function Ys(e){return b(e)}function Xs(e,t=_,n){let r=Array.isArray(e)||Ys(e)||Y(e);return t=z(t),n??=r?[]:L(e)&&k(e.constructor)?Object.create(Object.getPrototypeOf(e)):{},e==null||Fr(e,(e,r,i)=>t(n,e,r,i)),n}function Zs(e,t,n){return Ba(e,t,n,()=>void 0)}function Qs(e){let t=Z(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n}function $s(e){return typeof e==`function`}function ec(e){return Number.isSafeInteger(e)&&e>=0}let tc=Function.prototype.toString,nc=RegExp(`^${tc.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)}$`);function rc(e){if(typeof e!=`function`)return!1;if(globalThis?.[`__core-js_shared__`]!=null)throw Error(`Unsupported core-js use. Try https://npms.io/search?q=ponyfill.`);return nc.test(tc.call(e))}function ic(e){return e===null}function ac(e){return kn(e)}function oc(e,t){if(t==null)return!0;if(e==null)return Object.keys(t).length===0;let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i],o=e[i];if(o===void 0&&!(i in e)||typeof a==`function`&&!a(o))return!1}return!0}function sc(e){return e=Mt(e),function(t){return oc(t,e)}}function cc(e){return an(e)}function lc(e){return typeof e==`boolean`||e instanceof Boolean}function uc(e){return cn(e)}function dc(e){return B(e)&&e.nodeType===1&&!D(e)}function fc(e){if(e==null)return!0;if(M(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!b(e)&&!Y(e)&&!R(e)?!1:e.length===0;if(typeof e==`object`||typeof e==`function`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return zi(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}function pc(e,t,n){return typeof n!=`function`&&(n=()=>void 0),un(e,t,(...r)=>{let i=n(...r);if(i!==void 0)return!!i;if(e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set)return pc(Array.from(e),Array.from(t),Ie(2,n))})}function mc(e){return y(e)===`[object Error]`}function hc(e){return Number.isFinite(e)}function gc(e){return Number.isInteger(e)}function _c(e){return En(e)}function vc(e){return Number.isSafeInteger(e)}function yc(e){return An(e)}function bc(e){return jn(e)}function xc(e){return Wt(P(e))}function Sc(e,...t){if(e==null||!L(e)||E(e)&&t.length===0)return e;let n=[];for(let e=0;e<t.length;e++){let r=t[e];E(r)?n.push(...r):r&&typeof r==`object`&&`length`in r?n.push(...Array.from(r)):n.push(r)}if(n.length===0)return e;for(let t=0;t<n.length;t++){let r=n[t],i=P(r),a=e[i];k(a)&&(e[i]=a.bind(e))}return e}function Q(e){return Ln(P(e))}let Cc=`\\p{Lu}`,wc=`\\p{Ll}`,Tc=`(?:[\\p{Lm}\\p{Lo}]\\p{M}*)`,Ec=`(?:['’](?:d|ll|m|re|s|t|ve))?`,Dc=`(?:['’](?:D|LL|M|RE|S|T|VE))?`,Oc=`[\\p{Z}\\p{P}\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\xd7\\xf7]`,kc=`(?:${Cc}|${Tc})`,Ac=`(?:${wc}|${Tc})`,jc;function Mc(){return jc??=RegExp([`${Cc}?${wc}+${Ec}(?=${Oc}|${Cc}|$)`,`${kc}+${Dc}(?=${Oc}|${Cc}${Ac}|$)`,`${Cc}?${Ac}+${Ec}`,`${Cc}+${Dc}`,`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,`\\d+`,`\\p{Emoji_Presentation}`,`\\p{Extended_Pictographic}`].join(`|`),`gu`),jc}function $(e,t,n){let r=P(e);return(n||t===void 0)&&(t=Mc()),typeof t==`number`&&(t=t.toString()),Array.from(r.match(t)??[]).filter(e=>e!==``)}function Nc(e){return typeof e!=`string`&&(e=P(e)),e.replace(/['\u2019]/g,``)}function Pc(e){let t=$(Nc(Q(e)));if(t.length===0)return``;let[n,...r]=t;return`${n.toLowerCase()}${r.map(e=>Wt(e)).join(``)}`}function Fc(e,t,n){return e==null||t==null?!1:(n??=e.length,e.endsWith(t,n))}function Ic(e){return Hn(P(e))}function Lc(e){return Un(P(e))}function Rc(e){return $(Nc(Q(e))).map(e=>e.toLowerCase()).join(`-`)}function zc(e){return $(Nc(Q(e))).map(e=>e.toLowerCase()).join(` `)}function Bc(e){return Wn(P(e))}function Vc(e){return Gi.test(e)?Array.from(e).length:e.length}function Hc(e,t){let n=Vc(t);if(n===0||e<1)return``;let r=t.repeat(Math.ceil(e/n));return Gi.test(r)?Array.from(r).slice(0,e).join(``):r.slice(0,e)}function Uc(e,t=0,n=` `){let r=P(e),i=K(t),a=Vc(r);if(i<=a)return r;let o=(i-a)/2,s=`${n}`;return Hc(Math.floor(o),s)+r+Hc(Math.ceil(o),s)}function Wc(e,t=0,n=` `){let r=P(e),i=K(t),a=Vc(r);return i<=a?r:r+Hc(i-a,`${n}`)}function Gc(e,t=0,n=` `){let r=P(e),i=K(t),a=Vc(r);return i<=a?r:Hc(i-a,`${n}`)+r}let Kc=2**53-1;function qc(e,t,n){return t=(n?q(e,t,n):t===void 0)?1:K(t),t<1||t>Kc?``:P(e).repeat(t)}function Jc(e,t,n){return arguments.length<3?P(e):P(e).replace(t,n)}function Yc(e){return $(Nc(Q(e))).map(e=>e.toLowerCase()).join(`_`)}function Xc(e,t,n){return P(e).split(t,n)}function Zc(e){let t=$(Nc(Q(e)).trim()),n=``;for(let e=0;e<t.length;e++){let r=t[e];n&&(n+=` `),r===r.toUpperCase()?n+=r:n+=r[0].toUpperCase()+r.slice(1).toLowerCase()}return n}function Qc(e,t,n){return e==null||t==null?!1:(n??=0,e.startsWith(t,n))}let $c=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,el=/['\n\r\u2028\u2029\\]/g,tl=/($^)/,nl=new Map([[`\\`,`\\`],[`'`,`'`],[`
|
|
5
|
-
`,`n`],[`\r`,`r`],[`\u2028`,`u2028`],[`\u2029`,`u2029`]]);function
|
|
4
|
+
`)}let Vn={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Hn(e){return e.replace(/[&<>"']/g,e=>Vn[e])}function Un(e){return e.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`)}function Wn(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function Gn(e){return[...e].reverse().join(``)}function Kn(e,t){if(t===void 0)return e.trimEnd();let n=e.length;switch(typeof t){case`string`:if(t.length!==1)throw Error(`The 'chars' parameter should be a single character string.`);for(;n>0&&e[n-1]===t;)n--;break;case`object`:for(;n>0&&t.includes(e[n-1]);)n--}return e.substring(0,n)}function qn(e,t){if(t===void 0)return e.trimStart();let n=0;switch(typeof t){case`string`:if(t.length!==1)throw Error(`The 'chars' parameter should be a single character string.`);for(;n<e.length&&e[n]===t;)n++;break;case`object`:for(;n<e.length&&t.includes(e[n]);)n++}return e.substring(n)}function Jn(e,t){return t===void 0?e.trim():qn(Kn(e,t),t)}let Yn={"&":`&`,"<":`<`,">":`>`,""":`"`,"'":`'`};function Xn(e){return e.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g,e=>Yn[e]||`'`)}function Zn(e){return e.substring(0,1).toUpperCase()+e.substring(1)}async function Qn(e){try{return[null,await e()]}catch(e){return[e,null]}}function $n(e){return{[Symbol.asyncDispose]:async()=>{await e()}}}function er(e,t){if(!e)throw typeof t==`string`?Error(t):t}function tr(e){return arguments.length===0?[]:Array.isArray(e)?e:[e]}function j(e){return Array.isArray(e)?e:Array.from(e)}function M(e){return e!=null&&typeof e!=`function`&&bn(e.length)}function nr(e,t=1){if(t=Math.max(Math.floor(t),0),t===0||!M(e)||Number.isNaN(t))return[];let r=j(e);return r.length===0?[]:isFinite(t)?n(r,t):[r]}function rr(e){return M(e)?a(Array.from(e)):[]}function ir(...e){return te(e)}let ar=/\.|(\[(?:[^[\]]*|(["'])(?:(?!\2)[^\\]|\\.)*?\2)\])/;function or(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e===``||e.startsWith(`.`)||e.endsWith(`.`)?!1:ar.test(e);default:return!1}}function N(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function P(e){return e==null?``:sr(e)}function sr(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(sr).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function F(e){if(Array.isArray(e))return e.map(N);if(typeof e==`symbol`)return[e];e=P(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1,s=!1,c=/^-?\d+(?:\.\d+)?$/;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let l=e[r];if(a)l===`\\`&&r+1<n?(r++,i+=e[r]):l===a?a=``:i+=l;else if(o)if(l===`"`||l===`'`)a=l,s=!0;else if(l===`]`){if(o=!1,!s&&i.includes(`.`)&&!c.test(i)){let e=i.split(`.`);for(let n=0;n<e.length;n++)e[n]!==``&&t.push(e[n])}else t.push(i);i=``}else i+=l;else if(l===`[`)o=!0,s=!1,i&&=(t.push(i),``);else if(l===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=l;r++}return i&&t.push(i),t}function I(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(w(t))return n;let r=e[t];return r===void 0?or(t)&&!Object.hasOwn(e,t)?I(e,F(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=N(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return cr(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),w(t))return n;let r=e[t];return r===void 0?n:r}}}function cr(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||w(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}function lr(e){return function(t){return I(t,e)}}function L(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function ur(e,t,n){return typeof n==`function`?dr(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?dr(t,r,e,s,!1):!!c},new Map,!0):ur(e,t,()=>void 0)}function dr(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return fr(e,t,n,r,i);case`function`:return Object.keys(t).length>0?dr(e,{...t},n,r,i):O(e,t);default:return L(e)&&i?typeof t==`string`?t===``:!0:O(e,t)}}function fr(e,t,n,r,i=!1){if(t==null)return!0;if(Array.isArray(t))return mr(e,t,n,r);if(t instanceof Map)return pr(e,t,n,r);if(t instanceof Set)return hr(e,t,n,r);let a=Object.keys(t);if(e==null)return i&&a.length===0;if(i)it(e)&&(e=Object(e));else{let t=y(e);if(t!==`[object Object]`&&t!==`[object Arguments]`)return!1}if(a.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let i=0;i<a.length;i++){let o=a[i];if(!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function pr(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function mr(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function hr(e,t,n,r){return t.size===0?!0:e instanceof Set?mr([...e],[...t],n,r):!1}function gr(e,t){return ur(e,t,()=>void 0)}function _r(e){return e=Mt(e),t=>gr(t,e)}function vr(e,t){return At(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(y(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),S(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case ut:case lt:case dt:{let t=new e.constructor(e?.valueOf());return S(t,e),t}case ft:{let t={};return S(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function yr(e){return vr(e)}let br=/^(?:0|[1-9]\d*)$/;function xr(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return br.test(e)}}function R(e){return typeof e==`object`&&!!e&&y(e)===`[object Arguments]`}function Sr(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&or(t)&&!(t in Object(e))?F(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||R(r))&&xr(t)&&t<r.length))return!1;r=r[t]}return!0}function Cr(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=N(e);break}return t=yr(t),function(n){let r=I(n,e);return r===void 0?Sr(n,e):t===void 0?r===void 0:gr(r,t)}}function z(e){if(e==null)return _;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?Cr(e[0],e[1]):_r(e);default:return lr(e)}}function wr(e,t){if(e==null)return{};let n=M(e)?Array.from(e):Object.values(e),r=z(t??void 0),i=Object.create(null);for(let e=0;e<n.length;e++){let t=n[e],a=r(t);i[a]=(i[a]??0)+1}return i}function Tr(e){return e===0?0:e}function B(e){return typeof e==`object`&&!!e}function V(e){return B(e)&&M(e)}function Er(e,...t){if(!V(e))return[];let n=Array.from(e),r=[];for(let e=0;e<t.length;e++){let n=t[e];V(n)&&r.push(...Array.from(n))}return o(n,r).map(Tr)}function H(e){if(!(!M(e)||e.length===0))return fe(j(e))}function Dr(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];if(V(r))for(let e=0;e<r.length;e++)t.push(r[e])}return t}function Or(e,...t){if(!V(e))return[];let n=H(t),r=Dr(t);return V(n)?o(Array.from(e),r).map(Tr):s(Array.from(e),r,z(n)).map(Tr)}function kr(e,...t){if(!V(e))return[];let n=H(t),r=Dr(t);return typeof n==`function`?c(Array.from(e),r,n):o(Array.from(e),r)}function U(e){return typeof e==`symbol`||e instanceof Symbol}function W(e){return U(e)?NaN:Number(e)}function G(e){return e?(e=W(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function K(e){let t=G(e),n=t%1;return n?t-n:t}function Ar(e,t=1,n){return M(e)?(t=n?1:K(t),l(j(e),t)):[]}function jr(e,t=1,n){return M(e)?(t=n?1:K(t),u(j(e),t)):[]}function Mr(e,t=_){return M(e)?Nr(j(e),t):[]}function Nr(e,t){switch(typeof t){case`function`:return d(e,(e,n,r)=>!!t(e,n,r));case`object`:if(Array.isArray(t)&&t.length===2){let n=t[0],r=t[1];return d(e,Cr(n,r))}else return d(e,_r(t));case`symbol`:case`number`:case`string`:return d(e,lr(t))}}function Pr(e,t=_){return M(e)?Fr(j(e),t):[]}function Fr(e,t){switch(typeof t){case`function`:return f(e,(e,n,r)=>!!t(e,n,r));case`object`:if(Array.isArray(t)&&t.length===2){let n=t[0],r=t[1];return f(e,Cr(n,r))}else return f(e,_r(t));case`number`:case`symbol`:case`string`:return f(e,lr(t))}}function Ir(e,t=_){if(!e)return e;let n=M(e)?v(0,e.length):Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=e[i];if(t(a,i,e)===!1)break}return e}function Lr(e,t=_){if(!e)return e;let n=M(e)?v(0,e.length):Object.keys(e);for(let r=n.length-1;r>=0;r--){let i=n[r],a=e[i];if(t(a,i,e)===!1)break}return e}function q(e,t,n){return L(n)&&(typeof t==`number`&&M(n)&&xr(t)&&t<n.length||typeof t==`string`&&t in n)?O(n[t],e):!1}function Rr(e){return typeof e==`string`||e instanceof String}function zr(e,t,n=0,r=e?e.length:0){return M(e)?Rr(e)?e:(n&&typeof n!=`number`&&q(e,t,n)&&(n=0,r=e.length),n=K(n),r=K(r),n||=0,r||=0,p(e,t,n,r)):[]}function Br(e,t=_){if(!e)return[];if(t=z(t),!Array.isArray(e)){let n=[],r=Object.keys(e),i=M(e)?e.length:r.length;for(let a=0;a<i;a++){let i=r[a],o=e[i];t(o,i,e)&&n.push(o)}return n}let n=[],r=e.length;for(let i=0;i<r;i++){let r=e[i];t(r,i,e)&&n.push(r)}return n}function Vr(e,t=_,n=0){if(!e)return;let r=z(t),i=M(e)?v(0,e.length):Object.keys(e);n=K(n),n||=0,n<0&&(n=Math.max(i.length+n,0));for(let t=n;t<i.length;t++){let n=i[t],a=e[n];if(r(a,n,e))return a}}function J(e){return e}function Hr(e,t=J,n=0){if(!e)return-1;n=K(n),n<0&&(n=Math.max(e.length+n,0));let r=Array.from(e).slice(n),i=z(t),a=r.findIndex(i);return a===-1?-1:a+n}function Ur(e,t=_,n){if(!e)return;let r=Array.isArray(e)?e.length:Object.keys(e).length;n=K(n??r-1),n=n<0?Math.max(r+n,0):Math.min(n,r-1);let i=z(t);if(!Array.isArray(e)){let t=Object.keys(e);for(let r=n;r>=0;r--){let n=t[r],a=e[n];if(i(a,n,e))return a}return}return e.slice(0,n+1).findLast(i)}function Wr(e,t=_,n=e?e.length-1:0){if(!e)return-1;Number.isNaN(n)&&(n=0),n=n<0?Math.max(e.length+n,0):Math.min(n,e.length-1);let r=j(e).slice(0,n+1);switch(typeof t){case`function`:return r.findLastIndex(t);case`object`:if(Array.isArray(t)&&t.length===2){let e=t[0],n=t[1];return r.findLastIndex(Cr(e,n))}else return r.findLastIndex(_r(t));case`number`:case`symbol`:case`string`:return r.findLastIndex(lr(t))}}function Gr(e){if(M(e))return ae(j(e))}function Kr(e,t=1){if(!M(e))return[];let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];qr(o)&&t<r?i(o,t+1):n.push(o)}};return i(Array.from(e),0),n}function qr(e){return E(e)||R(e)||!!(e&&e[Symbol.isConcatSpreadable])}function Jr(e,t=_){if(!e)return[];let n=M(e)?v(0,e.length):Object.keys(e),r=z(t),i=Array(n.length);for(let t=0;t<n.length;t++){let a=n[t],o=e[a];i[t]=r(o,a,e)}return i}function Yr(e,t=_,n=1){return e==null?[]:Kr(Jr(e,z(t)),n)}function Xr(e,t){return Yr(e,t,1)}function Zr(e,t){return Yr(e,t,1/0)}function Qr(e){return Kr(e,1)}function $r(e){return Kr(e,1/0)}function ei(e,t=_){return e==null?{}:ie(M(e)?j(e):Object.values(e),z(t))}function ti(e,t,n,r){if(e==null)return!1;if(n=r||!n?0:K(n),Rr(e))return n>e.length||t instanceof RegExp?!1:(n<0&&(n=Math.max(0,e.length+n)),e.includes(t,n));if(Array.isArray(e))return e.includes(t,n);if(M(e)){n<0&&(n=Math.max(0,e.length+n));for(let r=n;r<e.length;r++)if(O(e[r],t))return!0;return!1}let i=Object.keys(e);n<0&&(n=Math.max(0,i.length+n));for(let r=n;r<i.length;r++)if(O(Reflect.get(e,i[r]),t))return!0;return!1}function ni(e,t,n){if(!M(e))return-1;if(Number.isNaN(t)){n=K(n??0),n<0&&(n=Math.max(0,e.length+n));for(let t=n;t<e.length;t++)if(Number.isNaN(e[t]))return t;return-1}return Array.from(e).indexOf(t,n)}function ri(e){return M(e)?oe(Array.from(e)):[]}function ii(...e){if(e.length===0||!V(e[0]))return[];let t=g(j(e[0]));for(let n=1;n<e.length;n++){let r=e[n];if(!V(r))return[];t=se(t,j(r))}return t}function ai(e,...t){if(!V(e))return[];let n=fe(t),r=!V(n),i=r?t.length-1:t.length,a=r?z(n):_,o=typeof n==`function`?e=>a(e):a;if(i<=0)return Ee(j(e),o);let s=g(j(e));for(let e=0;e<i;++e){let n=t[e];if(!V(n))return[];s=ce(s,j(n),o)}return s}function oi(e,...t){if(e==null)return[];let n=H(t),r=O,i=g;typeof n==`function`&&(r=n,i=e=>De(e,r),t.pop());let a=i(j(e));for(let e=0;e<t.length;++e){let n=t[e];if(n==null)return[];a=le(a,j(n),r)}return a}function si(e,t,...n){if(A(e))return[];let r=M(e)?Array.from(e):Object.values(e),i=[];for(let e=0;e<r.length;e++){let a=r[e];if(k(t)){i.push(t.apply(a,n));continue}let o=I(a,t),s=a,c=Array.isArray(t)?t:F(t);c.length>1&&(s=I(a,c.slice(0,-1))),i.push(o?.apply(s,n))}return i}function ci(e,t){return M(e)?Array.from(e).join(t):``}function li(e,t=_,n){let r=arguments.length>=3;if(!e)return n;let i,a=0;M(e)?(i=v(0,e.length),!r&&e.length>0&&(n=e[0],a+=1)):(i=Object.keys(e),!r&&i.length>0&&(n=e[i[0]],a+=1));for(let r=a;r<i.length;r++){let a=i[r],o=e[a];n=t(n,o,a,e)}return n}function ui(e,t){if(!M(e)&&!B(e))return{};let n=z(t??_);return li(e,(e,t)=>{let r=n(t);return e[r]=t,e},{})}function di(e,t,n){if(!M(e)||e.length===0)return-1;let r=e.length,i=n===void 0?r-1:K(n);if(n!==void 0&&(i=i<0?Math.max(r+i,0):Math.min(i,r-1)),Number.isNaN(t)){for(let t=i;t>=0;t--)if(Number.isNaN(e[t]))return t;return-1}for(let n=i;n>=0;n--)if(e[n]===t)return n;return-1}function fi(e,t=0){if(!(!M(e)||e.length===0))return t=K(t),t<0&&(t+=e.length),e[t]}function pi(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}let mi=(e,t,n)=>{if(e!==t){let r=pi(e),i=pi(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0},hi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gi=/^\w*$/;function _i(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||U(e)?!0:typeof e==`string`&&(gi.test(e)||!hi.test(e))||t!=null&&Object.hasOwn(t,e)}function vi(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=M(e)?Array.from(e):Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e,r=0;for(;r<t.length&&n!=null;++r)n=n[t[r]];return r>0&&r===t.length?n:void 0},a=(e,t)=>{if(e==null)return t;if(t!=null)return typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):t[e]},o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||_i(e)?e:{key:e,path:F(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=mi(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function yi(e,t=_){if(!e)return[[],[]];let n=M(e)?e:Object.values(e);t=z(t);let r=[],i=[];for(let e=0;e<n.length;e++){let a=n[e];t(a)?r.push(a):i.push(a)}return[r,i]}function bi(e,...t){return me(e,t)}function xi(e,t=[]){return A(t)?e:me(e,Array.from(t))}function Si(e,t,n){let r=z(n),i=new Set(Array.from(t).map(e=>r(e))),a=0;for(let t=0;t<e.length;t++){let n=r(e[t]);if(!i.has(n)){if(!Object.hasOwn(e,t)){delete e[a++];continue}e[a++]=e[t]}}return e.length=a,e}function Ci(e,t){let n=e.length;t??=Array(n);for(let r=0;r<n;r++)t[r]=e[r];return t}function wi(e,t,n){if(e?.length==null||t?.length==null)return e;e===t&&(t=Ci(t));let r=0;n??=(e,t)=>O(e,t);let i=Array.isArray(t)?t:Array.from(t),a=i.includes(void 0);for(let t=0;t<e.length;t++){if(t in e){i.some(r=>n(e[t],r))||(e[r++]=e[t]);continue}a||delete e[r++]}return e.length=r,e}function Ti(e,...t){if(t.length===0)return[];let n=[];for(let e=0;e<t.length;e++){let r=t[e];if(!M(r)||Rr(r)){n.push(r);continue}for(let e=0;e<r.length;e++)n.push(r[e])}let r=[];for(let t=0;t<n.length;t++)r.push(I(e,n[t]));return r}function Ei(e,t){if(e==null)return!0;switch(typeof t){case`symbol`:case`number`:case`object`:if(Array.isArray(t))return Di(e,t);if(typeof t==`number`?t=N(t):typeof t==`object`&&(t=Object.is(t?.valueOf(),-0)?`-0`:String(t)),w(t))return!1;if(e?.[t]===void 0)return!0;try{return delete e[t],!0}catch{return!1}case`string`:if(e?.[t]===void 0&&or(t)&&!Object.hasOwn(e,t))return Di(e,F(t));if(w(t))return!1;try{return delete e[t],!0}catch{return!1}}}function Di(e,t){let n=t.length===1?e:I(e,t.slice(0,-1)),r=t[t.length-1];if(n?.[r]===void 0)return!0;if(w(r))return!1;try{return delete n[r],!0}catch{return!1}}function Oi(e,...t){let n=Kr(t,1);if(!e)return Array(n.length);let r=Ti(e,n),i=n.map(t=>xr(t,e.length)?Number(t):t).sort((e,t)=>t-e);for(let t of new Set(i)){if(xr(t,e.length)){Array.prototype.splice.call(e,t,1);continue}if(_i(t,e)){delete e[N(t)];continue}Ei(e,E(t)?t:F(t))}return r}function ki(e,t=_,n){let r=arguments.length>=3;if(!e)return n;let i,a;M(e)?(i=v(0,e.length).reverse(),!r&&e.length>0?(n=e[e.length-1],a=1):a=0):(i=Object.keys(e).reverse(),!r&&i.length>0?(n=e[i[0]],a=1):a=0);for(let r=a;r<i.length;r++){let a=i[r],o=e[a];n=t(n,o,a,e)}return n}function Ai(e){if(typeof e!=`function`)throw TypeError(`Expected a function`);return function(...t){return!e.apply(this,t)}}function ji(e,t=_){return Br(e,Ai(z(t)))}function Mi(e,t=_){return ge(e,z(t))}function Ni(e){return e==null?e:Array.prototype.reverse.call(e)}function Pi(e){if(e!=null)return M(e)?_e(j(e)):_e(Object.values(e))}function Fi(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=W(n),e=Math.min(e,Number.isNaN(n)?0:n)),t!==void 0&&(t=W(t),e=Math.max(e,Number.isNaN(t)?0:t)),e}function Ii(e){return xn(e)}function Li(e){return Dn(e)}function Ri(e){return e==null?[]:M(e)||Ii(e)||Li(e)?Array.from(e):typeof e==`object`?hn(e)?Array.from(e):Object.values(e):[]}function zi(e,t,n){let r=Ri(e);return t=(n?q(e,t,n):t===void 0)?1:K(t),t=Fi(t,0,r.length),be(r,t)}function Bi(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function Y(e){return at(e)}function Vi(e,t){if(e=K(e),e<1||!Number.isSafeInteger(e))return[];let n=Array(e);for(let r=0;r<e;r++)n[r]=typeof t==`function`?t(r):r;return n}function X(e){if(M(e))return Hi(e);let t=Object.keys(Object(e));return Bi(e)?t.filter(e=>e!==`constructor`):t}function Hi(e){let t=Vi(e.length,e=>`${e}`),n=new Set(t);b(e)&&(n.add(`offset`),n.add(`parent`)),Y(e)&&(n.add(`buffer`),n.add(`byteLength`),n.add(`byteOffset`));let r=Object.keys(e).filter(e=>!n.has(e));return Array.isArray(e)?[...t,...r]:[...t.filter(t=>Object.hasOwn(e,t)),...r]}function Ui(e){if(e==null)return[];let t=X(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n}function Wi(e){return e==null}function Gi(e){return Wi(e)?[]:E(e)?xe(e):M(e)?xe(Array.from(e)):B(e)?xe(Ui(e)):[]}let Ki=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`),qi=`\\ud800-\\udfff`,Ji=`[${qi}]`,Yi=`[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]`,Xi=`\\ud83c[\\udffb-\\udfff]`,Zi=`(?:${Yi}|${Xi})`,Qi=`[^${qi}]`,$i=`(?:\\ud83c[\\udde6-\\uddff]){2}`,ea=`[\\ud800-\\udbff][\\udc00-\\udfff]`,ta=`${Zi}?`,na=`[\\ufe0e\\ufe0f]?`,ra=`(?:\\u200d(?:${[Qi,$i,ea].join(`|`)})${na}${ta})*`,ia=na+ta+ra,aa=`(?:${[`${Qi}${Yi}?`,Yi,$i,ea,Ji].join(`|`)})`,oa=RegExp(`${Xi}(?=${Xi})|${aa}${ia}`,`g`);function sa(e){let t=0;for(oa.lastIndex=0;oa.test(e);)++t;return t}function ca(e){return A(e)?0:typeof e==`string`?Ki.test(e)?sa(e):e.length:M(e)?e.length:e instanceof Map||e instanceof Set?e.size:Object.keys(e).length}function la(e,t,n){if(!M(e))return[];let r=e.length;n===void 0?n=r:typeof n!=`number`&&q(e,t,n)&&(t=0,n=r),t=K(t),n=K(n),t=t<0?Math.max(r+t,0):Math.min(t,r),n=n<0?Math.max(r+n,0):Math.min(n,r);let i=Math.max(n-t,0),a=Array(i);for(let n=0;n<i;++n)a[n]=e[t+n];return a}function ua(e,t,n){if(!e)return!1;n&&q(e,t,n)&&(t=void 0),t??=_;let r=Array.isArray(e)?e:Object.values(e);switch(typeof t){case`function`:if(!Array.isArray(e)){let n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r],a=e[i];if(t(a,i,e))return!0}return!1}for(let n=0;n<e.length;n++)if(t(e[n],n,e))return!0;return!1;case`object`:if(Array.isArray(t)&&t.length===2){let n=t[0],i=t[1],a=Cr(n,i);if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(a(e[t]))return!0;return!1}return r.some(a)}else{let n=_r(t);if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(n(e[t]))return!0;return!1}return r.some(n)}case`number`:case`symbol`:case`string`:{let n=lr(t);if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(n(e[t]))return!0;return!1}return r.some(n)}}}function da(e,...t){let n=t.length;return n>1&&q(e,t[0],t[1])?t=[]:n>2&&q(t[0],t[1],t[2])&&(t=[t[0]]),vi(e,te(t),[`asc`])}function fa(e){return typeof e==`number`||B(e)&&y(e)===`[object Number]`}function pa(e){return fa(e)&&Number.isNaN(Number(e))}function ma(e,t,n=J,r){if(Wi(e)||e.length===0)return 0;let i=0,a=e.length,o=z(n),s=o(t),c=pa(s),l=wn(s),u=U(s),d=kn(s);for(;i<a;){let t,n=Math.floor((i+a)/2),f=o(e[n]),p=!kn(f),m=wn(f),h=!pa(f),ee=U(f);t=c?r||h:d?h&&(r||p):l?h&&p&&(r||!m):u?h&&p&&!m&&(r||!ee):m||ee?!1:r?f<=s:f<s,t?i=n+1:a=n}return Math.min(a,4294967294)}function ha(e,t){if(A(e))return 0;let n=0,r=e.length;if(fa(t)&&t===t&&r<=2147483647){for(;n<r;){let i=n+r>>>1,a=e[i];!wn(a)&&!On(a)&&a<t?n=i+1:r=i}return r}return ma(e,t,e=>e)}function ga(e,t){if(!e?.length)return-1;let n=ha(e,t);return n<e.length&&O(e[n],t)?n:-1}function _a(e,t,n){return ma(e,t,n,!0)}function va(e,t){if(A(e))return 0;let n=e.length;if(!fa(t)||Number.isNaN(t)||n>2147483647)return _a(e,t,e=>e);let r=0;for(;r<n;){let i=r+n>>>1,a=e[i];!wn(a)&&!On(a)&&a<=t?r=i+1:n=i}return n}function ya(e,t){if(!e?.length)return-1;let n=va(e,t)-1;return n>=0&&O(e[n],t)?n:-1}function ba(e){return M(e)?Se(j(e)):[]}function xa(e,t=1,n){return t=n||t===void 0?1:K(t),t<1||!M(e)?[]:Ce(j(e),t)}function Sa(e,t=1,n){return t=n?1:K(t),t<=0||!M(e)?[]:we(j(e),t)}function Ca(e,t){if(!M(e))return[];let n=j(e),r=n.findLastIndex(He(z(t??_)));return n.slice(r+1)}function wa(e,t){if(!M(e))return[];let n=j(e),r=n.findIndex(Ai(z(t??J)));return r===-1?n:n.slice(0,r)}function Ta(...e){return g(Yr(e.filter(V),e=>Array.from(e),1))}function Ea(...e){let t=fe(e),n=Dr(e);return V(t)||t==null?g(n):Ee(n,Le(z(t),1)).map(Tr)}function Da(...e){let t=fe(e),n=Dr(e);return V(t)||t==null?g(n):De(n,t)}function Oa(e){return M(e)?g(Array.from(e)):[]}function ka(e,t=_){return M(e)?Ee(Array.from(e),Le(z(t),1)).map(Tr):[]}function Aa(e,t){return M(e)?typeof t==`function`?De(Array.from(e),(e,n)=>t(n,e)):Oa(Array.from(e)):[]}function ja(e){return!V(e)||!e.length?[]:(e=E(e)?e:Array.from(e),e=e.filter(e=>V(e)),Oe(e))}function Ma(e,t){if(!V(e)||!e.length)return[];let n=E(e)?Oe(e):Oe(Array.from(e,e=>Array.from(e)));if(!t)return n;let r=Array(n.length);for(let e=0;e<n.length;e++){let i=n[e];r[e]=t(...i)}return r}function Na(e,...t){return V(e)?Ae(Array.from(e),...t):[]}function Pa(...e){let t=new Map;for(let n=0;n<e.length;n++){let r=e[n];if(!V(r))continue;let i=new Set(Ri(r));for(let e of i)t.has(e)?t.set(e,t.get(e)+1):t.set(e,1)}let n=[];for(let[e,r]of t)r===1&&n.push(e);return n}function Fa(...e){let t=H(e),n=_;!V(t)&&t!=null&&(n=z(t),e=e.slice(0,-1));let r=e.filter(V);return Or(Ea(...r,n),Ea(...ke(r,2).map(([e,t])=>ai(e,t,n)),n),n)}function Ia(...e){let t=H(e),n=(e,t)=>e===t;typeof t==`function`&&(n=t,e=e.slice(0,-1));let r=e.filter(V);return kr(Da(...r,n),Da(...ke(r,2).map(([e,t])=>oi(e,t,n)),n),n)}function La(...e){return e.length?je(...e.filter(e=>V(e))):[]}let Ra=(e,t,n)=>{let r=e[t];(!(Object.hasOwn(e,t)&&O(r,n))||n===void 0&&!(t in e))&&(e[t]=n)};function za(e=[],t=[]){e||=[],t||=[];let n={};for(let r=0;r<e.length;r++)Ra(n,e[r],t[r]);return n}function Ba(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function Va(e,t,n,r){if(e==null&&!L(e))return e;let i;i=_i(t,e)?[t]:Array.isArray(t)?t:F(t);let a=n(I(e,i)),o=e;for(let t=0;t<i.length&&o!=null;t++){let n=N(i[t]);if(Ba(n))return e;let s;if(t===i.length-1)s=a;else{let a=o[n],c=r?.(a,n,e);s=c===void 0?L(a)?a:xr(i[t+1])?[]:{}:c}Ra(o,n,s),o=o[n]}return e}function Ha(e,t,n){return Va(e,t,()=>n,()=>void 0)}function Ua(e,t){let n={};if(!M(e))return n;M(t)||(t=[]);let r=je(Array.from(e),Array.from(t));for(let e=0;e<r.length;e++){let[t,i]=r[e];t!=null&&Ha(n,t,i)}return n}function Wa(...e){let t=e.pop();if(k(t)||(e.push(t),t=void 0),!e?.length)return[];let n=ja(e);return t==null?n:n.map(e=>t(...e))}function Ga(e,t){if(typeof t!=`function`)throw TypeError(`Expected a function`);return e=K(e),function(...n){if(--e<1)return t.apply(this,n)}}function Ka(e,t=e.length,n){return n&&(t=e.length),(Number.isNaN(t)||t<0)&&(t=0),Le(e,t)}function qa(e,...t){try{return e(...t)}catch(e){return e instanceof Error?e:Error(e)}}function Ja(e,t){if(typeof t!=`function`)throw TypeError(`Expected a function`);let n;return e=K(e),function(...r){return--e>0&&(n=t.apply(this,r)),e<=1&&t&&(t=void 0),n}}function Ya(e,t,...n){let r=function(...i){let a=[],o=0;for(let e=0;e<n.length;e++){let t=n[e];t===Ya.placeholder?a.push(i[o++]):a.push(t)}for(let e=o;e<i.length;e++)a.push(i[e]);return this instanceof r?new e(...a):e.apply(t,a)};return r}Ya.placeholder=Symbol(`bind.placeholder`);function Xa(e,t,...n){let r=function(...i){let a=[],o=0;for(let e=0;e<n.length;e++){let t=n[e];t===Xa.placeholder?a.push(i[o++]):a.push(t)}for(let e=o;e<i.length;e++)a.push(i[e]);return this instanceof r?new e[t](...a):e[t].apply(e,a)};return r}Xa.placeholder=Symbol(`bindKey.placeholder`);function Za(e,t=e.length,n){t=n?e.length:t,t=Number.parseInt(t,10),(Number.isNaN(t)||t<1)&&(t=0);let r=function(...n){let i=n.filter(e=>e===Za.placeholder),a=n.length-i.length;return a<t?Qa(e,t-a,n):this instanceof r?new e(...n):e.apply(this,n)};return r.placeholder=eo,r}function Qa(e,t,n){function r(...i){let a=i.filter(e=>e===Za.placeholder),o=i.length-a.length;return i=$a(i,n),o<t?Qa(e,t-o,i):this instanceof r?new e(...i):e.apply(this,i)}return r.placeholder=eo,r}function $a(e,t){let n=[],r=0;for(let i=0;i<t.length;i++){let a=t[i];a===Za.placeholder&&r<e.length?n.push(e[r++]):n.push(a)}for(let t=r;t<e.length;t++)n.push(e[t]);return n}let eo=Symbol(`curry.placeholder`);Za.placeholder=eo;function to(e,t=e.length,n){t=n?e.length:t,t=Number.parseInt(t,10),(Number.isNaN(t)||t<1)&&(t=0);let r=function(...n){let i=n.filter(e=>e===to.placeholder),a=n.length-i.length;return a<t?no(e,t-a,n):this instanceof r?new e(...n):e.apply(this,n)};return r.placeholder=io,r}function no(e,t,n){function r(...i){let a=i.filter(e=>e===to.placeholder),o=i.length-a.length;return i=ro(i,n),o<t?no(e,t-o,i):this instanceof r?new e(...i):e.apply(this,i)}return r.placeholder=io,r}function ro(e,t){let n=t.filter(e=>e===to.placeholder).length,r=Math.max(e.length-n,0),i=[],a=0;for(let t=0;t<r;t++)i.push(e[a++]);for(let n=0;n<t.length;n++){let r=t[n];r===to.placeholder&&a<e.length?i.push(e[a++]):i.push(r)}return i}let io=Symbol(`curryRight.placeholder`);to.placeholder=io;function ao(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=ze(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?((r||i)&&(s=e.apply(this,t)),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function oo(e,...t){if(typeof e!=`function`)throw TypeError(`Expected a function`);return setTimeout(e,1,...t)}function so(e,t,...n){if(typeof e!=`function`)throw TypeError(`Expected a function`);return setTimeout(e,W(t)||0,...n)}function co(e){return function(...t){return e.apply(this,t.reverse())}}function lo(...e){let t=te(e,1);if(t.some(e=>typeof e!=`function`))throw TypeError(`Expected a function`);return Be(...t)}function uo(...e){let t=te(e,1);if(t.some(e=>typeof e!=`function`))throw TypeError(`Expected a function`);return Ve(...t)}function fo(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(fo.Cache||Map),n}fo.Cache=Map;function po(e=0){return function(...t){return t.at(K(e))}}function mo(e){return We(e)}function ho(e,...t){if(typeof e!=`function`)throw TypeError(`Expected a function`);let n=t.flat();return function(...t){let r=Math.min(t.length,n.length),i=[...t];for(let e=0;e<r;e++)i[e]=z(n[e]??_).call(this,t[e]);return e.apply(this,i)}}function go(e,...t){return Ke(e,go.placeholder,...t)}go.placeholder=Symbol(`compat.partial.placeholder`);function _o(e,...t){return Ye(e,_o.placeholder,...t)}_o.placeholder=Symbol(`compat.partialRight.placeholder`);function vo(e,...t){let n=Qr(t);return function(...t){let r=n.map(e=>t[e]).slice(0,t.length);for(let e=r.length;e<t.length;e++)r.push(t[e]);return e.apply(this,r)}}function yo(e,t=e.length-1){return t=Number.parseInt(t,10),(Number.isNaN(t)||t<0)&&(t=e.length-1),Ze(e,t)}function bo(e,t=0){return t=Number.parseInt(t,10),(Number.isNaN(t)||t<0)&&(t=0),function(...n){let r=n[t],i=n.slice(0,t);return r&&i.push(...r),e.apply(this,i)}}function xo(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return ao(e,t,{leading:r,maxWait:t,trailing:i})}function So(e){return Ka(e,1)}function Co(e,t){return function(...n){return(k(t)?t:_).apply(this,[e,...n])}}function wo(e,t){return e===void 0&&t===void 0?0:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=P(e),t=P(t)):(e=W(e),t=W(t)),e+t)}function To(e,t,n=0){if(t=Number(t),Object.is(t,-0)&&(t=`-0`),n=Math.min(Number.parseInt(n,10),292),n&&Number.isFinite(Number(t))){let[r,i=0]=t.toString().split(`e`),a=Math[e](Number(`${r}e${Number(i)+n}`));Object.is(a,-0)&&(a=`-0`);let[o,s=0]=a.toString().split(`e`);return Number(`${o}e${Number(s)-n}`)}return Math[e](Number(t))}function Eo(e,t=0){return To(`ceil`,e,t)}function Do(e,t){return e===void 0&&t===void 0?1:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=P(e),t=P(t)):(e=W(e),t=W(t)),e/t)}function Oo(e,t=0){return To(`floor`,e,t)}function ko(e,t,n){return t=G(t),n===void 0?(n=t,t=0):n=G(n),e=W(e),e>=Math.min(t,n)&&e<Math.max(t,n)}function Ao(e){if(!e||e.length===0)return;let t;for(let n=0;n<e.length;n++){let r=e[n];r==null||Number.isNaN(r)||typeof r==`symbol`||(t===void 0||r>t)&&(t=r)}return t}function jo(e,t=_){if(e==null)return;let n=j(e);if(n.length===0)return;let r=z(t),i,a;for(let e=0;e<n.length;e++){let t=n[e],o=r(t,e,n);o==null||Number.isNaN(o)||typeof o==`symbol`||(a===void 0||o>a)&&(a=o,i=t)}return i}function Mo(e,t){if(!e||!e.length)return 0;t!=null&&(t=z(t));let n;for(let r=0;r<e.length;r++){let i=t?t(e[r]):e[r];i!==void 0&&(n===void 0?n=i:n+=i)}return n}function No(e){return Mo(e)}function Po(e){let t=e?e.length:0;return t===0?NaN:No(e)/t}function Fo(e,t){let n=e==null?0:e.length;return n?Mo(e,z(t??_))/n:NaN}function Io(e){if(!e||e.length===0)return;let t;for(let n=0;n<e.length;n++){let r=e[n];r==null||Number.isNaN(r)||typeof r==`symbol`||(t===void 0||r<t)&&(t=r)}return t}function Lo(e,t=_){if(e==null)return;let n=j(e);if(n.length===0)return;let r=z(t),i,a;for(let e=0;e<n.length;e++){let t=n[e],o=r(t,e,n);o==null||Number.isNaN(o)||typeof o==`symbol`||(a===void 0||o<a)&&(a=o,i=t)}return i}function Ro(e,t){return e===void 0&&t===void 0?1:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=P(e),t=P(t)):(e=W(e),t=W(t)),e*t)}function zo(e,t=0,n){return n&&(t=0),Number.parseInt(P(e),t)}function Bo(...e){let t=0,n=1,r=!1;switch(e.length){case 1:typeof e[0]==`boolean`?r=e[0]:n=e[0];break;case 2:if(typeof e[1]==`boolean`){n=e[0],r=e[1];break}else t=e[0],n=e[1];case 3:typeof e[2]==`object`&&e[2]!=null&&e[2][e[1]]===e[0]?(t=0,n=e[0],r=!1):(t=e[0],n=e[1],r=e[2])}return typeof t!=`number`&&(t=Number(t)),typeof n!=`number`&&(n=Number(n)),t||=0,n||=0,t>n&&([t,n]=[n,t]),!r&&(!Number.isInteger(t)||!Number.isInteger(n))&&(r=!0),t=Fi(t,-(2**53-1),2**53-1),n=Fi(n,-(2**53-1),2**53-1),t===n?t:r?ve(t,n):ye(t,n+1)}function Vo(e,t,n){n&&typeof n!=`number`&&q(e,t,n)&&(t=n=void 0),e=G(e),t===void 0?(t=e,e=0):t=G(t),n=n===void 0?e<t?1:-1:G(n);let r=Math.max(Math.ceil((t-e)/(n||1)),0),i=Array(r);for(let t=0;t<r;t++)i[t]=e,e+=n;return i}function Ho(e,t,n){n&&typeof n!=`number`&&q(e,t,n)&&(t=n=void 0),e=G(e),t===void 0?(t=e,e=0):t=G(t),n=n===void 0?e<t?1:-1:G(n);let r=Math.max(Math.ceil((t-e)/(n||1)),0),i=Array(r);for(let t=r-1;t>=0;t--)i[t]=e,e+=n;return i}function Uo(e,t=0){return To(`round`,e,t)}function Wo(e,t){return e===void 0&&t===void 0?0:e===void 0||t===void 0?e??t:(typeof e==`string`||typeof t==`string`?(e=P(e),t=P(t)):(e=W(e),t=W(t)),e-t)}function Go(...e){}function Ko(e,...t){for(let n=0;n<t.length;n++)qo(e,t[n]);return e}function qo(e,t){let n=X(t);for(let r=0;r<n.length;r++){let i=n[r];(!(i in e)||!O(e[i],t[i]))&&(e[i]=t[i])}}function Z(e){if(e==null)return[];switch(typeof e){case`object`:case`function`:return M(e)?Xo(e):Bi(e)?Yo(e):Jo(e);default:return Jo(Object(e))}}function Jo(e){let t=[];for(let n in e)t.push(n);return t}function Yo(e){return Jo(e).filter(e=>e!==`constructor`)}function Xo(e){let t=Vi(e.length,e=>`${e}`),n=new Set(t);b(e)&&(n.add(`offset`),n.add(`parent`)),Y(e)&&(n.add(`buffer`),n.add(`byteLength`),n.add(`byteOffset`));let r=Jo(e).filter(e=>!n.has(e));return Array.isArray(e)?[...t,...r]:[...t.filter(t=>Object.hasOwn(e,t)),...r]}function Zo(e,...t){for(let n=0;n<t.length;n++)Qo(e,t[n]);return e}function Qo(e,t){let n=Z(t);for(let r=0;r<n.length;r++){let i=n[r];(!(i in e)||!O(e[i],t[i]))&&(e[i]=t[i])}}function $o(e,...t){let n=t[t.length-1];typeof n==`function`?t.pop():n=void 0;for(let r=0;r<t.length;r++)es(e,t[r],n);return e}function es(e,t,n){let r=Z(t);for(let i=0;i<r.length;i++){let a=r[i],o=e[a],s=t[a],c=n?.(o,s,a,e,t)??s;(!(a in e)||!O(o,c))&&(e[a]=c)}}function ts(e,...t){let n=t[t.length-1];typeof n==`function`?t.pop():n=void 0;for(let r=0;r<t.length;r++)ns(e,t[r],n);return e}function ns(e,t,n){let r=X(t);for(let i=0;i<r.length;i++){let a=r[i],o=e[a],s=t[a],c=n?.(o,s,a,e,t)??s;(!(a in e)||!O(o,c))&&(e[a]=c)}}function rs(e){if(it(e))return e;let t=y(e);if(!is(e))return{};if(E(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(Y(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?ss(r,e):as(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return as(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return cs(n,e),as(n,e),os(n,e),n}function is(e){switch(y(e)){case ft:case _t:case vt:case bt:case dt:case mt:case Ot:case kt:case Tt:case Et:case Dt:case ht:case ut:case yt:case ct:case gt:case lt:case pt:case xt:case St:case Ct:case wt:return!0;default:return!1}}function as(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function os(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function ss(e,t){let n=t.valueOf().length;for(let r in t)Object.hasOwn(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function cs(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}function ls(e,t){if(!t)return rs(e);let n=t(e);return n===void 0?rs(e):n}function us(e,t){let n=L(e)?Object.create(e):{};if(t!=null){let e=X(t);for(let r=0;r<e.length;r++){let i=e[r],a=t[i];Ra(n,i,a)}}return n}function ds(e,...t){e=Object(e);let n=Object.prototype,r=t.length,i=r>2?t[2]:void 0;i&&q(t[0],t[1],i)&&(r=1);for(let i=0;i<r;i++){if(A(t[i]))continue;let r=t[i],a=Object.keys(r);for(let t=0;t<a.length;t++){let i=a[t],o=e[i];(o===void 0||!Object.hasOwn(e,i)&&O(o,n[i]))&&(e[i]=r[i])}}return e}function fs(e,...t){e=Object(e);for(let n=0;n<t.length;n++){let r=t[n];r!=null&&ps(e,r,new WeakMap)}return e}function ps(e,t,n){for(let r in t){let i=t[r],a=e[r];if(a===void 0||!Object.hasOwn(e,r)){e[r]=ms(i,n);continue}n.get(i)!==a&&hs(a,i,n)}}function ms(e,t){if(t.has(e))return t.get(e);if(D(e)){let n={};return t.set(e,n),ps(n,e,t),n}return e}function hs(e,t,n){if(D(e)&&D(t)){n.set(t,e),ps(e,t,n);return}Array.isArray(e)&&Array.isArray(t)&&(n.set(t,e),gs(e,t,n))}function gs(e,t,n){let r=Math.min(t.length,e.length);for(let i=0;i<r;i++)D(e[i])&&D(t[i])&&ps(e[i],t[i],n);for(let n=r;n<t.length;n++)e.push(t[n])}function _s(e){let t=Array(e.size),n=e.keys(),r=e.values();for(let e=0;e<t.length;e++)t[e]=[n.next().value,r.next().value];return t}function vs(e){let t=Array(e.size),n=e.values();for(let e=0;e<t.length;e++){let r=n.next().value;t[e]=[r,r]}return t}function ys(e){if(e==null)return[];if(e instanceof Set)return vs(e);if(e instanceof Map)return _s(e);let t=X(e),n=Array(t.length);for(let r=0;r<t.length;r++){let i=t[r];n[r]=[i,e[i]]}return n}function bs(e){if(e==null)return[];if(e instanceof Set)return vs(e);if(e instanceof Map)return _s(e);let t=Z(e),n=Array(t.length);for(let r=0;r<t.length;r++){let i=t[r];n[r]=[i,e[i]]}return n}function xs(e,t){if(L(e))return Pt(e,z(t??J))}function Ss(e,t){if(!L(e))return;let n=z(t??J);return Object.keys(e).findLast(t=>n(e[t],t,e))}function Cs(e,t=_){if(e==null)return e;for(let n in e)if(t(e[n],n,e)===!1)break;return e}function ws(e,t=_){if(e==null)return e;let n=[];for(let t in e)n.push(t);for(let r=n.length-1;r>=0;r--){let i=n[r];if(t(e[i],i,e)===!1)break}return e}function Ts(e,t=_){if(e==null)return e;let n=Object(e),r=X(e);for(let e=0;e<r.length;++e){let i=r[e];if(t(n[i],i,n)===!1)break}return e}function Es(e,t=_){if(e==null)return e;let n=Object(e),r=X(e);for(let e=r.length-1;e>=0;--e){let i=r[e];if(t(n[i],i,n)===!1)break}return e}function Ds(e){if(!M(e))return{};let t={};for(let n=0;n<e.length;n++){let[r,i]=e[n];t[r]=i}return t}function Os(e){return e==null?[]:X(e).filter(t=>typeof e[t]==`function`)}function ks(e){if(e==null)return[];let t=[];for(let n in e)k(e[n])&&t.push(n);return t}function As(e,t){if(e==null)return!1;let n;if(n=Array.isArray(t)?t:typeof t==`string`&&or(t)&&!(t in Object(e))?F(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!(t in Object(r)))&&!((Array.isArray(r)||R(r))&&xr(t)&&t<r.length))return!1;r=r[t]}return!0}function js(e){return Lt(e)}function Ms(e,t){let n={};if(A(e))return n;t??=_;let r=Object.keys(e),i=z(t);for(let t=0;t<r.length;t++){let a=r[t],o=e[a],s=i(o);Array.isArray(n[s])?n[s].push(a):n[s]=[a]}return n}function Ns(e,t=_){return e==null?{}:Rt(e,z(t))}function Ps(e,t=_){return e==null?{}:Bt(e,z(t))}function Fs(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=Is(i,t,r,new Map)}return i}function Is(e,t,n,r){if(it(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return ot(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...st(t)];for(let a=0;a<i.length;a++){let o=i[a];if(w(o))continue;let s=t[o],c=e[o];if(R(s)&&(s={...s}),R(c)&&(c={...c}),b(s)&&(s=yr(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(V(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||B(c)&&B(s)&&(D(c)||D(s)||Y(c)||Y(s))?e[o]=Is(c,s,n,r):c==null&&D(s)?e[o]=Is({},s,n,r):c==null&&Y(s)?e[o]=yr(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function Ls(e,...t){return Fs(e,...t,Ue)}function Rs(e){let t=[];for(;e;)t.push(...st(e)),e=Object.getPrototypeOf(e);return t}function zs(e,...t){if(e==null)return{};t=Qr(t);let n=Bs(e,t);for(let e=0;e<t.length;e++){let r=t[e];switch(typeof r){case`object`:if(Array.isArray(r))Ei(n,r);else{let e=Array.from(r);for(let t=0;t<e.length;t++)Ei(n,e[t])}break;case`string`:case`symbol`:case`number`:Ei(n,r);break}}return n}function Bs(e,t){return t.some(e=>Array.isArray(e)||or(e))?Hs(e):Vs(e)}function Vs(e){let t={},n=[...Z(e),...Rs(e)];for(let r=0;r<n.length;r++){let i=n[r];t[i]=e[i]}return t}function Hs(e){let t={},n=[...Z(e),...Rs(e)];for(let r=0;r<n.length;r++){let i=n[r];t[i]=vr(e[i],e=>{if(!D(e))return e})}return t}function Us(e,t){if(e==null)return{};let n={},r=z(t??J),i=[...Z(e),...Rs(e)];for(let t=0;t<i.length;t++){let a=U(i[t])?i[t]:i[t].toString(),o=e[a];r(o,a,e)||(n[a]=o)}return n}function Ws(e,...t){if(Wi(e))return{};let n={};for(let r=0;r<t.length;r++){let i=t[r];switch(typeof i){case`object`:Array.isArray(i)||(i=M(i)?Array.from(i):[i]);break;case`string`:case`symbol`:case`number`:i=[i];break}for(let t of i){let r=I(e,t);r===void 0&&!Sr(e,t)||(typeof t==`string`&&Object.hasOwn(e,t)?n[t]=e[t]:Ha(n,t,r))}}return n}function Gs(e,t){if(e==null)return{};let n=z(t??J),r={},i=M(e)?v(0,e.length):[...Z(e),...Rs(e)];for(let t=0;t<i.length;t++){let a=U(i[t])?i[t]:i[t].toString(),o=e[a];n(o,a,e)&&(r[a]=o)}return r}function Ks(e){return function(t){return I(e,t)}}function qs(e,t,n){_i(t,e)?t=[t]:Array.isArray(t)||(t=F(P(t)));let r=Math.max(t.length,1);for(let i=0;i<r;i++){let r=e?.[N(t[i])];if(r===void 0)return typeof n==`function`?n.call(e):n;e=typeof r==`function`?r.call(e):r}return e}function Js(e,t,n,r){let i;return i=typeof r==`function`?r:()=>void 0,Va(e,t,()=>n,i)}function Ys(e,...t){return ds(yr(e),...t)}function Xs(e){return b(e)}function Zs(e,t=_,n){let r=Array.isArray(e)||Xs(e)||Y(e);return t=z(t),n??=r?[]:L(e)&&k(e.constructor)?Object.create(Object.getPrototypeOf(e)):{},e==null||Ir(e,(e,r,i)=>t(n,e,r,i)),n}function Qs(e,t,n){return Va(e,t,n,()=>void 0)}function $s(e){let t=Z(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n}function ec(e){return typeof e==`function`}function tc(e){return Number.isSafeInteger(e)&&e>=0}let nc=Function.prototype.toString,rc=RegExp(`^${nc.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)}$`);function ic(e){if(typeof e!=`function`)return!1;if(globalThis?.[`__core-js_shared__`]!=null)throw Error(`Unsupported core-js use. Try https://npms.io/search?q=ponyfill.`);return rc.test(nc.call(e))}function ac(e){return e===null}function oc(e){return kn(e)}function sc(e,t){if(t==null)return!0;if(e==null)return Object.keys(t).length===0;let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i],o=e[i];if(o===void 0&&!(i in e)||typeof a==`function`&&!a(o))return!1}return!0}function cc(e){return e=Mt(e),function(t){return sc(t,e)}}function lc(e){return an(e)}function uc(e){return typeof e==`boolean`||e instanceof Boolean}function dc(e){return cn(e)}function fc(e){return B(e)&&e.nodeType===1&&!D(e)}function pc(e){if(e==null)return!0;if(M(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!b(e)&&!Y(e)&&!R(e)?!1:e.length===0;if(typeof e==`object`||typeof e==`function`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return Bi(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}function mc(e,t,n){return typeof n!=`function`&&(n=()=>void 0),un(e,t,(...r)=>{let i=n(...r);if(i!==void 0)return!!i;if(e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set)return mc(Array.from(e),Array.from(t),Ie(2,n))})}function hc(e){return y(e)===`[object Error]`}function gc(e){return Number.isFinite(e)}function _c(e){return Number.isInteger(e)}function vc(e){return En(e)}function yc(e){return Number.isSafeInteger(e)}function bc(e){return An(e)}function xc(e){return jn(e)}function Sc(e){return Wt(P(e))}function Cc(e,...t){if(e==null||!L(e)||E(e)&&t.length===0)return e;let n=[];for(let e=0;e<t.length;e++){let r=t[e];E(r)?n.push(...r):r&&typeof r==`object`&&`length`in r?n.push(...Array.from(r)):n.push(r)}if(n.length===0)return e;for(let t=0;t<n.length;t++){let r=n[t],i=P(r),a=e[i];k(a)&&(e[i]=a.bind(e))}return e}function Q(e){return Ln(P(e))}let wc=`\\p{Lu}`,Tc=`\\p{Ll}`,Ec=`(?:[\\p{Lm}\\p{Lo}]\\p{M}*)`,Dc=`(?:['’](?:d|ll|m|re|s|t|ve))?`,Oc=`(?:['’](?:D|LL|M|RE|S|T|VE))?`,kc=`[\\p{Z}\\p{P}\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\xd7\\xf7]`,Ac=`(?:${wc}|${Ec})`,jc=`(?:${Tc}|${Ec})`,Mc;function Nc(){return Mc??=RegExp([`${wc}?${Tc}+${Dc}(?=${kc}|${wc}|$)`,`${Ac}+${Oc}(?=${kc}|${wc}${jc}|$)`,`${wc}?${jc}+${Dc}`,`${wc}+${Oc}`,`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,`\\d+`,`\\p{Emoji_Presentation}`,`\\p{Extended_Pictographic}`].join(`|`),`gu`),Mc}function $(e,t,n){let r=P(e);return(n||t===void 0)&&(t=Nc()),typeof t==`number`&&(t=t.toString()),Array.from(r.match(t)??[]).filter(e=>e!==``)}function Pc(e){return typeof e!=`string`&&(e=P(e)),e.replace(/['\u2019]/g,``)}function Fc(e){let t=$(Pc(Q(e)));if(t.length===0)return``;let[n,...r]=t;return`${n.toLowerCase()}${r.map(e=>Wt(e)).join(``)}`}function Ic(e,t,n){return e==null||t==null?!1:(n??=e.length,e.endsWith(t,n))}function Lc(e){return Hn(P(e))}function Rc(e){return Un(P(e))}function zc(e){return $(Pc(Q(e))).map(e=>e.toLowerCase()).join(`-`)}function Bc(e){return $(Pc(Q(e))).map(e=>e.toLowerCase()).join(` `)}function Vc(e){return Wn(P(e))}function Hc(e){return Ki.test(e)?Array.from(e).length:e.length}function Uc(e,t){let n=Hc(t);if(n===0||e<1)return``;let r=t.repeat(Math.ceil(e/n));return Ki.test(r)?Array.from(r).slice(0,e).join(``):r.slice(0,e)}function Wc(e,t=0,n=` `){let r=P(e),i=K(t),a=Hc(r);if(i<=a)return r;let o=(i-a)/2,s=`${n}`;return Uc(Math.floor(o),s)+r+Uc(Math.ceil(o),s)}function Gc(e,t=0,n=` `){let r=P(e),i=K(t),a=Hc(r);return i<=a?r:r+Uc(i-a,`${n}`)}function Kc(e,t=0,n=` `){let r=P(e),i=K(t),a=Hc(r);return i<=a?r:Uc(i-a,`${n}`)+r}let qc=2**53-1;function Jc(e,t,n){return t=(n?q(e,t,n):t===void 0)?1:K(t),t<1||t>qc?``:P(e).repeat(t)}function Yc(e,t,n){return arguments.length<3?P(e):P(e).replace(t,n)}function Xc(e){return $(Pc(Q(e))).map(e=>e.toLowerCase()).join(`_`)}function Zc(e,t,n){return P(e).split(t,n)}function Qc(e){let t=$(Pc(Q(e)).trim()),n=``;for(let e=0;e<t.length;e++){let r=t[e];n&&(n+=` `),r===r.toUpperCase()?n+=r:n+=r[0].toUpperCase()+r.slice(1).toLowerCase()}return n}function $c(e,t,n){return e==null||t==null?!1:(n??=0,e.startsWith(t,n))}let el=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,tl=/['\n\r\u2028\u2029\\]/g,nl=/($^)/,rl=new Map([[`\\`,`\\`],[`'`,`'`],[`
|
|
5
|
+
`,`n`],[`\r`,`r`],[`\u2028`,`u2028`],[`\u2029`,`u2029`]]);function il(e){return`\\${rl.get(e)}`}let al=/<%=([\s\S]+?)%>/g,ol={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:al,variable:``,imports:{_:{escape:Lc,template:sl}}};function sl(e,t,n){e=P(e),n&&q(e,t,n)&&(t=ol),t=ds({...t},ol);let r=new RegExp([t.escape?.source??nl.source,t.interpolate?.source??nl.source,t.interpolate===al?el.source:nl.source,t.evaluate?.source??nl.source,`$`].join(`|`),`g`),i=0,a=!1,o=`__p += ''`;for(let t of e.matchAll(r)){let[n,r,s,c,l]=t,{index:u}=t;o+=` + '${e.slice(i,u).replace(tl,il)}'`,r&&(o+=` + _.escape(${r})`),s?o+=` + ((${s}) == null ? '' : ${s})`:c&&(o+=` + ((${c}) == null ? '' : ${c})`),l&&(o+=`;\n${l};\n __p += ''`,a=!0),i=u+n.length}let s=ds({...t.imports},ol.imports),c=Object.keys(s),l=Object.values(s),u=`//# sourceURL=${t.sourceURL?String(t.sourceURL).replace(/[\r\n]/g,` `):`es-toolkit.templateSource[${Date.now()}]`}\n`,d=`function(${t.variable||`obj`}) {
|
|
6
6
|
let __p = '';
|
|
7
7
|
${t.variable?``:`if (obj == null) { obj = {}; }`}
|
|
8
8
|
${a?`function print() { __p += Array.prototype.join.call(arguments, ''); }`:``}
|
|
9
9
|
${t.variable?o:`with(obj) {\n${o}\n}`}
|
|
10
10
|
return __p;
|
|
11
|
-
}`,f=
|
|
11
|
+
}`,f=qa(()=>Function(...c,`${u}return ${d}`)(...l));if(f.source=d,f instanceof Error)throw f;return f}let cl=ol;function ll(e){return P(e).toLowerCase()}function ul(e){return P(e).toUpperCase()}function dl(e,t,n){if(e==null)return``;if(n!=null||t==null)return e.toString().trim();switch(typeof t){case`object`:return Array.isArray(t)?Jn(e,t.flatMap(e=>e.toString().split(``))):Jn(e,t.toString().split(``));default:return Jn(e,t.toString().split(``))}}function fl(e,t,n){return e==null?``:n!=null||t==null?e.toString().trimEnd():Kn(e,t.toString().split(``))}function pl(e,t,n){return e==null?``:n!=null||t==null?e.toString().trimStart():qn(e,t.toString().split(``))}function ml(e,t){e=e==null?``:`${e}`;let n=30,r=`...`;L(t)&&(n=hl(t.length),r=`omission`in t?`${t.omission}`:`...`);let i=e.length,a=Array.from(r).length,o=Math.max(n-a,0),s;if(Ki.test(e)&&(s=Array.from(e),i=s.length),n>=i)return e;if(i<=a)return r;let c=s===void 0?e.slice(0,o):s?.slice(0,o).join(``),l=t?.separator;if(!l)return c+=r,c;let u=l instanceof RegExp?l.source:l,d=`u`+(l instanceof RegExp?l.flags.replace(`u`,``):``),f=RegExp(`(?<result>.*(?:(?!${u}).))(?:${u})`,d).exec(c);return(f?.groups?f.groups.result:c)+r}function hl(e){return e==null?30:e<=0?0:e}function gl(e){return Xn(P(e))}function _l(e){return $(Pc(Q(e))).map(e=>e.toUpperCase()).join(` `)}function vl(e){return Zn(P(e))}function yl(e){let t=e.length,n=e.map(e=>{let t=e[0],n=e[1];if(!k(n))throw TypeError(`Expected a function`);return[z(t),n]});return function(...e){for(let r=0;r<t;r++){let t=n[r],i=t[0],a=t[1];if(i.apply(this,e))return a.apply(this,e)}}}function bl(e){return()=>e}function xl(e,t){return e==null||Number.isNaN(e)?t:e}function Sl(e,t){return typeof e==`string`&&typeof t==`string`?e>t:W(e)>W(t)}function Cl(e,t){return typeof e==`string`&&typeof t==`string`?e>=t:W(e)>=W(t)}function wl(e,t,...n){if(n=n.flat(1),e!=null)switch(typeof t){case`string`:return typeof e==`object`&&Object.hasOwn(e,t)?Tl(e,[t],n):Tl(e,F(t),n);case`number`:case`symbol`:return Tl(e,[t],n);default:return Array.isArray(t)?Tl(e,t,n):Tl(e,[t],n)}}function Tl(e,t,n){let r=I(e,t.slice(0,-1),e);if(r==null)return;let i=H(t),a=i?.valueOf();return i=typeof a==`number`?N(a):String(i),I(r,i)?.apply(r,n)}function El(e,t){return typeof e==`string`&&typeof t==`string`?e<t:W(e)<W(t)}function Dl(e,t){return typeof e==`string`&&typeof t==`string`?e<=t:W(e)<=W(t)}function Ol(e,...t){return function(n){return wl(n,e,t)}}function kl(e,...t){return function(n){return wl(e,n,t)}}function Al(){return Date.now()}function jl(...e){e.length===1&&Array.isArray(e[0])&&(e=e[0]);let t=e.map(e=>z(e));return function(...e){return t.map(t=>t.apply(this,e))}}function Ml(...e){return function(...t){for(let n=0;n<e.length;++n){let r=e[n];if(!Array.isArray(r)){if(!z(r).apply(this,t))return!1;continue}for(let e=0;e<r.length;++e)if(!z(r[e]).apply(this,t))return!1}return!0}}function Nl(...e){return function(...t){for(let n=0;n<e.length;++n){let r=e[n];if(!Array.isArray(r)){if(z(r).apply(this,t))return!0;continue}for(let e=0;e<r.length;++e)if(z(r[e]).apply(this,t))return!0}return!1}}function Pl(){return[]}function Fl(){return!1}function Il(){return{}}function Ll(){return``}function Rl(){return!0}function zl(e){return e==null?0:Fi(K(e),0,4294967295)}function Bl(e){let t={},n=Z(e);for(let r=0;r<n.length;r++){let i=n[r],a=e[i];i===`__proto__`?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,value:a,writable:!0}):t[i]=a}return t}function Vl(e){return e==null?0:Fi(K(e),-qc,qc)}let Hl=0;function Ul(e=``){return`${e}${++Hl}`}function Wl(e,t,n){if(!e)return!0;n&&q(e,t,n)&&(t=void 0);let r=z(t??_);if(!M(e)){let t=Object.keys(e);for(let n=0;n<t.length;n++){let i=t[n],a=e[i];if(!r(a,i,e))return!1}return!0}for(let t=0;t<e.length;t++)if(!r(e[t],t,e))return!1;return!0}e.AbortError=Pe,e.Mutex=Nn,e.Semaphore=m,e.TimeoutError=Fe,e.add=wo,e.after=Ga,e.allKeyed=Mn,e.ary=Ka,e.assert=er,e.invariant=er,e.assign=Ko,e.assignIn=Zo,e.extend=Zo,e.assignInWith=$o,e.extendWith=$o,e.assignWith=ts,e.asyncNoop=Re,e.at=Ti,e.attempt=qa,e.attemptAsync=Qn,e.before=Ja,e.bind=Ya,e.bindAll=Cc,e.bindKey=Xa,e.camelCase=Fc,e.capitalize=Sc,e.cartesianProduct=t,e.castArray=tr,e.ceil=Eo,e.chunk=nr,e.chunkBy=r,e.clamp=Fi,e.clone=rs,e.cloneDeep=yr,e.cloneDeepWith=vr,e.cloneWith=ls,e.combinations=i,e.compact=rr,e.concat=ir,e.cond=yl,e.conforms=cc,e.conformsTo=sc,e.constant=bl,e.constantCase=Yt,e.countBy=wr,e.create=us,e.curry=Za,e.curryRight=to,e.debounce=ao,e.deburr=Q,e.dedent=Rn,e.deepFreeze=Nt,e.defaultTo=xl,e.defaults=ds,e.defaultsDeep=fs,e.defer=oo,e.deferAsync=$n,e.delay=so,e.difference=Er,e.differenceBy=Or,e.differenceWith=kr,e.divide=Do,e.drop=Ar,e.dropRight=jr,e.dropRightWhile=Mr,e.dropWhile=Pr,e.each=Ir,e.forEach=Ir,e.eachRight=Lr,e.forEachRight=Lr,e.endsWith=Ic,e.eq=O,e.escape=Lc,e.escapeRegExp=Rc,e.every=Wl,e.fill=zr,e.filter=Br,e.filterAsync=ee,e.find=Vr,e.findIndex=Hr,e.findKey=xs,e.findLast=Ur,e.findLastIndex=Wr,e.findLastKey=Ss,e.first=Gr,e.head=Gr,e.flatMap=Xr,e.flatMapAsync=ne,e.flatMapDeep=Zr,e.flatMapDepth=Yr,e.flatten=Qr,e.flattenDeep=$r,e.flattenDepth=Kr,e.flattenObject=Ft,e.flip=co,e.floor=Oo,e.flow=lo,e.flowRight=uo,e.forEachAsync=re,e.forIn=Cs,e.forInRight=ws,e.forOwn=Ts,e.forOwnRight=Es,e.fromPairs=Ds,e.functions=Os,e.functionsIn=ks,e.get=I,e.groupBy=ei,e.gt=Sl,e.gte=Cl,e.has=Sr,e.hasIn=As,e.identity=J,e.inRange=ko,e.includes=ti,e.indexOf=ni,e.initial=ri,e.intersection=ii,e.intersectionBy=ai,e.intersectionWith=oi,e.invert=js,e.invertBy=Ms,e.invoke=wl,e.invokeMap=si,e.isArguments=R,e.isArray=E,e.isArrayBuffer=lc,e.isArrayLike=M,e.isArrayLikeObject=V,e.isBlob=on,e.isBoolean=uc,e.isBrowser=sn,e.isBuffer=Xs,e.isDate=dc,e.isElement=fc,e.isEmpty=pc,e.isEmptyObject=ln,e.isEqual=pn,e.isEqualWith=mc,e.isError=hc,e.isFile=mn,e.isFinite=gc,e.isFunction=ec,e.isInteger=_c,e.isIterable=hn,e.isJSON=gn,e.isJSONArray=vn,e.isJSONObject=yn,e.isJSONValue=_n,e.isLength=tc,e.isMap=Ii,e.isMatch=gr,e.isMatchWith=ur,e.isNaN=pa,e.isNative=ic,e.isNil=Wi,e.isNode=Sn,e.isNotNil=Cn,e.isNull=ac,e.isNumber=fa,e.isObject=L,e.isObjectLike=B,e.isPlainObject=D,e.isPrimitive=it,e.isPromise=Tn,e.isRegExp=vc,e.isSafeInteger=yc,e.isSet=Li,e.isString=Rr,e.isSubset=ue,e.isSubsetWith=de,e.isSymbol=U,e.isTypedArray=Y,e.isUndefined=oc,e.isWeakMap=bc,e.isWeakSet=xc,e.iteratee=z,e.join=ci,e.kebabCase=zc,e.keyBy=ui,e.keys=X,e.keysIn=Z,e.last=H,e.lastIndexOf=di,e.limitAsync=h,e.lowerCase=Bc,e.lowerFirst=Vc,e.lt=El,e.lte=Dl,e.map=Jr,e.mapAsync=pe,e.mapKeys=Ns,e.mapKeysAsync=zt,e.mapValues=Ps,e.mapValuesAsync=Vt,e.matches=_r,e.matchesProperty=Cr,e.max=Ao,e.maxBy=jo,e.mean=Po,e.meanBy=Fo,e.median=tt,e.medianBy=nt,e.memoize=fo,e.merge=Ls,e.mergeWith=Fs,e.method=Ol,e.methodOf=kl,e.min=Io,e.minBy=Lo,e.multiply=Ro,e.negate=Ai,e.noop=Go,e.now=Al,e.nth=fi,e.nthArg=po,e.omit=zs,e.omitBy=Us,e.once=mo,e.orderBy=vi,e.over=jl,e.overArgs=ho,e.overEvery=Ml,e.overSome=Nl,e.pad=Wc,e.padEnd=Gc,e.padStart=Kc,e.parseInt=zo,e.partial=go,e.partialRight=_o,e.partition=yi,e.pascalCase=en,e.percentile=rt,e.pick=Ws,e.pickBy=Gs,e.property=lr,e.propertyOf=Ks,e.pull=bi,e.pullAll=xi,e.pullAllBy=Si,e.pullAllWith=wi,e.pullAt=Oi,e.random=Bo,e.randomInt=ye,e.range=Vo,e.rangeRight=Ho,e.rearg=vo,e.reduce=li,e.reduceAsync=he,e.reduceRight=ki,e.reject=ji,e.remove=Mi,e.repeat=Jc,e.replace=Yc,e.rest=yo,e.result=qs,e.retry=et,e.reverse=Ni,e.reverseString=Gn,e.round=Uo,e.sample=Pi,e.sampleSize=zi,e.set=Ha,e.setWith=Js,e.shuffle=Gi,e.size=ca,e.slice=la,e.snakeCase=Xc,e.some=ua,e.sortBy=da,e.sortKeys=Ut,e.sortedIndex=ha,e.sortedIndexBy=ma,e.sortedIndexOf=ga,e.sortedLastIndex=va,e.sortedLastIndexBy=_a,e.sortedLastIndexOf=ya,e.split=Zc,e.spread=bo,e.startCase=Qc,e.startsWith=$c,e.stubArray=Pl,e.stubFalse=Fl,e.stubObject=Il,e.stubString=Ll,e.stubTrue=Rl,e.subtract=Wo,e.sum=No,e.sumBy=Mo,e.tail=ba,e.take=xa,e.takeRight=Sa,e.takeRightWhile=Ca,e.takeWhile=wa,e.template=sl,e.templateSettings=cl,e.throttle=xo,e.timeout=Pn,e.times=Vi,e.toArray=Ri,e.toCamelCaseKeys=Jt,e.toConstantCaseKeys=Xt,e.toDefaulted=Ys,e.toFilled=Te,e.toFinite=G,e.toInteger=K,e.toKebabCaseKeys=Qt,e.toLength=zl,e.toLower=ll,e.toMerged=$t,e.toNumber=W,e.toPairs=ys,e.toPairsIn=bs,e.toPascalCaseKeys=tn,e.toPath=F,e.toPlainObject=Bl,e.toSafeInteger=Vl,e.toSnakeCaseKeys=rn,e.toString=P,e.toUpper=ul,e.transform=Zs,e.trim=dl,e.trimEnd=fl,e.trimStart=pl,e.truncate=ml,e.unary=So,e.unescape=gl,e.union=Ta,e.unionBy=Ea,e.unionWith=Da,e.uniq=Oa,e.uniqBy=ka,e.uniqWith=Aa,e.uniqueId=Ul,e.unset=Ei,e.unzip=ja,e.unzipWith=Ma,e.update=Qs,e.updateWith=Va,e.upperCase=_l,e.upperFirst=vl,e.values=Ui,e.valuesIn=$s,e.windowed=ke,e.withTimeout=Fn,e.without=Na,e.words=$,e.wrap=Co,e.xor=Pa,e.xorBy=Fa,e.xorWith=Ia,e.zip=La,e.zipObject=za,e.zipObjectDeep=Ua,e.zipWith=Wa});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/fp/iterator/cartesianProduct.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a function that lazily takes the Cartesian product of the piped
|
|
4
|
+
* iterator and `other`, for use with {@link pipe}. Every element of the piped
|
|
5
|
+
* iterator is paired with every element of `other`, with `other` advancing
|
|
6
|
+
* fastest. `other` is buffered into an array when iteration starts, while the
|
|
7
|
+
* piped iterator is consumed lazily, so it may be infinite.
|
|
8
|
+
*
|
|
9
|
+
* @template T - The type of elements produced by the piped iterator.
|
|
10
|
+
* @template U - The type of elements produced by `other`.
|
|
11
|
+
* @param other - The iterator to take the product with.
|
|
12
|
+
* @returns A function mapping an `Iterator<T>` to a lazy `IteratorObject<[T, U]>`.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* import { pipe } from 'es-toolkit/fp';
|
|
16
|
+
* import { cartesianProduct, toArray } from 'es-toolkit/fp/iterator';
|
|
17
|
+
*
|
|
18
|
+
* pipe([1, 2].values(), cartesianProduct(['a', 'b'].values()), toArray());
|
|
19
|
+
* // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]
|
|
20
|
+
*/
|
|
21
|
+
declare function cartesianProduct<T, U>(other: Iterator<U>): (source: Iterator<T>) => IteratorObject<[T, U], undefined>;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { cartesianProduct };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
//#region src/fp/iterator/cartesianProduct.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a function that lazily takes the Cartesian product of the piped
|
|
4
|
+
* iterator and `other`, for use with {@link pipe}. Every element of the piped
|
|
5
|
+
* iterator is paired with every element of `other`, with `other` advancing
|
|
6
|
+
* fastest. `other` is buffered into an array when iteration starts, while the
|
|
7
|
+
* piped iterator is consumed lazily, so it may be infinite.
|
|
8
|
+
*
|
|
9
|
+
* @template T - The type of elements produced by the piped iterator.
|
|
10
|
+
* @template U - The type of elements produced by `other`.
|
|
11
|
+
* @param other - The iterator to take the product with.
|
|
12
|
+
* @returns A function mapping an `Iterator<T>` to a lazy `IteratorObject<[T, U]>`.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* import { pipe } from 'es-toolkit/fp';
|
|
16
|
+
* import { cartesianProduct, toArray } from 'es-toolkit/fp/iterator';
|
|
17
|
+
*
|
|
18
|
+
* pipe([1, 2].values(), cartesianProduct(['a', 'b'].values()), toArray());
|
|
19
|
+
* // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]
|
|
20
|
+
*/
|
|
21
|
+
declare function cartesianProduct<T, U>(other: Iterator<U>): (source: Iterator<T>) => IteratorObject<[T, U], undefined>;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { cartesianProduct };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const require_cartesianProduct = require("../../iterator/cartesianProduct.js");
|
|
2
|
+
//#region src/fp/iterator/cartesianProduct.ts
|
|
3
|
+
/**
|
|
4
|
+
* Creates a function that lazily takes the Cartesian product of the piped
|
|
5
|
+
* iterator and `other`, for use with {@link pipe}. Every element of the piped
|
|
6
|
+
* iterator is paired with every element of `other`, with `other` advancing
|
|
7
|
+
* fastest. `other` is buffered into an array when iteration starts, while the
|
|
8
|
+
* piped iterator is consumed lazily, so it may be infinite.
|
|
9
|
+
*
|
|
10
|
+
* @template T - The type of elements produced by the piped iterator.
|
|
11
|
+
* @template U - The type of elements produced by `other`.
|
|
12
|
+
* @param other - The iterator to take the product with.
|
|
13
|
+
* @returns A function mapping an `Iterator<T>` to a lazy `IteratorObject<[T, U]>`.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* import { pipe } from 'es-toolkit/fp';
|
|
17
|
+
* import { cartesianProduct, toArray } from 'es-toolkit/fp/iterator';
|
|
18
|
+
*
|
|
19
|
+
* pipe([1, 2].values(), cartesianProduct(['a', 'b'].values()), toArray());
|
|
20
|
+
* // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]
|
|
21
|
+
*/
|
|
22
|
+
function cartesianProduct(other) {
|
|
23
|
+
return function cartesianProductInIterator(source) {
|
|
24
|
+
return require_cartesianProduct.cartesianProduct(source, other);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
exports.cartesianProduct = cartesianProduct;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { cartesianProduct as cartesianProduct$1 } from "../../iterator/cartesianProduct.mjs";
|
|
2
|
+
//#region src/fp/iterator/cartesianProduct.ts
|
|
3
|
+
/**
|
|
4
|
+
* Creates a function that lazily takes the Cartesian product of the piped
|
|
5
|
+
* iterator and `other`, for use with {@link pipe}. Every element of the piped
|
|
6
|
+
* iterator is paired with every element of `other`, with `other` advancing
|
|
7
|
+
* fastest. `other` is buffered into an array when iteration starts, while the
|
|
8
|
+
* piped iterator is consumed lazily, so it may be infinite.
|
|
9
|
+
*
|
|
10
|
+
* @template T - The type of elements produced by the piped iterator.
|
|
11
|
+
* @template U - The type of elements produced by `other`.
|
|
12
|
+
* @param other - The iterator to take the product with.
|
|
13
|
+
* @returns A function mapping an `Iterator<T>` to a lazy `IteratorObject<[T, U]>`.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* import { pipe } from 'es-toolkit/fp';
|
|
17
|
+
* import { cartesianProduct, toArray } from 'es-toolkit/fp/iterator';
|
|
18
|
+
*
|
|
19
|
+
* pipe([1, 2].values(), cartesianProduct(['a', 'b'].values()), toArray());
|
|
20
|
+
* // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]
|
|
21
|
+
*/
|
|
22
|
+
function cartesianProduct(other) {
|
|
23
|
+
return function cartesianProductInIterator(source) {
|
|
24
|
+
return cartesianProduct$1(source, other);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { cartesianProduct };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cartesianProduct } from "./cartesianProduct.mjs";
|
|
1
2
|
import { chunk } from "./chunk.mjs";
|
|
2
3
|
import { count } from "./count.mjs";
|
|
3
4
|
import { drop } from "./drop.mjs";
|
|
@@ -18,4 +19,4 @@ import { takeWhile } from "./takeWhile.mjs";
|
|
|
18
19
|
import { toArray } from "./toArray.mjs";
|
|
19
20
|
import { uniqBy } from "./uniqBy.mjs";
|
|
20
21
|
import { zip } from "./zip.mjs";
|
|
21
|
-
export { chunk, count, drop, dropWhile, every, filter, find, flatMap, forEach, head, map, partition, reduce, scan, some, take, takeWhile, toArray, uniqBy, zip };
|
|
22
|
+
export { cartesianProduct, chunk, count, drop, dropWhile, every, filter, find, flatMap, forEach, head, map, partition, reduce, scan, some, take, takeWhile, toArray, uniqBy, zip };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cartesianProduct } from "./cartesianProduct.js";
|
|
1
2
|
import { chunk } from "./chunk.js";
|
|
2
3
|
import { count } from "./count.js";
|
|
3
4
|
import { drop } from "./drop.js";
|
|
@@ -18,4 +19,4 @@ import { takeWhile } from "./takeWhile.js";
|
|
|
18
19
|
import { toArray } from "./toArray.js";
|
|
19
20
|
import { uniqBy } from "./uniqBy.js";
|
|
20
21
|
import { zip } from "./zip.js";
|
|
21
|
-
export { chunk, count, drop, dropWhile, every, filter, find, flatMap, forEach, head, map, partition, reduce, scan, some, take, takeWhile, toArray, uniqBy, zip };
|
|
22
|
+
export { cartesianProduct, chunk, count, drop, dropWhile, every, filter, find, flatMap, forEach, head, map, partition, reduce, scan, some, take, takeWhile, toArray, uniqBy, zip };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_cartesianProduct = require("./cartesianProduct.js");
|
|
2
3
|
const require_chunk = require("./chunk.js");
|
|
3
4
|
const require_count = require("./count.js");
|
|
4
5
|
const require_drop = require("./drop.js");
|
|
@@ -19,6 +20,7 @@ const require_takeWhile = require("./takeWhile.js");
|
|
|
19
20
|
const require_toArray = require("./toArray.js");
|
|
20
21
|
const require_uniqBy = require("./uniqBy.js");
|
|
21
22
|
const require_zip = require("./zip.js");
|
|
23
|
+
exports.cartesianProduct = require_cartesianProduct.cartesianProduct;
|
|
22
24
|
exports.chunk = require_chunk.chunk;
|
|
23
25
|
exports.count = require_count.count;
|
|
24
26
|
exports.drop = require_drop.drop;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cartesianProduct } from "./cartesianProduct.mjs";
|
|
1
2
|
import { chunk } from "./chunk.mjs";
|
|
2
3
|
import { count } from "./count.mjs";
|
|
3
4
|
import { drop } from "./drop.mjs";
|
|
@@ -18,4 +19,4 @@ import { takeWhile } from "./takeWhile.mjs";
|
|
|
18
19
|
import { toArray } from "./toArray.mjs";
|
|
19
20
|
import { uniqBy } from "./uniqBy.mjs";
|
|
20
21
|
import { zip } from "./zip.mjs";
|
|
21
|
-
export { chunk, count, drop, dropWhile, every, filter, find, flatMap, forEach, head, map, partition, reduce, scan, some, take, takeWhile, toArray, uniqBy, zip };
|
|
22
|
+
export { cartesianProduct, chunk, count, drop, dropWhile, every, filter, find, flatMap, forEach, head, map, partition, reduce, scan, some, take, takeWhile, toArray, uniqBy, zip };
|
package/dist/index.d.mts
CHANGED
|
@@ -191,5 +191,7 @@ import { upperFirst } from "./string/upperFirst.mjs";
|
|
|
191
191
|
import { words } from "./string/words.mjs";
|
|
192
192
|
import { attempt } from "./util/attempt.mjs";
|
|
193
193
|
import { attemptAsync } from "./util/attemptAsync.mjs";
|
|
194
|
+
import { defer } from "./util/defer.mjs";
|
|
195
|
+
import { deferAsync } from "./util/deferAsync.mjs";
|
|
194
196
|
import { invariant } from "./util/invariant.mjs";
|
|
195
|
-
export { AbortError, DebounceOptions, DebouncedFunction, MemoizeCache, Mutex, Semaphore, ThrottleOptions, ThrottledFunction, TimeoutError, after, allKeyed, ary, invariant as assert, asyncNoop, at, attempt, attemptAsync, before, camelCase, capitalize, cartesianProduct, chunk, chunkBy, clamp, clone, cloneDeep, cloneDeepWith, combinations, compact, constantCase, countBy, curry, curryRight, debounce, deburr, dedent, deepFreeze, delay, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, escape, escapeRegExp, fill, filterAsync, findKey, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, flattenObject, flow, flowRight, forEachAsync, forEachRight, groupBy, head, identity, inRange, initial, intersection, intersectionBy, intersectionWith, invariant, invert, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmptyObject, isEqual, isEqualWith, isError, isFile, isFunction, isIterable, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNil, isNode, isNotNil, isNull, isNumber, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSubset, isSubsetWith, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, kebabCase, keyBy, last, limitAsync, lowerCase, lowerFirst, mapAsync, mapKeys, mapKeysAsync, mapValues, mapValuesAsync, maxBy, mean, meanBy, median, medianBy, memoize, merge, mergeWith, minBy, negate, noop, omit, omitBy, once, orderBy, pad, partial, partialRight, partition, pascalCase, percentile, pick, pickBy, pull, pullAt, random, randomInt, range, rangeRight, reduceAsync, remove, rest, retry, reverseString, round, sample, sampleSize, shuffle, snakeCase, sortBy, sortKeys, spread, startCase, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, throttle, timeout, toCamelCaseKeys, toConstantCaseKeys, toFilled, toKebabCaseKeys, toMerged, toPascalCaseKeys, toSnakeCaseKeys, trim, trimEnd, trimStart, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, upperCase, upperFirst, windowed, withTimeout, without, words, xor, xorBy, xorWith, zip, zipObject, zipWith };
|
|
197
|
+
export { AbortError, DebounceOptions, DebouncedFunction, MemoizeCache, Mutex, Semaphore, ThrottleOptions, ThrottledFunction, TimeoutError, after, allKeyed, ary, invariant as assert, asyncNoop, at, attempt, attemptAsync, before, camelCase, capitalize, cartesianProduct, chunk, chunkBy, clamp, clone, cloneDeep, cloneDeepWith, combinations, compact, constantCase, countBy, curry, curryRight, debounce, deburr, dedent, deepFreeze, defer, deferAsync, delay, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, escape, escapeRegExp, fill, filterAsync, findKey, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, flattenObject, flow, flowRight, forEachAsync, forEachRight, groupBy, head, identity, inRange, initial, intersection, intersectionBy, intersectionWith, invariant, invert, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmptyObject, isEqual, isEqualWith, isError, isFile, isFunction, isIterable, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNil, isNode, isNotNil, isNull, isNumber, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSubset, isSubsetWith, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, kebabCase, keyBy, last, limitAsync, lowerCase, lowerFirst, mapAsync, mapKeys, mapKeysAsync, mapValues, mapValuesAsync, maxBy, mean, meanBy, median, medianBy, memoize, merge, mergeWith, minBy, negate, noop, omit, omitBy, once, orderBy, pad, partial, partialRight, partition, pascalCase, percentile, pick, pickBy, pull, pullAt, random, randomInt, range, rangeRight, reduceAsync, remove, rest, retry, reverseString, round, sample, sampleSize, shuffle, snakeCase, sortBy, sortKeys, spread, startCase, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, throttle, timeout, toCamelCaseKeys, toConstantCaseKeys, toFilled, toKebabCaseKeys, toMerged, toPascalCaseKeys, toSnakeCaseKeys, trim, trimEnd, trimStart, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, upperCase, upperFirst, windowed, withTimeout, without, words, xor, xorBy, xorWith, zip, zipObject, zipWith };
|
package/dist/index.d.ts
CHANGED
|
@@ -191,5 +191,7 @@ import { upperFirst } from "./string/upperFirst.js";
|
|
|
191
191
|
import { words } from "./string/words.js";
|
|
192
192
|
import { attempt } from "./util/attempt.js";
|
|
193
193
|
import { attemptAsync } from "./util/attemptAsync.js";
|
|
194
|
+
import { defer } from "./util/defer.js";
|
|
195
|
+
import { deferAsync } from "./util/deferAsync.js";
|
|
194
196
|
import { invariant } from "./util/invariant.js";
|
|
195
|
-
export { AbortError, DebounceOptions, DebouncedFunction, MemoizeCache, Mutex, Semaphore, ThrottleOptions, ThrottledFunction, TimeoutError, after, allKeyed, ary, invariant as assert, asyncNoop, at, attempt, attemptAsync, before, camelCase, capitalize, cartesianProduct, chunk, chunkBy, clamp, clone, cloneDeep, cloneDeepWith, combinations, compact, constantCase, countBy, curry, curryRight, debounce, deburr, dedent, deepFreeze, delay, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, escape, escapeRegExp, fill, filterAsync, findKey, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, flattenObject, flow, flowRight, forEachAsync, forEachRight, groupBy, head, identity, inRange, initial, intersection, intersectionBy, intersectionWith, invariant, invert, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmptyObject, isEqual, isEqualWith, isError, isFile, isFunction, isIterable, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNil, isNode, isNotNil, isNull, isNumber, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSubset, isSubsetWith, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, kebabCase, keyBy, last, limitAsync, lowerCase, lowerFirst, mapAsync, mapKeys, mapKeysAsync, mapValues, mapValuesAsync, maxBy, mean, meanBy, median, medianBy, memoize, merge, mergeWith, minBy, negate, noop, omit, omitBy, once, orderBy, pad, partial, partialRight, partition, pascalCase, percentile, pick, pickBy, pull, pullAt, random, randomInt, range, rangeRight, reduceAsync, remove, rest, retry, reverseString, round, sample, sampleSize, shuffle, snakeCase, sortBy, sortKeys, spread, startCase, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, throttle, timeout, toCamelCaseKeys, toConstantCaseKeys, toFilled, toKebabCaseKeys, toMerged, toPascalCaseKeys, toSnakeCaseKeys, trim, trimEnd, trimStart, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, upperCase, upperFirst, windowed, withTimeout, without, words, xor, xorBy, xorWith, zip, zipObject, zipWith };
|
|
197
|
+
export { AbortError, DebounceOptions, DebouncedFunction, MemoizeCache, Mutex, Semaphore, ThrottleOptions, ThrottledFunction, TimeoutError, after, allKeyed, ary, invariant as assert, asyncNoop, at, attempt, attemptAsync, before, camelCase, capitalize, cartesianProduct, chunk, chunkBy, clamp, clone, cloneDeep, cloneDeepWith, combinations, compact, constantCase, countBy, curry, curryRight, debounce, deburr, dedent, deepFreeze, defer, deferAsync, delay, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, escape, escapeRegExp, fill, filterAsync, findKey, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, flattenObject, flow, flowRight, forEachAsync, forEachRight, groupBy, head, identity, inRange, initial, intersection, intersectionBy, intersectionWith, invariant, invert, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmptyObject, isEqual, isEqualWith, isError, isFile, isFunction, isIterable, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNil, isNode, isNotNil, isNull, isNumber, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSubset, isSubsetWith, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, kebabCase, keyBy, last, limitAsync, lowerCase, lowerFirst, mapAsync, mapKeys, mapKeysAsync, mapValues, mapValuesAsync, maxBy, mean, meanBy, median, medianBy, memoize, merge, mergeWith, minBy, negate, noop, omit, omitBy, once, orderBy, pad, partial, partialRight, partition, pascalCase, percentile, pick, pickBy, pull, pullAt, random, randomInt, range, rangeRight, reduceAsync, remove, rest, retry, reverseString, round, sample, sampleSize, shuffle, snakeCase, sortBy, sortKeys, spread, startCase, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, throttle, timeout, toCamelCaseKeys, toConstantCaseKeys, toFilled, toKebabCaseKeys, toMerged, toPascalCaseKeys, toSnakeCaseKeys, trim, trimEnd, trimStart, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, upperCase, upperFirst, windowed, withTimeout, without, words, xor, xorBy, xorWith, zip, zipObject, zipWith };
|
package/dist/index.js
CHANGED
|
@@ -200,6 +200,8 @@ const require_upperFirst = require("./string/upperFirst.js");
|
|
|
200
200
|
require("./string/index.js");
|
|
201
201
|
const require_attempt = require("./util/attempt.js");
|
|
202
202
|
const require_attemptAsync = require("./util/attemptAsync.js");
|
|
203
|
+
const require_defer = require("./util/defer.js");
|
|
204
|
+
const require_deferAsync = require("./util/deferAsync.js");
|
|
203
205
|
const require_invariant = require("./util/invariant.js");
|
|
204
206
|
require("./util/index.js");
|
|
205
207
|
exports.AbortError = require_AbortError.AbortError;
|
|
@@ -234,6 +236,8 @@ exports.debounce = require_debounce.debounce;
|
|
|
234
236
|
exports.deburr = require_deburr.deburr;
|
|
235
237
|
exports.dedent = require_dedent.dedent;
|
|
236
238
|
exports.deepFreeze = require_deepFreeze.deepFreeze;
|
|
239
|
+
exports.defer = require_defer.defer;
|
|
240
|
+
exports.deferAsync = require_deferAsync.deferAsync;
|
|
237
241
|
exports.delay = require_delay.delay;
|
|
238
242
|
exports.difference = require_difference.difference;
|
|
239
243
|
exports.differenceBy = require_differenceBy.differenceBy;
|
package/dist/index.mjs
CHANGED
|
@@ -199,6 +199,8 @@ import { upperFirst } from "./string/upperFirst.mjs";
|
|
|
199
199
|
import "./string/index.mjs";
|
|
200
200
|
import { attempt } from "./util/attempt.mjs";
|
|
201
201
|
import { attemptAsync } from "./util/attemptAsync.mjs";
|
|
202
|
+
import { defer } from "./util/defer.mjs";
|
|
203
|
+
import { deferAsync } from "./util/deferAsync.mjs";
|
|
202
204
|
import { invariant } from "./util/invariant.mjs";
|
|
203
205
|
import "./util/index.mjs";
|
|
204
|
-
export { AbortError, Mutex, Semaphore, TimeoutError, after, allKeyed, ary, invariant as assert, asyncNoop, at, attempt, attemptAsync, before, camelCase, capitalize, cartesianProduct, chunk, chunkBy, clamp, clone, cloneDeep, cloneDeepWith, combinations, compact, constantCase, countBy, curry, curryRight, debounce, deburr, dedent, deepFreeze, delay, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, escape, escapeRegExp, fill, filterAsync, findKey, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, flattenObject, flow, flowRight, forEachAsync, forEachRight, groupBy, head, identity, inRange, initial, intersection, intersectionBy, intersectionWith, invariant, invert, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmptyObject, isEqual, isEqualWith, isError, isFile, isFunction, isIterable, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNil, isNode, isNotNil, isNull, isNumber, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSubset, isSubsetWith, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, kebabCase, keyBy, last, limitAsync, lowerCase, lowerFirst, mapAsync, mapKeys, mapKeysAsync, mapValues, mapValuesAsync, maxBy, mean, meanBy, median, medianBy, memoize, merge, mergeWith, minBy, negate, noop, omit, omitBy, once, orderBy, pad, partial, partialRight, partition, pascalCase, percentile, pick, pickBy, pull, pullAt, random, randomInt, range, rangeRight, reduceAsync, remove, rest, retry, reverseString, round, sample, sampleSize, shuffle, snakeCase, sortBy, sortKeys, spread, startCase, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, throttle, timeout, toCamelCaseKeys, toConstantCaseKeys, toFilled, toKebabCaseKeys, toMerged, toPascalCaseKeys, toSnakeCaseKeys, trim, trimEnd, trimStart, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, upperCase, upperFirst, windowed, withTimeout, without, words, xor, xorBy, xorWith, zip, zipObject, zipWith };
|
|
206
|
+
export { AbortError, Mutex, Semaphore, TimeoutError, after, allKeyed, ary, invariant as assert, asyncNoop, at, attempt, attemptAsync, before, camelCase, capitalize, cartesianProduct, chunk, chunkBy, clamp, clone, cloneDeep, cloneDeepWith, combinations, compact, constantCase, countBy, curry, curryRight, debounce, deburr, dedent, deepFreeze, defer, deferAsync, delay, difference, differenceBy, differenceWith, drop, dropRight, dropRightWhile, dropWhile, escape, escapeRegExp, fill, filterAsync, findKey, flatMap, flatMapAsync, flatMapDeep, flatten, flattenDeep, flattenObject, flow, flowRight, forEachAsync, forEachRight, groupBy, head, identity, inRange, initial, intersection, intersectionBy, intersectionWith, invariant, invert, isArrayBuffer, isBlob, isBoolean, isBrowser, isBuffer, isDate, isEmptyObject, isEqual, isEqualWith, isError, isFile, isFunction, isIterable, isJSON, isJSONArray, isJSONObject, isJSONValue, isLength, isMap, isNil, isNode, isNotNil, isNull, isNumber, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSubset, isSubsetWith, isSymbol, isTypedArray, isUndefined, isWeakMap, isWeakSet, kebabCase, keyBy, last, limitAsync, lowerCase, lowerFirst, mapAsync, mapKeys, mapKeysAsync, mapValues, mapValuesAsync, maxBy, mean, meanBy, median, medianBy, memoize, merge, mergeWith, minBy, negate, noop, omit, omitBy, once, orderBy, pad, partial, partialRight, partition, pascalCase, percentile, pick, pickBy, pull, pullAt, random, randomInt, range, rangeRight, reduceAsync, remove, rest, retry, reverseString, round, sample, sampleSize, shuffle, snakeCase, sortBy, sortKeys, spread, startCase, sum, sumBy, tail, take, takeRight, takeRightWhile, takeWhile, throttle, timeout, toCamelCaseKeys, toConstantCaseKeys, toFilled, toKebabCaseKeys, toMerged, toPascalCaseKeys, toSnakeCaseKeys, trim, trimEnd, trimStart, unary, unescape, union, unionBy, unionWith, uniq, uniqBy, uniqWith, unzip, unzipWith, upperCase, upperFirst, windowed, withTimeout, without, words, xor, xorBy, xorWith, zip, zipObject, zipWith };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/iterator/cartesianProduct.d.ts
|
|
2
|
+
type IteratorValue<T> = T extends Iterator<infer V> ? V : never;
|
|
3
|
+
/**
|
|
4
|
+
* Lazily computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product)
|
|
5
|
+
* of the source iterators, yielding every possible tuple formed by picking one
|
|
6
|
+
* element from each source, in lexicographic order — the rightmost source
|
|
7
|
+
* advances fastest, like the digits of an odometer.
|
|
8
|
+
*
|
|
9
|
+
* Because every source except the first is traversed many times, those sources
|
|
10
|
+
* are buffered into arrays when iteration starts. The first source is consumed
|
|
11
|
+
* lazily, one element at a time, so it may be infinite. When iteration ends —
|
|
12
|
+
* because the first source ran out, a buffered source was empty, or the
|
|
13
|
+
* consumer terminated early — every source is closed via its `return` method.
|
|
14
|
+
*
|
|
15
|
+
* If no sources are passed, a single empty tuple is yielded, matching the
|
|
16
|
+
* array `cartesianProduct`. If any source is empty, nothing is yielded.
|
|
17
|
+
*
|
|
18
|
+
* @template T - A tuple of the source iterator types.
|
|
19
|
+
* @param sources - The iterators to take the product of.
|
|
20
|
+
* @returns A lazy iterator over tuples representing the Cartesian product.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* cartesianProduct([1, 2].values(), ['a', 'b'].values()).toArray();
|
|
24
|
+
* // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // The first source may be infinite; elements are produced on demand.
|
|
28
|
+
* cartesianProduct(range(0, Infinity), ['a', 'b'].values()).take(3).toArray();
|
|
29
|
+
* // => [[0, 'a'], [0, 'b'], [1, 'a']]
|
|
30
|
+
*/
|
|
31
|
+
declare function cartesianProduct<T extends Array<Iterator<unknown>>>(...sources: T): IteratorObject<{ [K in keyof T]: IteratorValue<T[K]> }, undefined>;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { cartesianProduct };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/iterator/cartesianProduct.d.ts
|
|
2
|
+
type IteratorValue<T> = T extends Iterator<infer V> ? V : never;
|
|
3
|
+
/**
|
|
4
|
+
* Lazily computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product)
|
|
5
|
+
* of the source iterators, yielding every possible tuple formed by picking one
|
|
6
|
+
* element from each source, in lexicographic order — the rightmost source
|
|
7
|
+
* advances fastest, like the digits of an odometer.
|
|
8
|
+
*
|
|
9
|
+
* Because every source except the first is traversed many times, those sources
|
|
10
|
+
* are buffered into arrays when iteration starts. The first source is consumed
|
|
11
|
+
* lazily, one element at a time, so it may be infinite. When iteration ends —
|
|
12
|
+
* because the first source ran out, a buffered source was empty, or the
|
|
13
|
+
* consumer terminated early — every source is closed via its `return` method.
|
|
14
|
+
*
|
|
15
|
+
* If no sources are passed, a single empty tuple is yielded, matching the
|
|
16
|
+
* array `cartesianProduct`. If any source is empty, nothing is yielded.
|
|
17
|
+
*
|
|
18
|
+
* @template T - A tuple of the source iterator types.
|
|
19
|
+
* @param sources - The iterators to take the product of.
|
|
20
|
+
* @returns A lazy iterator over tuples representing the Cartesian product.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* cartesianProduct([1, 2].values(), ['a', 'b'].values()).toArray();
|
|
24
|
+
* // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // The first source may be infinite; elements are produced on demand.
|
|
28
|
+
* cartesianProduct(range(0, Infinity), ['a', 'b'].values()).take(3).toArray();
|
|
29
|
+
* // => [[0, 'a'], [0, 'b'], [1, 'a']]
|
|
30
|
+
*/
|
|
31
|
+
declare function cartesianProduct<T extends Array<Iterator<unknown>>>(...sources: T): IteratorObject<{ [K in keyof T]: IteratorValue<T[K]> }, undefined>;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { cartesianProduct };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
const require_iterator = require("./_internal/iterator.js");
|
|
2
|
+
//#region src/iterator/cartesianProduct.ts
|
|
3
|
+
/**
|
|
4
|
+
* Lazily computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product)
|
|
5
|
+
* of the source iterators, yielding every possible tuple formed by picking one
|
|
6
|
+
* element from each source, in lexicographic order — the rightmost source
|
|
7
|
+
* advances fastest, like the digits of an odometer.
|
|
8
|
+
*
|
|
9
|
+
* Because every source except the first is traversed many times, those sources
|
|
10
|
+
* are buffered into arrays when iteration starts. The first source is consumed
|
|
11
|
+
* lazily, one element at a time, so it may be infinite. When iteration ends —
|
|
12
|
+
* because the first source ran out, a buffered source was empty, or the
|
|
13
|
+
* consumer terminated early — every source is closed via its `return` method.
|
|
14
|
+
*
|
|
15
|
+
* If no sources are passed, a single empty tuple is yielded, matching the
|
|
16
|
+
* array `cartesianProduct`. If any source is empty, nothing is yielded.
|
|
17
|
+
*
|
|
18
|
+
* @template T - A tuple of the source iterator types.
|
|
19
|
+
* @param sources - The iterators to take the product of.
|
|
20
|
+
* @returns A lazy iterator over tuples representing the Cartesian product.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* cartesianProduct([1, 2].values(), ['a', 'b'].values()).toArray();
|
|
24
|
+
* // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // The first source may be infinite; elements are produced on demand.
|
|
28
|
+
* cartesianProduct(range(0, Infinity), ['a', 'b'].values()).take(3).toArray();
|
|
29
|
+
* // => [[0, 'a'], [0, 'b'], [1, 'a']]
|
|
30
|
+
*/
|
|
31
|
+
function cartesianProduct(...sources) {
|
|
32
|
+
const pools = [];
|
|
33
|
+
const indices = [];
|
|
34
|
+
let firstValue;
|
|
35
|
+
let state = "initial";
|
|
36
|
+
return require_iterator.iterator(function() {
|
|
37
|
+
if (state === "done") return {
|
|
38
|
+
value: void 0,
|
|
39
|
+
done: true
|
|
40
|
+
};
|
|
41
|
+
if (state === "initial") {
|
|
42
|
+
state = "active";
|
|
43
|
+
if (sources.length === 0) {
|
|
44
|
+
state = "done";
|
|
45
|
+
return {
|
|
46
|
+
value: [],
|
|
47
|
+
done: false
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
for (let index = 1; index < sources.length; index++) {
|
|
51
|
+
const pool = [];
|
|
52
|
+
let step = sources[index].next();
|
|
53
|
+
while (!step.done) {
|
|
54
|
+
pool.push(step.value);
|
|
55
|
+
step = sources[index].next();
|
|
56
|
+
}
|
|
57
|
+
pools.push(pool);
|
|
58
|
+
}
|
|
59
|
+
if (pools.some((pool) => pool.length === 0)) return {
|
|
60
|
+
value: void 0,
|
|
61
|
+
done: true
|
|
62
|
+
};
|
|
63
|
+
const step = sources[0].next();
|
|
64
|
+
if (step.done) return {
|
|
65
|
+
value: void 0,
|
|
66
|
+
done: true
|
|
67
|
+
};
|
|
68
|
+
firstValue = step.value;
|
|
69
|
+
for (let index = 0; index < pools.length; index++) indices.push(0);
|
|
70
|
+
}
|
|
71
|
+
const tuple = new Array(sources.length);
|
|
72
|
+
tuple[0] = firstValue;
|
|
73
|
+
for (let index = 0; index < indices.length; index++) tuple[index + 1] = pools[index][indices[index]];
|
|
74
|
+
let position = indices.length - 1;
|
|
75
|
+
while (position >= 0) {
|
|
76
|
+
indices[position]++;
|
|
77
|
+
if (indices[position] < pools[position].length) break;
|
|
78
|
+
indices[position] = 0;
|
|
79
|
+
position--;
|
|
80
|
+
}
|
|
81
|
+
if (position < 0) {
|
|
82
|
+
const step = sources[0].next();
|
|
83
|
+
if (step.done) state = "done";
|
|
84
|
+
else firstValue = step.value;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
value: tuple,
|
|
88
|
+
done: false
|
|
89
|
+
};
|
|
90
|
+
}, () => {
|
|
91
|
+
for (const source of sources) source.return?.();
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
exports.cartesianProduct = cartesianProduct;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { iterator } from "./_internal/iterator.mjs";
|
|
2
|
+
//#region src/iterator/cartesianProduct.ts
|
|
3
|
+
/**
|
|
4
|
+
* Lazily computes the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product)
|
|
5
|
+
* of the source iterators, yielding every possible tuple formed by picking one
|
|
6
|
+
* element from each source, in lexicographic order — the rightmost source
|
|
7
|
+
* advances fastest, like the digits of an odometer.
|
|
8
|
+
*
|
|
9
|
+
* Because every source except the first is traversed many times, those sources
|
|
10
|
+
* are buffered into arrays when iteration starts. The first source is consumed
|
|
11
|
+
* lazily, one element at a time, so it may be infinite. When iteration ends —
|
|
12
|
+
* because the first source ran out, a buffered source was empty, or the
|
|
13
|
+
* consumer terminated early — every source is closed via its `return` method.
|
|
14
|
+
*
|
|
15
|
+
* If no sources are passed, a single empty tuple is yielded, matching the
|
|
16
|
+
* array `cartesianProduct`. If any source is empty, nothing is yielded.
|
|
17
|
+
*
|
|
18
|
+
* @template T - A tuple of the source iterator types.
|
|
19
|
+
* @param sources - The iterators to take the product of.
|
|
20
|
+
* @returns A lazy iterator over tuples representing the Cartesian product.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* cartesianProduct([1, 2].values(), ['a', 'b'].values()).toArray();
|
|
24
|
+
* // => [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // The first source may be infinite; elements are produced on demand.
|
|
28
|
+
* cartesianProduct(range(0, Infinity), ['a', 'b'].values()).take(3).toArray();
|
|
29
|
+
* // => [[0, 'a'], [0, 'b'], [1, 'a']]
|
|
30
|
+
*/
|
|
31
|
+
function cartesianProduct(...sources) {
|
|
32
|
+
const pools = [];
|
|
33
|
+
const indices = [];
|
|
34
|
+
let firstValue;
|
|
35
|
+
let state = "initial";
|
|
36
|
+
return iterator(function() {
|
|
37
|
+
if (state === "done") return {
|
|
38
|
+
value: void 0,
|
|
39
|
+
done: true
|
|
40
|
+
};
|
|
41
|
+
if (state === "initial") {
|
|
42
|
+
state = "active";
|
|
43
|
+
if (sources.length === 0) {
|
|
44
|
+
state = "done";
|
|
45
|
+
return {
|
|
46
|
+
value: [],
|
|
47
|
+
done: false
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
for (let index = 1; index < sources.length; index++) {
|
|
51
|
+
const pool = [];
|
|
52
|
+
let step = sources[index].next();
|
|
53
|
+
while (!step.done) {
|
|
54
|
+
pool.push(step.value);
|
|
55
|
+
step = sources[index].next();
|
|
56
|
+
}
|
|
57
|
+
pools.push(pool);
|
|
58
|
+
}
|
|
59
|
+
if (pools.some((pool) => pool.length === 0)) return {
|
|
60
|
+
value: void 0,
|
|
61
|
+
done: true
|
|
62
|
+
};
|
|
63
|
+
const step = sources[0].next();
|
|
64
|
+
if (step.done) return {
|
|
65
|
+
value: void 0,
|
|
66
|
+
done: true
|
|
67
|
+
};
|
|
68
|
+
firstValue = step.value;
|
|
69
|
+
for (let index = 0; index < pools.length; index++) indices.push(0);
|
|
70
|
+
}
|
|
71
|
+
const tuple = new Array(sources.length);
|
|
72
|
+
tuple[0] = firstValue;
|
|
73
|
+
for (let index = 0; index < indices.length; index++) tuple[index + 1] = pools[index][indices[index]];
|
|
74
|
+
let position = indices.length - 1;
|
|
75
|
+
while (position >= 0) {
|
|
76
|
+
indices[position]++;
|
|
77
|
+
if (indices[position] < pools[position].length) break;
|
|
78
|
+
indices[position] = 0;
|
|
79
|
+
position--;
|
|
80
|
+
}
|
|
81
|
+
if (position < 0) {
|
|
82
|
+
const step = sources[0].next();
|
|
83
|
+
if (step.done) state = "done";
|
|
84
|
+
else firstValue = step.value;
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
value: tuple,
|
|
88
|
+
done: false
|
|
89
|
+
};
|
|
90
|
+
}, () => {
|
|
91
|
+
for (const source of sources) source.return?.();
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { cartesianProduct };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cartesianProduct } from "./cartesianProduct.mjs";
|
|
1
2
|
import { chunk } from "./chunk.mjs";
|
|
2
3
|
import { count } from "./count.mjs";
|
|
3
4
|
import { dropWhile } from "./dropWhile.mjs";
|
|
@@ -9,4 +10,4 @@ import { scan } from "./scan.mjs";
|
|
|
9
10
|
import { takeWhile } from "./takeWhile.mjs";
|
|
10
11
|
import { uniqBy } from "./uniqBy.mjs";
|
|
11
12
|
import { zip } from "./zip.mjs";
|
|
12
|
-
export { chunk, count, dropWhile, head, iterate, partition, range, scan, takeWhile, uniqBy, zip };
|
|
13
|
+
export { cartesianProduct, chunk, count, dropWhile, head, iterate, partition, range, scan, takeWhile, uniqBy, zip };
|
package/dist/iterator/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cartesianProduct } from "./cartesianProduct.js";
|
|
1
2
|
import { chunk } from "./chunk.js";
|
|
2
3
|
import { count } from "./count.js";
|
|
3
4
|
import { dropWhile } from "./dropWhile.js";
|
|
@@ -9,4 +10,4 @@ import { scan } from "./scan.js";
|
|
|
9
10
|
import { takeWhile } from "./takeWhile.js";
|
|
10
11
|
import { uniqBy } from "./uniqBy.js";
|
|
11
12
|
import { zip } from "./zip.js";
|
|
12
|
-
export { chunk, count, dropWhile, head, iterate, partition, range, scan, takeWhile, uniqBy, zip };
|
|
13
|
+
export { cartesianProduct, chunk, count, dropWhile, head, iterate, partition, range, scan, takeWhile, uniqBy, zip };
|
package/dist/iterator/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_cartesianProduct = require("./cartesianProduct.js");
|
|
2
3
|
const require_chunk = require("./chunk.js");
|
|
3
4
|
const require_count = require("./count.js");
|
|
4
5
|
const require_dropWhile = require("./dropWhile.js");
|
|
@@ -10,6 +11,7 @@ const require_uniqBy = require("./uniqBy.js");
|
|
|
10
11
|
const require_zip = require("./zip.js");
|
|
11
12
|
const require_iterate = require("./iterate.js");
|
|
12
13
|
const require_range = require("./range.js");
|
|
14
|
+
exports.cartesianProduct = require_cartesianProduct.cartesianProduct;
|
|
13
15
|
exports.chunk = require_chunk.chunk;
|
|
14
16
|
exports.count = require_count.count;
|
|
15
17
|
exports.dropWhile = require_dropWhile.dropWhile;
|
package/dist/iterator/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { cartesianProduct } from "./cartesianProduct.mjs";
|
|
1
2
|
import { chunk } from "./chunk.mjs";
|
|
2
3
|
import { count } from "./count.mjs";
|
|
3
4
|
import { dropWhile } from "./dropWhile.mjs";
|
|
@@ -9,4 +10,4 @@ import { uniqBy } from "./uniqBy.mjs";
|
|
|
9
10
|
import { zip } from "./zip.mjs";
|
|
10
11
|
import { iterate } from "./iterate.mjs";
|
|
11
12
|
import { range } from "./range.mjs";
|
|
12
|
-
export { chunk, count, dropWhile, head, iterate, partition, range, scan, takeWhile, uniqBy, zip };
|
|
13
|
+
export { cartesianProduct, chunk, count, dropWhile, head, iterate, partition, range, scan, takeWhile, uniqBy, zip };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/util/defer.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a `Disposable` object that runs the given callback when it is disposed.
|
|
4
|
+
*
|
|
5
|
+
* Use it with `using` declarations from
|
|
6
|
+
* [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management)
|
|
7
|
+
* to ensure cleanup code runs when the enclosing scope exits, even if an error is thrown.
|
|
8
|
+
*
|
|
9
|
+
* For asynchronous cleanup, use {@link deferAsync} with `await using` instead.
|
|
10
|
+
*
|
|
11
|
+
* @param callback - The cleanup function to run on dispose.
|
|
12
|
+
* @returns A `Disposable` object that invokes `callback` when disposed.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const logs: string[] = [];
|
|
16
|
+
*
|
|
17
|
+
* function run() {
|
|
18
|
+
* using cleanup = defer(() => logs.push('cleanup'));
|
|
19
|
+
* logs.push('body');
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* run();
|
|
23
|
+
* console.log(logs); // ['body', 'cleanup']
|
|
24
|
+
*/
|
|
25
|
+
declare function defer(callback: () => void): Disposable;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { defer };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/util/defer.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a `Disposable` object that runs the given callback when it is disposed.
|
|
4
|
+
*
|
|
5
|
+
* Use it with `using` declarations from
|
|
6
|
+
* [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management)
|
|
7
|
+
* to ensure cleanup code runs when the enclosing scope exits, even if an error is thrown.
|
|
8
|
+
*
|
|
9
|
+
* For asynchronous cleanup, use {@link deferAsync} with `await using` instead.
|
|
10
|
+
*
|
|
11
|
+
* @param callback - The cleanup function to run on dispose.
|
|
12
|
+
* @returns A `Disposable` object that invokes `callback` when disposed.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const logs: string[] = [];
|
|
16
|
+
*
|
|
17
|
+
* function run() {
|
|
18
|
+
* using cleanup = defer(() => logs.push('cleanup'));
|
|
19
|
+
* logs.push('body');
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* run();
|
|
23
|
+
* console.log(logs); // ['body', 'cleanup']
|
|
24
|
+
*/
|
|
25
|
+
declare function defer(callback: () => void): Disposable;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { defer };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/util/defer.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a `Disposable` object that runs the given callback when it is disposed.
|
|
4
|
+
*
|
|
5
|
+
* Use it with `using` declarations from
|
|
6
|
+
* [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management)
|
|
7
|
+
* to ensure cleanup code runs when the enclosing scope exits, even if an error is thrown.
|
|
8
|
+
*
|
|
9
|
+
* For asynchronous cleanup, use {@link deferAsync} with `await using` instead.
|
|
10
|
+
*
|
|
11
|
+
* @param callback - The cleanup function to run on dispose.
|
|
12
|
+
* @returns A `Disposable` object that invokes `callback` when disposed.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const logs: string[] = [];
|
|
16
|
+
*
|
|
17
|
+
* function run() {
|
|
18
|
+
* using cleanup = defer(() => logs.push('cleanup'));
|
|
19
|
+
* logs.push('body');
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* run();
|
|
23
|
+
* console.log(logs); // ['body', 'cleanup']
|
|
24
|
+
*/
|
|
25
|
+
function defer(callback) {
|
|
26
|
+
return { [Symbol.dispose]: () => {
|
|
27
|
+
callback();
|
|
28
|
+
} };
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
exports.defer = defer;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/util/defer.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a `Disposable` object that runs the given callback when it is disposed.
|
|
4
|
+
*
|
|
5
|
+
* Use it with `using` declarations from
|
|
6
|
+
* [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management)
|
|
7
|
+
* to ensure cleanup code runs when the enclosing scope exits, even if an error is thrown.
|
|
8
|
+
*
|
|
9
|
+
* For asynchronous cleanup, use {@link deferAsync} with `await using` instead.
|
|
10
|
+
*
|
|
11
|
+
* @param callback - The cleanup function to run on dispose.
|
|
12
|
+
* @returns A `Disposable` object that invokes `callback` when disposed.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const logs: string[] = [];
|
|
16
|
+
*
|
|
17
|
+
* function run() {
|
|
18
|
+
* using cleanup = defer(() => logs.push('cleanup'));
|
|
19
|
+
* logs.push('body');
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* run();
|
|
23
|
+
* console.log(logs); // ['body', 'cleanup']
|
|
24
|
+
*/
|
|
25
|
+
function defer(callback) {
|
|
26
|
+
return { [Symbol.dispose]: () => {
|
|
27
|
+
callback();
|
|
28
|
+
} };
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { defer };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/util/deferAsync.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates an `AsyncDisposable` object that runs the given callback when it is disposed.
|
|
4
|
+
*
|
|
5
|
+
* Use it with `await using` declarations from
|
|
6
|
+
* [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management)
|
|
7
|
+
* to ensure asynchronous cleanup code runs and is awaited when the enclosing scope exits,
|
|
8
|
+
* even if an error is thrown.
|
|
9
|
+
*
|
|
10
|
+
* For synchronous cleanup, use {@link defer} with `using` instead.
|
|
11
|
+
*
|
|
12
|
+
* @param callback - The cleanup function to run on dispose. Its result is awaited.
|
|
13
|
+
* @returns An `AsyncDisposable` object that invokes and awaits `callback` when disposed.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const connection = await connect();
|
|
17
|
+
*
|
|
18
|
+
* async function run() {
|
|
19
|
+
* await using cleanup = deferAsync(async () => {
|
|
20
|
+
* await connection.close();
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* await connection.query('SELECT 1');
|
|
24
|
+
* }
|
|
25
|
+
*
|
|
26
|
+
* await run(); // The connection is closed after `run` finishes.
|
|
27
|
+
*/
|
|
28
|
+
declare function deferAsync(callback: () => void | PromiseLike<void>): AsyncDisposable;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { deferAsync };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
//#region src/util/deferAsync.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates an `AsyncDisposable` object that runs the given callback when it is disposed.
|
|
4
|
+
*
|
|
5
|
+
* Use it with `await using` declarations from
|
|
6
|
+
* [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management)
|
|
7
|
+
* to ensure asynchronous cleanup code runs and is awaited when the enclosing scope exits,
|
|
8
|
+
* even if an error is thrown.
|
|
9
|
+
*
|
|
10
|
+
* For synchronous cleanup, use {@link defer} with `using` instead.
|
|
11
|
+
*
|
|
12
|
+
* @param callback - The cleanup function to run on dispose. Its result is awaited.
|
|
13
|
+
* @returns An `AsyncDisposable` object that invokes and awaits `callback` when disposed.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const connection = await connect();
|
|
17
|
+
*
|
|
18
|
+
* async function run() {
|
|
19
|
+
* await using cleanup = deferAsync(async () => {
|
|
20
|
+
* await connection.close();
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* await connection.query('SELECT 1');
|
|
24
|
+
* }
|
|
25
|
+
*
|
|
26
|
+
* await run(); // The connection is closed after `run` finishes.
|
|
27
|
+
*/
|
|
28
|
+
declare function deferAsync(callback: () => void | PromiseLike<void>): AsyncDisposable;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { deferAsync };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/util/deferAsync.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates an `AsyncDisposable` object that runs the given callback when it is disposed.
|
|
4
|
+
*
|
|
5
|
+
* Use it with `await using` declarations from
|
|
6
|
+
* [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management)
|
|
7
|
+
* to ensure asynchronous cleanup code runs and is awaited when the enclosing scope exits,
|
|
8
|
+
* even if an error is thrown.
|
|
9
|
+
*
|
|
10
|
+
* For synchronous cleanup, use {@link defer} with `using` instead.
|
|
11
|
+
*
|
|
12
|
+
* @param callback - The cleanup function to run on dispose. Its result is awaited.
|
|
13
|
+
* @returns An `AsyncDisposable` object that invokes and awaits `callback` when disposed.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const connection = await connect();
|
|
17
|
+
*
|
|
18
|
+
* async function run() {
|
|
19
|
+
* await using cleanup = deferAsync(async () => {
|
|
20
|
+
* await connection.close();
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* await connection.query('SELECT 1');
|
|
24
|
+
* }
|
|
25
|
+
*
|
|
26
|
+
* await run(); // The connection is closed after `run` finishes.
|
|
27
|
+
*/
|
|
28
|
+
function deferAsync(callback) {
|
|
29
|
+
return { [Symbol.asyncDispose]: async () => {
|
|
30
|
+
await callback();
|
|
31
|
+
} };
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
exports.deferAsync = deferAsync;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/util/deferAsync.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates an `AsyncDisposable` object that runs the given callback when it is disposed.
|
|
4
|
+
*
|
|
5
|
+
* Use it with `await using` declarations from
|
|
6
|
+
* [Explicit Resource Management](https://github.com/tc39/proposal-explicit-resource-management)
|
|
7
|
+
* to ensure asynchronous cleanup code runs and is awaited when the enclosing scope exits,
|
|
8
|
+
* even if an error is thrown.
|
|
9
|
+
*
|
|
10
|
+
* For synchronous cleanup, use {@link defer} with `using` instead.
|
|
11
|
+
*
|
|
12
|
+
* @param callback - The cleanup function to run on dispose. Its result is awaited.
|
|
13
|
+
* @returns An `AsyncDisposable` object that invokes and awaits `callback` when disposed.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const connection = await connect();
|
|
17
|
+
*
|
|
18
|
+
* async function run() {
|
|
19
|
+
* await using cleanup = deferAsync(async () => {
|
|
20
|
+
* await connection.close();
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* await connection.query('SELECT 1');
|
|
24
|
+
* }
|
|
25
|
+
*
|
|
26
|
+
* await run(); // The connection is closed after `run` finishes.
|
|
27
|
+
*/
|
|
28
|
+
function deferAsync(callback) {
|
|
29
|
+
return { [Symbol.asyncDispose]: async () => {
|
|
30
|
+
await callback();
|
|
31
|
+
} };
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { deferAsync };
|
package/dist/util/index.d.mts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { attempt } from "./attempt.mjs";
|
|
2
2
|
import { attemptAsync } from "./attemptAsync.mjs";
|
|
3
|
+
import { defer } from "./defer.mjs";
|
|
4
|
+
import { deferAsync } from "./deferAsync.mjs";
|
|
3
5
|
import { invariant } from "./invariant.mjs";
|
|
4
|
-
export { invariant as assert, attempt, attemptAsync, invariant };
|
|
6
|
+
export { invariant as assert, attempt, attemptAsync, defer, deferAsync, invariant };
|
package/dist/util/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { attempt } from "./attempt.js";
|
|
2
2
|
import { attemptAsync } from "./attemptAsync.js";
|
|
3
|
+
import { defer } from "./defer.js";
|
|
4
|
+
import { deferAsync } from "./deferAsync.js";
|
|
3
5
|
import { invariant } from "./invariant.js";
|
|
4
|
-
export { invariant as assert, attempt, attemptAsync, invariant };
|
|
6
|
+
export { invariant as assert, attempt, attemptAsync, defer, deferAsync, invariant };
|
package/dist/util/index.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_attempt = require("./attempt.js");
|
|
3
3
|
const require_attemptAsync = require("./attemptAsync.js");
|
|
4
|
+
const require_defer = require("./defer.js");
|
|
5
|
+
const require_deferAsync = require("./deferAsync.js");
|
|
4
6
|
const require_invariant = require("./invariant.js");
|
|
5
7
|
exports.assert = require_invariant.invariant;
|
|
6
8
|
exports.attempt = require_attempt.attempt;
|
|
7
9
|
exports.attemptAsync = require_attemptAsync.attemptAsync;
|
|
10
|
+
exports.defer = require_defer.defer;
|
|
11
|
+
exports.deferAsync = require_deferAsync.deferAsync;
|
|
8
12
|
exports.invariant = require_invariant.invariant;
|
package/dist/util/index.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { attempt } from "./attempt.mjs";
|
|
2
2
|
import { attemptAsync } from "./attemptAsync.mjs";
|
|
3
|
+
import { defer } from "./defer.mjs";
|
|
4
|
+
import { deferAsync } from "./deferAsync.mjs";
|
|
3
5
|
import { invariant } from "./invariant.mjs";
|
|
4
|
-
export { invariant as assert, attempt, attemptAsync, invariant };
|
|
6
|
+
export { invariant as assert, attempt, attemptAsync, defer, deferAsync, invariant };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "es-toolkit",
|
|
3
|
-
"version": "1.51.0-dev.
|
|
3
|
+
"version": "1.51.0-dev.2071+83d43342",
|
|
4
4
|
"description": "A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.",
|
|
5
5
|
"homepage": "https://es-toolkit.dev",
|
|
6
6
|
"bugs": "https://github.com/toss/es-toolkit/issues",
|