rubico 2.8.2 → 2.8.3

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.
Files changed (368) hide show
  1. package/README.md +10 -10
  2. package/dist/Transducer.es.js +1 -1
  3. package/dist/Transducer.es.min.js +1 -1
  4. package/dist/Transducer.js +1 -1
  5. package/dist/Transducer.min.js +2 -2
  6. package/dist/Transducer.mjs +1 -1
  7. package/dist/__.es.js +1 -1
  8. package/dist/__.es.min.js +1 -1
  9. package/dist/__.js +1 -1
  10. package/dist/__.min.js +2 -2
  11. package/dist/__.mjs +1 -1
  12. package/dist/all.es.js +1 -1
  13. package/dist/all.es.min.js +1 -1
  14. package/dist/all.js +1 -1
  15. package/dist/all.min.js +2 -2
  16. package/dist/all.mjs +1 -1
  17. package/dist/always.es.js +1 -1
  18. package/dist/always.es.min.js +1 -1
  19. package/dist/always.js +1 -1
  20. package/dist/always.min.js +2 -2
  21. package/dist/always.mjs +1 -1
  22. package/dist/and.es.js +1 -1
  23. package/dist/and.es.min.js +1 -1
  24. package/dist/and.js +1 -1
  25. package/dist/and.min.js +2 -2
  26. package/dist/and.mjs +1 -1
  27. package/dist/assign.es.js +1 -1
  28. package/dist/assign.es.min.js +1 -1
  29. package/dist/assign.js +1 -1
  30. package/dist/assign.min.js +2 -2
  31. package/dist/assign.mjs +1 -1
  32. package/dist/compose.es.js +1 -1
  33. package/dist/compose.es.min.js +1 -1
  34. package/dist/compose.js +1 -1
  35. package/dist/compose.min.js +2 -2
  36. package/dist/compose.mjs +1 -1
  37. package/dist/curry.es.js +1 -1
  38. package/dist/curry.es.min.js +1 -1
  39. package/dist/curry.js +1 -1
  40. package/dist/curry.min.js +2 -2
  41. package/dist/curry.mjs +1 -1
  42. package/dist/eq.es.js +1 -1
  43. package/dist/eq.es.min.js +1 -1
  44. package/dist/eq.js +1 -1
  45. package/dist/eq.min.js +2 -2
  46. package/dist/eq.mjs +1 -1
  47. package/dist/every.es.js +1 -1
  48. package/dist/every.es.min.js +2 -2
  49. package/dist/every.js +1 -1
  50. package/dist/every.min.js +2 -2
  51. package/dist/every.mjs +1 -1
  52. package/dist/filter.es.js +1 -1
  53. package/dist/filter.es.min.js +1 -1
  54. package/dist/filter.js +1 -1
  55. package/dist/filter.min.js +2 -2
  56. package/dist/filter.mjs +1 -1
  57. package/dist/flatMap.es.js +1 -1
  58. package/dist/flatMap.es.min.js +2 -2
  59. package/dist/flatMap.js +1 -1
  60. package/dist/flatMap.min.js +2 -2
  61. package/dist/flatMap.mjs +1 -1
  62. package/dist/forEach.es.js +1 -1
  63. package/dist/forEach.es.min.js +1 -1
  64. package/dist/forEach.js +1 -1
  65. package/dist/forEach.min.js +2 -2
  66. package/dist/forEach.mjs +1 -1
  67. package/dist/get.es.js +1 -1
  68. package/dist/get.es.min.js +1 -1
  69. package/dist/get.js +1 -1
  70. package/dist/get.min.js +2 -2
  71. package/dist/get.mjs +1 -1
  72. package/dist/gt.es.js +1 -1
  73. package/dist/gt.es.min.js +1 -1
  74. package/dist/gt.js +1 -1
  75. package/dist/gt.min.js +2 -2
  76. package/dist/gt.mjs +1 -1
  77. package/dist/gte.es.js +1 -1
  78. package/dist/gte.es.min.js +1 -1
  79. package/dist/gte.js +1 -1
  80. package/dist/gte.min.js +2 -2
  81. package/dist/gte.mjs +1 -1
  82. package/dist/lt.es.js +1 -1
  83. package/dist/lt.es.min.js +1 -1
  84. package/dist/lt.js +1 -1
  85. package/dist/lt.min.js +2 -2
  86. package/dist/lt.mjs +1 -1
  87. package/dist/lte.es.js +1 -1
  88. package/dist/lte.es.min.js +1 -1
  89. package/dist/lte.js +1 -1
  90. package/dist/lte.min.js +2 -2
  91. package/dist/lte.mjs +1 -1
  92. package/dist/map.es.js +1 -1
  93. package/dist/map.es.min.js +2 -2
  94. package/dist/map.js +1 -1
  95. package/dist/map.min.js +2 -2
  96. package/dist/map.mjs +1 -1
  97. package/dist/not.es.js +1 -1
  98. package/dist/not.es.min.js +1 -1
  99. package/dist/not.js +1 -1
  100. package/dist/not.min.js +2 -2
  101. package/dist/not.mjs +1 -1
  102. package/dist/omit.es.js +1 -1
  103. package/dist/omit.es.min.js +1 -1
  104. package/dist/omit.js +1 -1
  105. package/dist/omit.min.js +2 -2
  106. package/dist/omit.mjs +1 -1
  107. package/dist/or.es.js +1 -1
  108. package/dist/or.es.min.js +1 -1
  109. package/dist/or.js +1 -1
  110. package/dist/or.min.js +2 -2
  111. package/dist/or.mjs +1 -1
  112. package/dist/pick.es.js +1 -1
  113. package/dist/pick.es.min.js +1 -1
  114. package/dist/pick.js +1 -1
  115. package/dist/pick.min.js +2 -2
  116. package/dist/pick.mjs +1 -1
  117. package/dist/pipe.es.js +1 -1
  118. package/dist/pipe.es.min.js +1 -1
  119. package/dist/pipe.js +1 -1
  120. package/dist/pipe.min.js +2 -2
  121. package/dist/pipe.mjs +1 -1
  122. package/dist/reduce.es.js +1 -1
  123. package/dist/reduce.es.min.js +1 -1
  124. package/dist/reduce.js +1 -1
  125. package/dist/reduce.min.js +2 -2
  126. package/dist/reduce.mjs +1 -1
  127. package/dist/rubico.es.js +1 -1
  128. package/dist/rubico.es.min.js +2 -2
  129. package/dist/rubico.global.js +1 -1
  130. package/dist/rubico.global.min.js +2 -2
  131. package/dist/rubico.js +1 -1
  132. package/dist/rubico.min.js +2 -2
  133. package/dist/rubico.mjs +1 -1
  134. package/dist/set.es.js +1 -1
  135. package/dist/set.es.min.js +1 -1
  136. package/dist/set.js +1 -1
  137. package/dist/set.min.js +2 -2
  138. package/dist/set.mjs +1 -1
  139. package/dist/some.es.js +1 -1
  140. package/dist/some.es.min.js +2 -2
  141. package/dist/some.js +1 -1
  142. package/dist/some.min.js +2 -2
  143. package/dist/some.mjs +1 -1
  144. package/dist/switchCase.es.js +1 -1
  145. package/dist/switchCase.es.min.js +1 -1
  146. package/dist/switchCase.js +1 -1
  147. package/dist/switchCase.min.js +2 -2
  148. package/dist/switchCase.mjs +1 -1
  149. package/dist/tap.es.js +1 -1
  150. package/dist/tap.es.min.js +1 -1
  151. package/dist/tap.js +1 -1
  152. package/dist/tap.min.js +2 -2
  153. package/dist/tap.mjs +1 -1
  154. package/dist/thunkify.es.js +1 -1
  155. package/dist/thunkify.es.min.js +1 -1
  156. package/dist/thunkify.js +1 -1
  157. package/dist/thunkify.min.js +2 -2
  158. package/dist/thunkify.mjs +1 -1
  159. package/dist/transform.es.js +1 -1
  160. package/dist/transform.es.min.js +1 -1
  161. package/dist/transform.js +1 -1
  162. package/dist/transform.min.js +2 -2
  163. package/dist/transform.mjs +1 -1
  164. package/dist/tryCatch.es.js +1 -1
  165. package/dist/tryCatch.es.min.js +1 -1
  166. package/dist/tryCatch.js +1 -1
  167. package/dist/tryCatch.min.js +2 -2
  168. package/dist/tryCatch.mjs +1 -1
  169. package/dist/x/append.es.js +1 -1
  170. package/dist/x/append.es.min.js +1 -1
  171. package/dist/x/append.js +1 -1
  172. package/dist/x/append.min.js +2 -2
  173. package/dist/x/append.mjs +1 -1
  174. package/dist/x/callProp.es.js +1 -1
  175. package/dist/x/callProp.es.min.js +1 -1
  176. package/dist/x/callProp.js +1 -1
  177. package/dist/x/callProp.min.js +2 -2
  178. package/dist/x/callProp.mjs +1 -1
  179. package/dist/x/defaultsDeep.es.js +1 -1
  180. package/dist/x/defaultsDeep.es.min.js +1 -1
  181. package/dist/x/defaultsDeep.js +1 -1
  182. package/dist/x/defaultsDeep.min.js +2 -2
  183. package/dist/x/defaultsDeep.mjs +1 -1
  184. package/dist/x/differenceWith.es.js +1 -1
  185. package/dist/x/differenceWith.es.min.js +2 -2
  186. package/dist/x/differenceWith.js +1 -1
  187. package/dist/x/differenceWith.min.js +2 -2
  188. package/dist/x/differenceWith.mjs +1 -1
  189. package/dist/x/filterOut.es.js +1 -1
  190. package/dist/x/filterOut.es.min.js +1 -1
  191. package/dist/x/filterOut.js +1 -1
  192. package/dist/x/filterOut.min.js +2 -2
  193. package/dist/x/filterOut.mjs +1 -1
  194. package/dist/x/find.es.js +1 -1
  195. package/dist/x/find.es.min.js +1 -1
  196. package/dist/x/find.js +1 -1
  197. package/dist/x/find.min.js +2 -2
  198. package/dist/x/find.mjs +1 -1
  199. package/dist/x/findIndex.es.js +1 -1
  200. package/dist/x/findIndex.es.min.js +1 -1
  201. package/dist/x/findIndex.js +1 -1
  202. package/dist/x/findIndex.min.js +2 -2
  203. package/dist/x/findIndex.mjs +1 -1
  204. package/dist/x/first.es.js +1 -1
  205. package/dist/x/first.es.min.js +1 -1
  206. package/dist/x/first.js +1 -1
  207. package/dist/x/first.min.js +2 -2
  208. package/dist/x/first.mjs +1 -1
  209. package/dist/x/flatten.es.js +1 -1
  210. package/dist/x/flatten.es.min.js +2 -2
  211. package/dist/x/flatten.js +1 -1
  212. package/dist/x/flatten.min.js +2 -2
  213. package/dist/x/flatten.mjs +1 -1
  214. package/dist/x/groupBy.es.js +1 -1
  215. package/dist/x/groupBy.es.min.js +1 -1
  216. package/dist/x/groupBy.js +1 -1
  217. package/dist/x/groupBy.min.js +2 -2
  218. package/dist/x/groupBy.mjs +1 -1
  219. package/dist/x/has.es.js +1 -1
  220. package/dist/x/has.es.min.js +1 -1
  221. package/dist/x/has.js +1 -1
  222. package/dist/x/has.min.js +2 -2
  223. package/dist/x/has.mjs +1 -1
  224. package/dist/x/identity.es.js +1 -1
  225. package/dist/x/identity.es.min.js +1 -1
  226. package/dist/x/identity.js +1 -1
  227. package/dist/x/identity.min.js +2 -2
  228. package/dist/x/identity.mjs +1 -1
  229. package/dist/x/includes.es.js +1 -1
  230. package/dist/x/includes.es.min.js +1 -1
  231. package/dist/x/includes.js +1 -1
  232. package/dist/x/includes.min.js +2 -2
  233. package/dist/x/includes.mjs +1 -1
  234. package/dist/x/isDeepEqual.es.js +1 -1
  235. package/dist/x/isDeepEqual.es.min.js +1 -1
  236. package/dist/x/isDeepEqual.js +1 -1
  237. package/dist/x/isDeepEqual.min.js +2 -2
  238. package/dist/x/isDeepEqual.mjs +1 -1
  239. package/dist/x/isEmpty.es.js +1 -1
  240. package/dist/x/isEmpty.es.min.js +1 -1
  241. package/dist/x/isEmpty.js +1 -1
  242. package/dist/x/isEmpty.min.js +2 -2
  243. package/dist/x/isEmpty.mjs +1 -1
  244. package/dist/x/isEqual.es.js +1 -1
  245. package/dist/x/isEqual.es.min.js +1 -1
  246. package/dist/x/isEqual.js +1 -1
  247. package/dist/x/isEqual.min.js +2 -2
  248. package/dist/x/isEqual.mjs +1 -1
  249. package/dist/x/isFunction.es.js +1 -1
  250. package/dist/x/isFunction.es.min.js +1 -1
  251. package/dist/x/isFunction.js +1 -1
  252. package/dist/x/isFunction.min.js +2 -2
  253. package/dist/x/isFunction.mjs +1 -1
  254. package/dist/x/isIn.es.js +1 -1
  255. package/dist/x/isIn.es.min.js +1 -1
  256. package/dist/x/isIn.js +1 -1
  257. package/dist/x/isIn.min.js +2 -2
  258. package/dist/x/isIn.mjs +1 -1
  259. package/dist/x/isObject.es.js +1 -1
  260. package/dist/x/isObject.es.min.js +1 -1
  261. package/dist/x/isObject.js +1 -1
  262. package/dist/x/isObject.min.js +2 -2
  263. package/dist/x/isObject.mjs +1 -1
  264. package/dist/x/isString.es.js +1 -1
  265. package/dist/x/isString.es.min.js +1 -1
  266. package/dist/x/isString.js +1 -1
  267. package/dist/x/isString.min.js +2 -2
  268. package/dist/x/isString.mjs +1 -1
  269. package/dist/x/keys.es.js +1 -1
  270. package/dist/x/keys.es.min.js +1 -1
  271. package/dist/x/keys.js +1 -1
  272. package/dist/x/keys.min.js +2 -2
  273. package/dist/x/keys.mjs +1 -1
  274. package/dist/x/last.es.js +1 -1
  275. package/dist/x/last.es.min.js +1 -1
  276. package/dist/x/last.js +1 -1
  277. package/dist/x/last.min.js +2 -2
  278. package/dist/x/last.mjs +1 -1
  279. package/dist/x/maxBy.es.js +1 -1
  280. package/dist/x/maxBy.es.min.js +1 -1
  281. package/dist/x/maxBy.js +1 -1
  282. package/dist/x/maxBy.min.js +2 -2
  283. package/dist/x/maxBy.mjs +1 -1
  284. package/dist/x/noop.es.js +1 -1
  285. package/dist/x/noop.es.min.js +1 -1
  286. package/dist/x/noop.js +1 -1
  287. package/dist/x/noop.min.js +2 -2
  288. package/dist/x/noop.mjs +1 -1
  289. package/dist/x/pluck.es.js +1 -1
  290. package/dist/x/pluck.es.min.js +2 -2
  291. package/dist/x/pluck.js +1 -1
  292. package/dist/x/pluck.min.js +2 -2
  293. package/dist/x/pluck.mjs +1 -1
  294. package/dist/x/prepend.es.js +1 -1
  295. package/dist/x/prepend.es.min.js +1 -1
  296. package/dist/x/prepend.js +1 -1
  297. package/dist/x/prepend.min.js +2 -2
  298. package/dist/x/prepend.mjs +1 -1
  299. package/dist/x/size.es.js +1 -1
  300. package/dist/x/size.es.min.js +1 -1
  301. package/dist/x/size.js +1 -1
  302. package/dist/x/size.min.js +2 -2
  303. package/dist/x/size.mjs +1 -1
  304. package/dist/x/trace.es.js +1 -1
  305. package/dist/x/trace.es.min.js +1 -1
  306. package/dist/x/trace.js +1 -1
  307. package/dist/x/trace.min.js +2 -2
  308. package/dist/x/trace.mjs +1 -1
  309. package/dist/x/unionWith.es.js +1 -1
  310. package/dist/x/unionWith.es.min.js +1 -1
  311. package/dist/x/unionWith.js +1 -1
  312. package/dist/x/unionWith.min.js +2 -2
  313. package/dist/x/unionWith.mjs +1 -1
  314. package/dist/x/uniq.es.js +1 -1
  315. package/dist/x/uniq.es.min.js +1 -1
  316. package/dist/x/uniq.js +1 -1
  317. package/dist/x/uniq.min.js +2 -2
  318. package/dist/x/uniq.mjs +1 -1
  319. package/dist/x/unless.es.js +1 -1
  320. package/dist/x/unless.es.min.js +1 -1
  321. package/dist/x/unless.js +1 -1
  322. package/dist/x/unless.min.js +2 -2
  323. package/dist/x/unless.mjs +1 -1
  324. package/dist/x/values.es.js +1 -1
  325. package/dist/x/values.es.min.js +1 -1
  326. package/dist/x/values.js +1 -1
  327. package/dist/x/values.min.js +2 -2
  328. package/dist/x/values.mjs +1 -1
  329. package/dist/x/when.es.js +1 -1
  330. package/dist/x/when.es.min.js +1 -1
  331. package/dist/x/when.js +1 -1
  332. package/dist/x/when.min.js +2 -2
  333. package/dist/x/when.mjs +1 -1
  334. package/es.js +1 -1
  335. package/index.js +1 -1
  336. package/package.json +1 -1
  337. package/thunkify.js +9 -3
  338. package/x/append.js +1 -1
  339. package/x/callProp.js +1 -1
  340. package/x/defaultsDeep.js +1 -1
  341. package/x/differenceWith.js +2 -2
  342. package/x/find.js +1 -1
  343. package/x/findIndex.js +1 -1
  344. package/x/first.js +1 -1
  345. package/x/flatten.js +1 -1
  346. package/x/groupBy.js +2 -2
  347. package/x/has.js +1 -1
  348. package/x/identity.js +1 -1
  349. package/x/includes.js +1 -1
  350. package/x/isDeepEqual.js +2 -2
  351. package/x/isEmpty.js +1 -1
  352. package/x/isFunction.js +1 -1
  353. package/x/isIn.js +2 -2
  354. package/x/isObject.js +1 -1
  355. package/x/isString.js +1 -1
  356. package/x/keys.js +1 -1
  357. package/x/last.js +1 -1
  358. package/x/maxBy.js +2 -2
  359. package/x/noop.js +1 -1
  360. package/x/pluck.js +1 -1
  361. package/x/prepend.js +1 -1
  362. package/x/size.js +1 -1
  363. package/x/trace.js +1 -1
  364. package/x/unionWith.js +2 -2
  365. package/x/uniq.js +1 -1
  366. package/x/unless.js +1 -1
  367. package/x/values.js +1 -1
  368. package/x/when.js +1 -1
package/dist/filter.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
6
6
  * Rubico may be freely distributed under the CFOSS license.
7
7
  */
8
8
 
9
- !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define(()=>t):n.filter=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=Symbol.for("placeholder"),t=function(t,e,o){return e==n?((n,t)=>function(e){return n(e,t)})(t,o):((n,t)=>function(e){return n(t,e)})(t,e)},e=Symbol.iterator,o=(n,t)=>({[e](){return this},next(){let e=n.next();for(;!e.done;){const{value:o}=e;if(t(o))return{value:o,done:!1};e=n.next()}return e}}),r=n=>null!=n&&"function"==typeof n.then,u=Symbol.asyncIterator,c=(n,t)=>({isAsyncIteratorDone:!1,[u](){return this},async next(){for(;!this.isAsyncIteratorDone;){const{value:e,done:o}=await n.next();if(o)this.isAsyncIteratorDone=!0;else{const n=t(e);if(r(n)?await n:n)return{value:e,done:!1}}}return{value:void 0,done:!0}}}),i=Array.isArray,f=function(t,e,o,r,u){return e==n?((n,t,e,o)=>function(r){return n(r,t,e,o)})(t,o,r,u):o==n?((n,t,e,o)=>function(r){return n(t,r,e,o)})(t,e,r,u):r==n?((n,t,e,o)=>function(r){return n(t,e,r,o)})(t,e,o,u):((n,t,e,o)=>function(r){return n(t,e,o,r)})(t,e,o,r)},s=Promise.all.bind(Promise),l=function(n,t,e,o){const r=t.length;let u=n.length-1;for(;++o<r;)n[++u]=e(t[o],o,n);return n},h=function(n,t,e,o){const r=n.length;let u=-1;for(;++e<r;)o[++u]&&t.push(n[e]);return t},a=function(t,e){const o=t.length,u=[];let c=-1,i=-1;for(;++c<o;){const o=t[c],a=e(o,c,t);if(r(a))return s(l([a],t,e,c)).then(f(h,t,u,c-1,n));a&&(u[++i]=o)}return u},y=function(t,e,o,r){return e==n?((n,t,e)=>function(o){return n(o,t,e)})(t,o,r):o==n?((n,t,e)=>function(o){return n(t,o,e)})(t,e,r):((n,t,e)=>function(o){return n(t,e,o)})(t,e,o)},d=(n,t,e)=>n[t](e),p=n=>function(){return n},g=(n,t,e)=>n?t():e(),b=(n,t)=>function(){return n(t)},m=function(){},v=(n,t,e,o,r)=>function(){return n(t,e,o,r)},x=(n,t,e,o)=>n[t](e,o),S=function(n,t,e,o){o&&(n[t]=e)},j=function(t,l){return i(t)?a(t,l):null==t?t:"string"==typeof t||t.constructor==String?function(t,e){const o=a(t,e);return r(o)?o.then(y(d,n,"join","")):o.join("")}(t,l):t.constructor==Set?function(t,e){const o=new Set,u=o.add.bind(o),c=[];for(const i of t){const f=e(i,i,t);r(f)?c.push(f.then(y(g,n,b(u,i),m))):f&&o.add(i)}return 0==c.length?o:s(c).then(p(o))}(t,l):t.constructor==Map?function(t,e){const o=new Map,u=[];for(const[c,i]of t){const f=e(i,c,t);r(f)?u.push(f.then(y(g,n,v(x,o,"set",c,i),m))):f&&o.set(c,i)}return 0==u.length?o:s(u).then(p(o))}(t,l):"function"==typeof t.filter?t.filter(l):"function"==typeof t[e]?o(t[e](),l):"function"==typeof t[u]?c(t[u](),l):t.constructor==Object?function(t,e){const o={},u=[];for(const c in t){const i=t[c],s=e(i,c,t);r(s)?u.push(s.then(f(S,o,c,t[c],n))):s&&(o[c]=i)}return 0==u.length?o:s(u).then(p(o))}(t,l):t};return function(e,o){return"function"==typeof e?t(j,n,e):r(e)?e.then(t(j,n,o)):j(e,o)}}());
9
+ !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define((()=>t)):n.filter=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=Symbol.for("placeholder"),t=function(t,e,o){return e==n?((n,t)=>function(e){return n(e,t)})(t,o):((n,t)=>function(e){return n(t,e)})(t,e)},e=Symbol.iterator,o=(n,t)=>({[e](){return this},next(){let e=n.next();for(;!e.done;){const{value:o}=e;if(t(o))return{value:o,done:!1};e=n.next()}return e}}),r=n=>null!=n&&"function"==typeof n.then,u=Symbol.asyncIterator,c=(n,t)=>({isAsyncIteratorDone:!1,[u](){return this},async next(){for(;!this.isAsyncIteratorDone;){const{value:e,done:o}=await n.next();if(o)this.isAsyncIteratorDone=!0;else{const n=t(e);if(r(n)?await n:n)return{value:e,done:!1}}}return{value:void 0,done:!0}}}),i=Array.isArray,f=function(t,e,o,r,u){return e==n?((n,t,e,o)=>function(r){return n(r,t,e,o)})(t,o,r,u):o==n?((n,t,e,o)=>function(r){return n(t,r,e,o)})(t,e,r,u):r==n?((n,t,e,o)=>function(r){return n(t,e,r,o)})(t,e,o,u):((n,t,e,o)=>function(r){return n(t,e,o,r)})(t,e,o,r)},s=Promise.all.bind(Promise),l=function(n,t,e,o){const r=t.length;let u=n.length-1;for(;++o<r;)n[++u]=e(t[o],o,n);return n},h=function(n,t,e,o){const r=n.length;let u=-1;for(;++e<r;)o[++u]&&t.push(n[e]);return t},a=function(t,e){const o=t.length,u=[];let c=-1,i=-1;for(;++c<o;){const o=t[c],a=e(o,c,t);if(r(a))return s(l([a],t,e,c)).then(f(h,t,u,c-1,n));a&&(u[++i]=o)}return u},y=function(t,e,o,r){return e==n?((n,t,e)=>function(o){return n(o,t,e)})(t,o,r):o==n?((n,t,e)=>function(o){return n(t,o,e)})(t,e,r):((n,t,e)=>function(o){return n(t,e,o)})(t,e,o)},d=(n,t,e)=>n[t](e),p=n=>function(){return n},g=(n,t,e)=>n?t():e(),b=(n,t)=>function(){return n(t)},m=function(){},v=(n,t,e,o,r)=>function(){return n(t,e,o,r)},x=(n,t,e,o)=>n[t](e,o),S=function(n,t,e,o){o&&(n[t]=e)},j=function(t,l){return i(t)?a(t,l):null==t?t:"string"==typeof t||t.constructor==String?function(t,e){const o=a(t,e);return r(o)?o.then(y(d,n,"join","")):o.join("")}(t,l):t.constructor==Set?function(t,e){const o=new Set,u=o.add.bind(o),c=[];for(const i of t){const f=e(i,i,t);r(f)?c.push(f.then(y(g,n,b(u,i),m))):f&&o.add(i)}return 0==c.length?o:s(c).then(p(o))}(t,l):t.constructor==Map?function(t,e){const o=new Map,u=[];for(const[c,i]of t){const f=e(i,c,t);r(f)?u.push(f.then(y(g,n,v(x,o,"set",c,i),m))):f&&o.set(c,i)}return 0==u.length?o:s(u).then(p(o))}(t,l):"function"==typeof t.filter?t.filter(l):"function"==typeof t[e]?o(t[e](),l):"function"==typeof t[u]?c(t[u](),l):t.constructor==Object?function(t,e){const o={},u=[];for(const c in t){const i=t[c],s=e(i,c,t);r(s)?u.push(s.then(f(S,o,c,t[c],n))):s&&(o[c]=i)}return 0==u.length?o:s(u).then(p(o))}(t,l):t};return function(e,o){return"function"==typeof e?t(j,n,e):r(e)?e.then(t(j,n,o)):j(e,o)}}());
package/dist/filter.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
6
6
  * Rubico may be freely distributed under the CFOSS license.
7
7
  */
8
- const isPromise=e=>null!=e&&"function"==typeof e.then,isArray=Array.isArray,objectValues=Object.values,objectProto=Object.prototype,nativeObjectToString=objectProto.toString,objectToString=e=>nativeObjectToString.call(e),generatorFunctionTag="[object GeneratorFunction]",isGeneratorFunction=e=>objectToString(e)==generatorFunctionTag,asyncGeneratorFunctionTag="[object AsyncGeneratorFunction]",isAsyncGeneratorFunction=e=>objectToString(e)==asyncGeneratorFunctionTag,__=Symbol.for("placeholder"),curry3ResolveArg0=(e,r,t)=>function(n){return e(n,r,t)},curry3ResolveArg1=(e,r,t)=>function(n){return e(r,n,t)},curry3ResolveArg2=(e,r,t)=>function(n){return e(r,t,n)},curry3=function(e,r,t,n){return r==__?curry3ResolveArg0(e,t,n):t==__?curry3ResolveArg1(e,r,n):curry3ResolveArg2(e,r,t)},iteratorReduceAsync=async function(e,r,t){let n=e.next();if(n.done)return t;for(;!n.done;)t=r(t,n.value),isPromise(t)&&(t=await t),n=e.next();return t},iteratorReduce=function(e,r,t){let n=e.next();if(n.done)return t;for(void 0===t&&(t=n.value,n=e.next());!n.done;){if(t=r(t,n.value),isPromise(t))return t.then(curry3(iteratorReduceAsync,e,r,__));n=e.next()}return t},asyncIteratorReduce=async function(e,r,t){let n=await e.next();if(n.done)return t;for(void 0===t&&(t=n.value,n=await e.next());!n.done;)t=await r(t,n.value),n=await e.next();return t},symbolIterator=Symbol.iterator,symbolAsyncIterator=Symbol.asyncIterator,curry2ResolveArg0=(e,r)=>function(t){return e(t,r)},curry2ResolveArg1=(e,r)=>function(t){return e(r,t)},curry2=function(e,r,t){return r==__?curry2ResolveArg0(e,t):curry2ResolveArg1(e,r)},curryArgs3ResolveArgs0=(e,r,t)=>function(...n){return e(n,r,t)},curryArgs3ResolveArgs1=(e,r,t)=>function(...n){return e(r,n,t)},curryArgs3ResolveArgs2=(e,r,t)=>function(...n){return e(r,t,n)},curryArgs3=function(e,r,t,n){return r==__?curryArgs3ResolveArgs0(e,t,n):t==__?curryArgs3ResolveArgs1(e,r,n):curryArgs3ResolveArgs2(e,r,t)},curry4ResolveArg0=(e,r,t,n)=>function(o){return e(o,r,t,n)},curry4ResolveArg1=(e,r,t,n)=>function(o){return e(r,o,t,n)},curry4ResolveArg2=(e,r,t,n)=>function(o){return e(r,t,o,n)},curry4ResolveArg3=(e,r,t,n)=>function(o){return e(r,t,n,o)},curry4=function(e,r,t,n,o){return r==__?curry4ResolveArg0(e,t,n,o):t==__?curry4ResolveArg1(e,r,n,o):n==__?curry4ResolveArg2(e,r,t,o):curry4ResolveArg3(e,r,t,n)},arrayReduceAsync=async function(e,r,t,n){const o=e.length;for(;++n<o;)t=r(t,e[n],n,e),isPromise(t)&&(t=await t);return t},arrayReduce=function(e,r,t){const n=e.length;let o=-1;for(void 0===t&&(t=e[++o]);++o<n;)if(t=r(t,e[o],o,e),isPromise(t))return t.then(curry4(arrayReduceAsync,e,r,__,o));return t},curry5ResolveArg0=(e,r,t,n,o)=>function(c){return e(c,r,t,n,o)},curry5ResolveArg1=(e,r,t,n,o)=>function(c){return e(r,c,t,n,o)},curry5ResolveArg2=(e,r,t,n,o)=>function(c){return e(r,t,c,n,o)},curry5ResolveArg3=(e,r,t,n,o)=>function(c){return e(r,t,n,c,o)},curry5ResolveArg4=(e,r,t,n,o)=>function(c){return e(r,t,n,o,c)},curry5=function(e,r,t,n,o,c){return r==__?curry5ResolveArg0(e,t,n,o,c):t==__?curry5ResolveArg1(e,r,n,o,c):n==__?curry5ResolveArg2(e,r,t,o,c):o==__?curry5ResolveArg3(e,r,t,n,c):curry5ResolveArg4(e,r,t,n,o)},objectKeys=Object.keys,objectReduceAsync=async function(e,r,t,n,o){const c=n.length;for(;++o<c;){const c=n[o];t=r(t,e[c],c,e),isPromise(t)&&(t=await t)}return t},objectReduce=function(e,r,t){const n=objectKeys(e),o=n.length;let c=-1;for(void 0===t&&(t=e[n[++c]]);++c<o;){const o=n[c];if(t=r(t,e[o],o,e),isPromise(t))return t.then(curry5(objectReduceAsync,e,r,__,n,c))}return t},mapReduceAsync=async function(e,r,t,n){for(const[o,c]of n)t=r(t,c,o,e),isPromise(t)&&(t=await t);return t},mapReduce=function(e,r,t){const n=e.entries();if(void 0===t){const e=n.next();if(e.done)return t;t=e.value[1]}for(const[o,c]of n)if(t=r(t,c,o,e),isPromise(t))return t.then(curry4(mapReduceAsync,e,r,__,n));return t},reducerConcat=(e,r)=>function(t,n){const o=e(t,n);return isPromise(o)?o.then(curry2(r,__,n)):r(o,n)},genericReduce=function(e,r,t){return isArray(e)?arrayReduce(e,r,t):null==e?void 0===t?curry2(r,e,__):r(t,e):e.constructor==Map?mapReduce(e,r,t):"function"==typeof e[symbolIterator]?iteratorReduce(e[symbolIterator](),r,t):"function"==typeof e[symbolAsyncIterator]?asyncIteratorReduce(e[symbolAsyncIterator](),r,t):"function"==typeof e.reduce?e.reduce(r,t):"function"==typeof e.chain?e.chain(curry2(r,t,__)):"function"==typeof e.flatMap?e.flatMap(curry2(r,t,__)):e.constructor==Object?objectReduce(e,r,t):void 0===t?curry2(r,e,__):r(t,e)},arrayPush=function(e,r){return e.push(r),e},FlatMappingIterator=function(e,r){let t=[],n=0;return{[symbolIterator](){return this},next(){if(n<t.length){const e=t[n];return n+=1,{value:e,done:!1}}const o=e.next();if(o.done)return o;const c=genericReduce(r(o.value),arrayPush,[]);return c.length>1&&(t=c,n=1),{value:c[0],done:!1}}}},promiseRace=Promise.race.bind(Promise),sleep=e=>new Promise(r=>{setTimeout(r,e)}),FlatMappingAsyncIterator=function(e,r){const t=[],n=new Set;return{isAsyncIteratorDone:!1,[symbolAsyncIterator](){return this},toString:()=>"[object FlatMappingAsyncIterator]",async next(){for(;!this.isAsyncIteratorDone||t.length>0||n.size>0;){if(!this.isAsyncIteratorDone){const{value:o,done:c}=await e.next();if(c)this.isAsyncIteratorDone=c;else{const e=r(o);if(isPromise(e)){const r=e.then(curry3(genericReduce,__,arrayPush,t)).then(()=>n.delete(r));n.add(r)}else{const r=genericReduce(e,arrayPush,t);if(isPromise(r)){const e=r.then(()=>n.delete(e));n.add(e)}}}}if(t.length>0)return{value:t.shift(),done:!1};n.size>0&&await promiseRace([sleep(1e3),...n])}return{value:void 0,done:!0}}}},always=e=>function(){return e},getArg1=(e,r)=>r,identity=e=>e,promiseAll=Promise.all.bind(Promise),funcConcatSync=(e,r)=>function(...t){return r(e(...t))},asyncIteratorForEach=async function(e,r){const t=[];for await(const n of e){const e=r(n);isPromise(e)&&t.push(e)}return 0==t.length?e:promiseAll(t).then(always(e))},arrayFlatten=function(e){const r=e.length,t=[],n=[];let o=-1;for(;++o<r;){const r=e[o];if(isArray(r)){const e=r.length;let t=-1;for(;++t<e;)n.push(r[t])}else if(null==r)n.push(r);else if("function"==typeof r.then)t.push(r.then(curry2(arrayPush,n,__)));else if("function"==typeof r[symbolIterator])for(const e of r)n.push(e);else if("function"==typeof r[symbolAsyncIterator])t.push(asyncIteratorForEach(r[symbolAsyncIterator](),curry2(arrayPush,n,__)));else if("function"==typeof r.chain){const e=r.chain(identity);isPromise(e)?t.push(e.then(curry2(arrayPush,n,__))):n.push(e)}else if("function"==typeof r.flatMap){const e=r.flatMap(identity);isPromise(e)?t.push(e.then(curry2(arrayPush,n,__))):n.push(e)}else if("function"==typeof r.reduce){const e=r.reduce(funcConcatSync(getArg1,curry2(arrayPush,n,__)),null);isPromise(e)&&t.push(e)}else if(r.constructor==Object)for(const e in r)n.push(r[e]);else n.push(r)}return 0==t.length?n:promiseAll(t).then(always(n))},arrayMap=function(e,r){const t=e.length,n=Array(t);let o=-1,c=!1;for(;++o<t;){const t=r(e[o],o,e);isPromise(t)&&(c=!0),n[o]=t}return c?promiseAll(n):n},arrayFlatMap=function(e,r){const t=arrayMap(e,r);return isPromise(t)?t.then(arrayFlatten):arrayFlatten(t)},promiseObjectAllExecutor=e=>function(r){const t={};let n=0;for(const o in e){const c=e[o];isPromise(c)?(n+=1,c.then((e=>function(o){t[e]=o,n-=1,0==n&&r(t)})(o))):t[o]=c}0==n&&r(t)},promiseObjectAll=e=>new Promise(promiseObjectAllExecutor(e)),objectMap=function(e,r){const t={};let n=!1;for(const o in e){const c=r(e[o],o,e);isPromise(c)&&(n=!0),t[o]=c}return n?promiseObjectAll(t):t},objectAssign=Object.assign,objectFlatten=function(e){const r=[],t={},n=curry2(objectAssign,t,__),o=funcConcatSync(getArg1,n);for(const c in e){const s=e[c];if(null!=s)if("function"==typeof s[symbolIterator])for(const e of s)objectAssign(t,e);else if("function"==typeof s[symbolAsyncIterator])r.push(asyncIteratorForEach(s[symbolAsyncIterator](),n));else if("function"==typeof s.chain){const e=s.chain(identity);isPromise(e)?r.push(e.then(n)):objectAssign(t,e)}else if("function"==typeof s.flatMap){const e=s.flatMap(identity);isPromise(e)?r.push(e.then(n)):n(e)}else if("function"==typeof s.reduce){const e=s.reduce(o,null);isPromise(e)&&r.push(e)}else objectAssign(t,s)}return 0==r.length?t:promiseAll(r).then(()=>t)},objectFlatMap=function(e,r){const t=objectMap(e,r);return isPromise(t)?t.then(objectFlatten):objectFlatten(t)},callPropUnary=(e,r,t)=>e[r](t),setMap=function(e,r){const t=new Set,n=[];for(const o of e){const c=r(o,o,e);isPromise(c)?n.push(c.then(curry3(callPropUnary,t,"add",__))):t.add(c)}return 0==n.length?t:promiseAll(n).then(always(t))},setFlatten=function(e){e.size;const r=[],t=new Set,n=(e,r)=>t.add(r),o=curry3(callPropUnary,t,"add",__);for(const c of e)if(isArray(c)){const e=c.length;let r=-1;for(;++r<e;)t.add(c[r])}else if(null==c)t.add(c);else if("function"==typeof c[symbolIterator])for(const e of c)t.add(e);else if("function"==typeof c[symbolAsyncIterator])r.push(asyncIteratorForEach(c[symbolAsyncIterator](),o));else if("function"==typeof c.chain){const e=c.chain(identity);isPromise(e)?r.push(e.then(o)):t.add(e)}else if("function"==typeof c.flatMap){const e=c.flatMap(identity);isPromise(e)?r.push(e.then(o)):t.add(e)}else if("function"==typeof c.reduce){const e=c.reduce(n,null);isPromise(e)&&r.push(e)}else if(c.constructor==Object)for(const e in c)t.add(c[e]);else t.add(c);return 0==r.length?t:promiseAll(r).then(()=>t)},setFlatMap=function(e,r){const t=setMap(e,r);return isPromise(t)?t.then(setFlatten):setFlatten(t)},funcConcat=(e,r)=>function(...t){const n=e(...t);return isPromise(n)?n.then(r):r(n)},arrayJoin=(e,r)=>e.join(r),arrayFlattenToString=funcConcat(arrayFlatten,curry2(arrayJoin,__,"")),stringFlatMap=function(e,r){const t=arrayMap(e,r);return isPromise(t)?t.then(arrayFlattenToString):arrayFlattenToString(t)},_flatMap=function(e,r){if(isArray(e))return arrayFlatMap(e,r);if(null==e)return r(e);if("function"==typeof e.then)return e.then(r);if("function"==typeof e.next)return symbolIterator in e?FlatMappingIterator(e,r):FlatMappingAsyncIterator(e,r);if("function"==typeof e.chain)return e.chain(r);if("function"==typeof e.flatMap)return e.flatMap(r);const t=e.constructor;return t==Object?objectFlatMap(e,r):t==Set?setFlatMap(e,r):"string"==typeof e||t==String?stringFlatMap(e,r):r(e)},flatMap=(e,r)=>"function"==typeof e?curry2(_flatMap,__,e):isPromise(e)?e.then(curry2(_flatMap,__,r)):_flatMap(e,r);export default flatMap;
8
+ const isPromise=e=>null!=e&&"function"==typeof e.then,isArray=Array.isArray,objectValues=Object.values,objectProto=Object.prototype,nativeObjectToString=objectProto.toString,objectToString=e=>nativeObjectToString.call(e),generatorFunctionTag="[object GeneratorFunction]",isGeneratorFunction=e=>objectToString(e)==generatorFunctionTag,asyncGeneratorFunctionTag="[object AsyncGeneratorFunction]",isAsyncGeneratorFunction=e=>objectToString(e)==asyncGeneratorFunctionTag,__=Symbol.for("placeholder"),curry3ResolveArg0=(e,r,t)=>function(n){return e(n,r,t)},curry3ResolveArg1=(e,r,t)=>function(n){return e(r,n,t)},curry3ResolveArg2=(e,r,t)=>function(n){return e(r,t,n)},curry3=function(e,r,t,n){return r==__?curry3ResolveArg0(e,t,n):t==__?curry3ResolveArg1(e,r,n):curry3ResolveArg2(e,r,t)},iteratorReduceAsync=async function(e,r,t){let n=e.next();if(n.done)return t;for(;!n.done;)t=r(t,n.value),isPromise(t)&&(t=await t),n=e.next();return t},iteratorReduce=function(e,r,t){let n=e.next();if(n.done)return t;for(void 0===t&&(t=n.value,n=e.next());!n.done;){if(t=r(t,n.value),isPromise(t))return t.then(curry3(iteratorReduceAsync,e,r,__));n=e.next()}return t},asyncIteratorReduce=async function(e,r,t){let n=await e.next();if(n.done)return t;for(void 0===t&&(t=n.value,n=await e.next());!n.done;)t=await r(t,n.value),n=await e.next();return t},symbolIterator=Symbol.iterator,symbolAsyncIterator=Symbol.asyncIterator,curry2ResolveArg0=(e,r)=>function(t){return e(t,r)},curry2ResolveArg1=(e,r)=>function(t){return e(r,t)},curry2=function(e,r,t){return r==__?curry2ResolveArg0(e,t):curry2ResolveArg1(e,r)},curryArgs3ResolveArgs0=(e,r,t)=>function(...n){return e(n,r,t)},curryArgs3ResolveArgs1=(e,r,t)=>function(...n){return e(r,n,t)},curryArgs3ResolveArgs2=(e,r,t)=>function(...n){return e(r,t,n)},curryArgs3=function(e,r,t,n){return r==__?curryArgs3ResolveArgs0(e,t,n):t==__?curryArgs3ResolveArgs1(e,r,n):curryArgs3ResolveArgs2(e,r,t)},curry4ResolveArg0=(e,r,t,n)=>function(o){return e(o,r,t,n)},curry4ResolveArg1=(e,r,t,n)=>function(o){return e(r,o,t,n)},curry4ResolveArg2=(e,r,t,n)=>function(o){return e(r,t,o,n)},curry4ResolveArg3=(e,r,t,n)=>function(o){return e(r,t,n,o)},curry4=function(e,r,t,n,o){return r==__?curry4ResolveArg0(e,t,n,o):t==__?curry4ResolveArg1(e,r,n,o):n==__?curry4ResolveArg2(e,r,t,o):curry4ResolveArg3(e,r,t,n)},arrayReduceAsync=async function(e,r,t,n){const o=e.length;for(;++n<o;)t=r(t,e[n],n,e),isPromise(t)&&(t=await t);return t},arrayReduce=function(e,r,t){const n=e.length;let o=-1;for(void 0===t&&(t=e[++o]);++o<n;)if(t=r(t,e[o],o,e),isPromise(t))return t.then(curry4(arrayReduceAsync,e,r,__,o));return t},curry5ResolveArg0=(e,r,t,n,o)=>function(c){return e(c,r,t,n,o)},curry5ResolveArg1=(e,r,t,n,o)=>function(c){return e(r,c,t,n,o)},curry5ResolveArg2=(e,r,t,n,o)=>function(c){return e(r,t,c,n,o)},curry5ResolveArg3=(e,r,t,n,o)=>function(c){return e(r,t,n,c,o)},curry5ResolveArg4=(e,r,t,n,o)=>function(c){return e(r,t,n,o,c)},curry5=function(e,r,t,n,o,c){return r==__?curry5ResolveArg0(e,t,n,o,c):t==__?curry5ResolveArg1(e,r,n,o,c):n==__?curry5ResolveArg2(e,r,t,o,c):o==__?curry5ResolveArg3(e,r,t,n,c):curry5ResolveArg4(e,r,t,n,o)},objectKeys=Object.keys,objectReduceAsync=async function(e,r,t,n,o){const c=n.length;for(;++o<c;){const c=n[o];t=r(t,e[c],c,e),isPromise(t)&&(t=await t)}return t},objectReduce=function(e,r,t){const n=objectKeys(e),o=n.length;let c=-1;for(void 0===t&&(t=e[n[++c]]);++c<o;){const o=n[c];if(t=r(t,e[o],o,e),isPromise(t))return t.then(curry5(objectReduceAsync,e,r,__,n,c))}return t},mapReduceAsync=async function(e,r,t,n){for(const[o,c]of n)t=r(t,c,o,e),isPromise(t)&&(t=await t);return t},mapReduce=function(e,r,t){const n=e.entries();if(void 0===t){const e=n.next();if(e.done)return t;t=e.value[1]}for(const[o,c]of n)if(t=r(t,c,o,e),isPromise(t))return t.then(curry4(mapReduceAsync,e,r,__,n));return t},reducerConcat=(e,r)=>function(t,n){const o=e(t,n);return isPromise(o)?o.then(curry2(r,__,n)):r(o,n)},genericReduce=function(e,r,t){return isArray(e)?arrayReduce(e,r,t):null==e?void 0===t?curry2(r,e,__):r(t,e):e.constructor==Map?mapReduce(e,r,t):"function"==typeof e[symbolIterator]?iteratorReduce(e[symbolIterator](),r,t):"function"==typeof e[symbolAsyncIterator]?asyncIteratorReduce(e[symbolAsyncIterator](),r,t):"function"==typeof e.reduce?e.reduce(r,t):"function"==typeof e.chain?e.chain(curry2(r,t,__)):"function"==typeof e.flatMap?e.flatMap(curry2(r,t,__)):e.constructor==Object?objectReduce(e,r,t):void 0===t?curry2(r,e,__):r(t,e)},arrayPush=function(e,r){return e.push(r),e},FlatMappingIterator=function(e,r){let t=[],n=0;return{[symbolIterator](){return this},next(){if(n<t.length){const e=t[n];return n+=1,{value:e,done:!1}}const o=e.next();if(o.done)return o;const c=genericReduce(r(o.value),arrayPush,[]);return c.length>1&&(t=c,n=1),{value:c[0],done:!1}}}},promiseRace=Promise.race.bind(Promise),sleep=e=>new Promise((r=>{setTimeout(r,e)})),FlatMappingAsyncIterator=function(e,r){const t=[],n=new Set;return{isAsyncIteratorDone:!1,[symbolAsyncIterator](){return this},toString:()=>"[object FlatMappingAsyncIterator]",async next(){for(;!this.isAsyncIteratorDone||t.length>0||n.size>0;){if(!this.isAsyncIteratorDone){const{value:o,done:c}=await e.next();if(c)this.isAsyncIteratorDone=c;else{const e=r(o);if(isPromise(e)){const r=e.then(curry3(genericReduce,__,arrayPush,t)).then((()=>n.delete(r)));n.add(r)}else{const r=genericReduce(e,arrayPush,t);if(isPromise(r)){const e=r.then((()=>n.delete(e)));n.add(e)}}}}if(t.length>0)return{value:t.shift(),done:!1};n.size>0&&await promiseRace([sleep(1e3),...n])}return{value:void 0,done:!0}}}},always=e=>function(){return e},getArg1=(e,r)=>r,identity=e=>e,promiseAll=Promise.all.bind(Promise),funcConcatSync=(e,r)=>function(...t){return r(e(...t))},asyncIteratorForEach=async function(e,r){const t=[];for await(const n of e){const e=r(n);isPromise(e)&&t.push(e)}return 0==t.length?e:promiseAll(t).then(always(e))},arrayFlatten=function(e){const r=e.length,t=[],n=[];let o=-1;for(;++o<r;){const r=e[o];if(isArray(r)){const e=r.length;let t=-1;for(;++t<e;)n.push(r[t])}else if(null==r)n.push(r);else if("function"==typeof r.then)t.push(r.then(curry2(arrayPush,n,__)));else if("function"==typeof r[symbolIterator])for(const e of r)n.push(e);else if("function"==typeof r[symbolAsyncIterator])t.push(asyncIteratorForEach(r[symbolAsyncIterator](),curry2(arrayPush,n,__)));else if("function"==typeof r.chain){const e=r.chain(identity);isPromise(e)?t.push(e.then(curry2(arrayPush,n,__))):n.push(e)}else if("function"==typeof r.flatMap){const e=r.flatMap(identity);isPromise(e)?t.push(e.then(curry2(arrayPush,n,__))):n.push(e)}else if("function"==typeof r.reduce){const e=r.reduce(funcConcatSync(getArg1,curry2(arrayPush,n,__)),null);isPromise(e)&&t.push(e)}else if(r.constructor==Object)for(const e in r)n.push(r[e]);else n.push(r)}return 0==t.length?n:promiseAll(t).then(always(n))},arrayMap=function(e,r){const t=e.length,n=Array(t);let o=-1,c=!1;for(;++o<t;){const t=r(e[o],o,e);isPromise(t)&&(c=!0),n[o]=t}return c?promiseAll(n):n},arrayFlatMap=function(e,r){const t=arrayMap(e,r);return isPromise(t)?t.then(arrayFlatten):arrayFlatten(t)},promiseObjectAllExecutor=e=>function(r){const t={};let n=0;for(const o in e){const c=e[o];isPromise(c)?(n+=1,c.then((e=>function(o){t[e]=o,n-=1,0==n&&r(t)})(o))):t[o]=c}0==n&&r(t)},promiseObjectAll=e=>new Promise(promiseObjectAllExecutor(e)),objectMap=function(e,r){const t={};let n=!1;for(const o in e){const c=r(e[o],o,e);isPromise(c)&&(n=!0),t[o]=c}return n?promiseObjectAll(t):t},objectAssign=Object.assign,objectFlatten=function(e){const r=[],t={},n=curry2(objectAssign,t,__),o=funcConcatSync(getArg1,n);for(const c in e){const s=e[c];if(null!=s)if("function"==typeof s[symbolIterator])for(const e of s)objectAssign(t,e);else if("function"==typeof s[symbolAsyncIterator])r.push(asyncIteratorForEach(s[symbolAsyncIterator](),n));else if("function"==typeof s.chain){const e=s.chain(identity);isPromise(e)?r.push(e.then(n)):objectAssign(t,e)}else if("function"==typeof s.flatMap){const e=s.flatMap(identity);isPromise(e)?r.push(e.then(n)):n(e)}else if("function"==typeof s.reduce){const e=s.reduce(o,null);isPromise(e)&&r.push(e)}else objectAssign(t,s)}return 0==r.length?t:promiseAll(r).then((()=>t))},objectFlatMap=function(e,r){const t=objectMap(e,r);return isPromise(t)?t.then(objectFlatten):objectFlatten(t)},callPropUnary=(e,r,t)=>e[r](t),setMap=function(e,r){const t=new Set,n=[];for(const o of e){const c=r(o,o,e);isPromise(c)?n.push(c.then(curry3(callPropUnary,t,"add",__))):t.add(c)}return 0==n.length?t:promiseAll(n).then(always(t))},setFlatten=function(e){e.size;const r=[],t=new Set,n=(e,r)=>t.add(r),o=curry3(callPropUnary,t,"add",__);for(const c of e)if(isArray(c)){const e=c.length;let r=-1;for(;++r<e;)t.add(c[r])}else if(null==c)t.add(c);else if("function"==typeof c[symbolIterator])for(const e of c)t.add(e);else if("function"==typeof c[symbolAsyncIterator])r.push(asyncIteratorForEach(c[symbolAsyncIterator](),o));else if("function"==typeof c.chain){const e=c.chain(identity);isPromise(e)?r.push(e.then(o)):t.add(e)}else if("function"==typeof c.flatMap){const e=c.flatMap(identity);isPromise(e)?r.push(e.then(o)):t.add(e)}else if("function"==typeof c.reduce){const e=c.reduce(n,null);isPromise(e)&&r.push(e)}else if(c.constructor==Object)for(const e in c)t.add(c[e]);else t.add(c);return 0==r.length?t:promiseAll(r).then((()=>t))},setFlatMap=function(e,r){const t=setMap(e,r);return isPromise(t)?t.then(setFlatten):setFlatten(t)},funcConcat=(e,r)=>function(...t){const n=e(...t);return isPromise(n)?n.then(r):r(n)},arrayJoin=(e,r)=>e.join(r),arrayFlattenToString=funcConcat(arrayFlatten,curry2(arrayJoin,__,"")),stringFlatMap=function(e,r){const t=arrayMap(e,r);return isPromise(t)?t.then(arrayFlattenToString):arrayFlattenToString(t)},_flatMap=function(e,r){if(isArray(e))return arrayFlatMap(e,r);if(null==e)return r(e);if("function"==typeof e.then)return e.then(r);if("function"==typeof e.next)return symbolIterator in e?FlatMappingIterator(e,r):FlatMappingAsyncIterator(e,r);if("function"==typeof e.chain)return e.chain(r);if("function"==typeof e.flatMap)return e.flatMap(r);const t=e.constructor;return t==Object?objectFlatMap(e,r):t==Set?setFlatMap(e,r):"string"==typeof e||t==String?stringFlatMap(e,r):r(e)},flatMap=(e,r)=>"function"==typeof e?curry2(_flatMap,__,e):isPromise(e)?e.then(curry2(_flatMap,__,r)):_flatMap(e,r);export default flatMap;
package/dist/flatMap.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
6
6
  * Rubico may be freely distributed under the CFOSS license.
7
7
  */
8
8
 
9
- !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define(()=>t):n.flatMap=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=n=>null!=n&&"function"==typeof n.then,t=Array.isArray,e=(Object.values,Object.prototype.toString,Symbol.for("placeholder")),o=function(n,t,o,r){return t==e?((n,t,e)=>function(o){return n(o,t,e)})(n,o,r):o==e?((n,t,e)=>function(o){return n(t,o,e)})(n,t,r):((n,t,e)=>function(o){return n(t,e,o)})(n,t,o)},r=async function(t,e,o){let r=t.next();if(r.done)return o;for(;!r.done;)o=e(o,r.value),n(o)&&(o=await o),r=t.next();return o},u=Symbol.iterator,f=Symbol.asyncIterator,c=function(n,t,o){return t==e?((n,t)=>function(e){return n(e,t)})(n,o):((n,t)=>function(e){return n(t,e)})(n,t)},i=function(n,t,o,r,u){return t==e?((n,t,e,o)=>function(r){return n(r,t,e,o)})(n,o,r,u):o==e?((n,t,e,o)=>function(r){return n(t,r,e,o)})(n,t,r,u):r==e?((n,t,e,o)=>function(r){return n(t,e,r,o)})(n,t,o,u):((n,t,e,o)=>function(r){return n(t,e,o,r)})(n,t,o,r)},s=async function(t,e,o,r){const u=t.length;for(;++r<u;)o=e(o,t[r],r,t),n(o)&&(o=await o);return o},l=function(n,t,o,r,u,f){return t==e?((n,t,e,o,r)=>function(u){return n(u,t,e,o,r)})(n,o,r,u,f):o==e?((n,t,e,o,r)=>function(u){return n(t,u,e,o,r)})(n,t,r,u,f):r==e?((n,t,e,o,r)=>function(u){return n(t,e,u,o,r)})(n,t,o,u,f):u==e?((n,t,e,o,r)=>function(u){return n(t,e,o,u,r)})(n,t,o,r,f):((n,t,e,o,r)=>function(u){return n(t,e,o,r,u)})(n,t,o,r,u)},a=Object.keys,h=async function(t,e,o,r,u){const f=r.length;for(;++u<f;){const f=r[u];o=e(o,t[f],f,t),n(o)&&(o=await o)}return o},p=async function(t,e,o,r){for(const[u,f]of r)o=e(o,f,u,t),n(o)&&(o=await o);return o},d=function(d,y,g){return t(d)?function(t,o,r){const u=t.length;let f=-1;for(void 0===r&&(r=t[++f]);++f<u;)if(r=o(r,t[f],f,t),n(r))return r.then(i(s,t,o,e,f));return r}(d,y,g):null==d?void 0===g?c(y,d,e):y(g,d):d.constructor==Map?function(t,o,r){const u=t.entries();if(void 0===r){const n=u.next();if(n.done)return r;r=n.value[1]}for(const[f,c]of u)if(r=o(r,c,f,t),n(r))return r.then(i(p,t,o,e,u));return r}(d,y,g):"function"==typeof d[u]?function(t,u,f){let c=t.next();if(c.done)return f;for(void 0===f&&(f=c.value,c=t.next());!c.done;){if(f=u(f,c.value),n(f))return f.then(o(r,t,u,e));c=t.next()}return f}(d[u](),y,g):"function"==typeof d[f]?async function(n,t,e){let o=await n.next();if(o.done)return e;for(void 0===e&&(e=o.value,o=await n.next());!o.done;)e=await t(e,o.value),o=await n.next();return e}(d[f](),y,g):"function"==typeof d.reduce?d.reduce(y,g):"function"==typeof d.chain?d.chain(c(y,g,e)):"function"==typeof d.flatMap?d.flatMap(c(y,g,e)):d.constructor==Object?function(t,o,r){const u=a(t),f=u.length;let c=-1;for(void 0===r&&(r=t[u[++c]]);++c<f;){const f=u[c];if(r=o(r,t[f],f,t),n(r))return r.then(l(h,t,o,e,u,c))}return r}(d,y,g):void 0===g?c(y,d,e):y(g,d)},y=function(n,t){return n.push(t),n},g=Promise.race.bind(Promise),v=n=>new Promise(t=>{setTimeout(t,n)}),b=n=>function(){return n},w=(n,t)=>t,x=n=>n,M=Promise.all.bind(Promise),j=(n,t)=>function(...e){return t(n(...e))},m=async function(t,e){const o=[];for await(const r of t){const t=e(r);n(t)&&o.push(t)}return 0==o.length?t:M(o).then(b(t))},S=function(o){const r=o.length,i=[],s=[];let l=-1;for(;++l<r;){const r=o[l];if(t(r)){const n=r.length;let t=-1;for(;++t<n;)s.push(r[t])}else if(null==r)s.push(r);else if("function"==typeof r.then)i.push(r.then(c(y,s,e)));else if("function"==typeof r[u])for(const n of r)s.push(n);else if("function"==typeof r[f])i.push(m(r[f](),c(y,s,e)));else if("function"==typeof r.chain){const t=r.chain(x);n(t)?i.push(t.then(c(y,s,e))):s.push(t)}else if("function"==typeof r.flatMap){const t=r.flatMap(x);n(t)?i.push(t.then(c(y,s,e))):s.push(t)}else if("function"==typeof r.reduce){const t=r.reduce(j(w,c(y,s,e)),null);n(t)&&i.push(t)}else if(r.constructor==Object)for(const n in r)s.push(r[n]);else s.push(r)}return 0==i.length?s:M(i).then(b(s))},A=function(t,e){const o=t.length,r=Array(o);let u=-1,f=!1;for(;++u<o;){const o=e(t[u],u,t);n(o)&&(f=!0),r[u]=o}return f?M(r):r},O=t=>new Promise((t=>function(e){const o={};let r=0;for(const u in t){const f=t[u];n(f)?(r+=1,f.then((n=>function(t){o[n]=t,r-=1,0==r&&e(o)})(u))):o[u]=f}0==r&&e(o)})(t)),I=Object.assign,P=function(t){const o=[],r={},i=c(I,r,e),s=j(w,i);for(const e in t){const c=t[e];if(null!=c)if("function"==typeof c[u])for(const n of c)I(r,n);else if("function"==typeof c[f])o.push(m(c[f](),i));else if("function"==typeof c.chain){const t=c.chain(x);n(t)?o.push(t.then(i)):I(r,t)}else if("function"==typeof c.flatMap){const t=c.flatMap(x);n(t)?o.push(t.then(i)):i(t)}else if("function"==typeof c.reduce){const t=c.reduce(s,null);n(t)&&o.push(t)}else I(r,c)}return 0==o.length?r:M(o).then(()=>r)},D=function(t,e){const o=function(t,e){const o={};let r=!1;for(const u in t){const f=e(t[u],u,t);n(f)&&(r=!0),o[u]=f}return r?O(o):o}(t,e);return n(o)?o.then(P):P(o)},z=(n,t,e)=>n[t](e),T=function(r){r.size;const c=[],i=new Set,s=(n,t)=>i.add(t),l=o(z,i,"add",e);for(const e of r)if(t(e)){const n=e.length;let t=-1;for(;++t<n;)i.add(e[t])}else if(null==e)i.add(e);else if("function"==typeof e[u])for(const n of e)i.add(n);else if("function"==typeof e[f])c.push(m(e[f](),l));else if("function"==typeof e.chain){const t=e.chain(x);n(t)?c.push(t.then(l)):i.add(t)}else if("function"==typeof e.flatMap){const t=e.flatMap(x);n(t)?c.push(t.then(l)):i.add(t)}else if("function"==typeof e.reduce){const t=e.reduce(s,null);n(t)&&c.push(t)}else if(e.constructor==Object)for(const n in e)i.add(e[n]);else i.add(e);return 0==c.length?i:M(c).then(()=>i)},k=function(t,r){const u=function(t,r){const u=new Set,f=[];for(const c of t){const i=r(c,c,t);n(i)?f.push(i.then(o(z,u,"add",e))):u.add(i)}return 0==f.length?u:M(f).then(b(u))}(t,r);return n(u)?u.then(T):T(u)},F=(q=S,B=c((n,t)=>n.join(t),e,""),function(...t){const e=q(...t);return n(e)?e.then(B):B(e)});var q,B;const C=function(r,c){if(t(r))return function(t,e){const o=A(t,e);return n(o)?o.then(S):S(o)}(r,c);if(null==r)return c(r);if("function"==typeof r.then)return r.then(c);if("function"==typeof r.next)return u in r?function(n,t){let e=[],o=0;return{[u](){return this},next(){if(o<e.length){const n=e[o];return o+=1,{value:n,done:!1}}const r=n.next();if(r.done)return r;const u=d(t(r.value),y,[]);return u.length>1&&(e=u,o=1),{value:u[0],done:!1}}}}(r,c):function(t,r){const u=[],c=new Set;return{isAsyncIteratorDone:!1,[f](){return this},toString:()=>"[object FlatMappingAsyncIterator]",async next(){for(;!this.isAsyncIteratorDone||u.length>0||c.size>0;){if(!this.isAsyncIteratorDone){const{value:f,done:i}=await t.next();if(i)this.isAsyncIteratorDone=i;else{const t=r(f);if(n(t)){const n=t.then(o(d,e,y,u)).then(()=>c.delete(n));c.add(n)}else{const e=d(t,y,u);if(n(e)){const n=e.then(()=>c.delete(n));c.add(n)}}}}if(u.length>0)return{value:u.shift(),done:!1};c.size>0&&await g([v(1e3),...c])}return{value:void 0,done:!0}}}}(r,c);if("function"==typeof r.chain)return r.chain(c);if("function"==typeof r.flatMap)return r.flatMap(c);const i=r.constructor;return i==Object?D(r,c):i==Set?k(r,c):"string"==typeof r||i==String?function(t,e){const o=A(t,e);return n(o)?o.then(F):F(o)}(r,c):c(r)};return(t,o)=>"function"==typeof t?c(C,e,t):n(t)?t.then(c(C,e,o)):C(t,o)}());
9
+ !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define((()=>t)):n.flatMap=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=n=>null!=n&&"function"==typeof n.then,t=Array.isArray,e=(Object.values,Object.prototype.toString,Symbol.for("placeholder")),o=function(n,t,o,r){return t==e?((n,t,e)=>function(o){return n(o,t,e)})(n,o,r):o==e?((n,t,e)=>function(o){return n(t,o,e)})(n,t,r):((n,t,e)=>function(o){return n(t,e,o)})(n,t,o)},r=async function(t,e,o){let r=t.next();if(r.done)return o;for(;!r.done;)o=e(o,r.value),n(o)&&(o=await o),r=t.next();return o},u=Symbol.iterator,f=Symbol.asyncIterator,c=function(n,t,o){return t==e?((n,t)=>function(e){return n(e,t)})(n,o):((n,t)=>function(e){return n(t,e)})(n,t)},i=function(n,t,o,r,u){return t==e?((n,t,e,o)=>function(r){return n(r,t,e,o)})(n,o,r,u):o==e?((n,t,e,o)=>function(r){return n(t,r,e,o)})(n,t,r,u):r==e?((n,t,e,o)=>function(r){return n(t,e,r,o)})(n,t,o,u):((n,t,e,o)=>function(r){return n(t,e,o,r)})(n,t,o,r)},s=async function(t,e,o,r){const u=t.length;for(;++r<u;)o=e(o,t[r],r,t),n(o)&&(o=await o);return o},l=Object.keys,a=async function(t,e,o,r,u){const f=r.length;for(;++u<f;){const f=r[u];o=e(o,t[f],f,t),n(o)&&(o=await o)}return o},h=async function(t,e,o,r){for(const[u,f]of r)o=e(o,f,u,t),n(o)&&(o=await o);return o},p=function(p,d,y){return t(p)?function(t,o,r){const u=t.length;let f=-1;for(void 0===r&&(r=t[++f]);++f<u;)if(r=o(r,t[f],f,t),n(r))return r.then(i(s,t,o,e,f));return r}(p,d,y):null==p?void 0===y?c(d,p,e):d(y,p):p.constructor==Map?function(t,o,r){const u=t.entries();if(void 0===r){const n=u.next();if(n.done)return r;r=n.value[1]}for(const[f,c]of u)if(r=o(r,c,f,t),n(r))return r.then(i(h,t,o,e,u));return r}(p,d,y):"function"==typeof p[u]?function(t,u,f){let c=t.next();if(c.done)return f;for(void 0===f&&(f=c.value,c=t.next());!c.done;){if(f=u(f,c.value),n(f))return f.then(o(r,t,u,e));c=t.next()}return f}(p[u](),d,y):"function"==typeof p[f]?async function(n,t,e){let o=await n.next();if(o.done)return e;for(void 0===e&&(e=o.value,o=await n.next());!o.done;)e=await t(e,o.value),o=await n.next();return e}(p[f](),d,y):"function"==typeof p.reduce?p.reduce(d,y):"function"==typeof p.chain?p.chain(c(d,y,e)):"function"==typeof p.flatMap?p.flatMap(c(d,y,e)):p.constructor==Object?function(t,o,r){const u=l(t),f=u.length;let c=-1;for(void 0===r&&(r=t[u[++c]]);++c<f;){const f=u[c];if(r=o(r,t[f],f,t),n(r))return r.then((i=a,h=o,p=e,d=u,y=c,(s=t)==e?((n,t,e,o,r)=>function(u){return n(u,t,e,o,r)})(i,h,p,d,y):h==e?((n,t,e,o,r)=>function(u){return n(t,u,e,o,r)})(i,s,p,d,y):p==e?((n,t,e,o,r)=>function(u){return n(t,e,u,o,r)})(i,s,h,d,y):d==e?((n,t,e,o,r)=>function(u){return n(t,e,o,u,r)})(i,s,h,p,y):((n,t,e,o,r)=>function(u){return n(t,e,o,r,u)})(i,s,h,p,d)))}var i,s,h,p,d,y;return r}(p,d,y):void 0===y?c(d,p,e):d(y,p)},d=function(n,t){return n.push(t),n},y=Promise.race.bind(Promise),g=n=>new Promise((t=>{setTimeout(t,n)})),v=n=>function(){return n},b=(n,t)=>t,w=n=>n,x=Promise.all.bind(Promise),M=(n,t)=>function(...e){return t(n(...e))},j=async function(t,e){const o=[];for await(const r of t){const t=e(r);n(t)&&o.push(t)}return 0==o.length?t:x(o).then(v(t))},m=function(o){const r=o.length,i=[],s=[];let l=-1;for(;++l<r;){const r=o[l];if(t(r)){const n=r.length;let t=-1;for(;++t<n;)s.push(r[t])}else if(null==r)s.push(r);else if("function"==typeof r.then)i.push(r.then(c(d,s,e)));else if("function"==typeof r[u])for(const n of r)s.push(n);else if("function"==typeof r[f])i.push(j(r[f](),c(d,s,e)));else if("function"==typeof r.chain){const t=r.chain(w);n(t)?i.push(t.then(c(d,s,e))):s.push(t)}else if("function"==typeof r.flatMap){const t=r.flatMap(w);n(t)?i.push(t.then(c(d,s,e))):s.push(t)}else if("function"==typeof r.reduce){const t=r.reduce(M(b,c(d,s,e)),null);n(t)&&i.push(t)}else if(r.constructor==Object)for(const n in r)s.push(r[n]);else s.push(r)}return 0==i.length?s:x(i).then(v(s))},S=function(t,e){const o=t.length,r=Array(o);let u=-1,f=!1;for(;++u<o;){const o=e(t[u],u,t);n(o)&&(f=!0),r[u]=o}return f?x(r):r},A=t=>new Promise((t=>function(e){const o={};let r=0;for(const u in t){const f=t[u];n(f)?(r+=1,f.then((n=>function(t){o[n]=t,r-=1,0==r&&e(o)})(u))):o[u]=f}0==r&&e(o)})(t)),O=Object.assign,I=function(t){const o=[],r={},i=c(O,r,e),s=M(b,i);for(const e in t){const c=t[e];if(null!=c)if("function"==typeof c[u])for(const n of c)O(r,n);else if("function"==typeof c[f])o.push(j(c[f](),i));else if("function"==typeof c.chain){const t=c.chain(w);n(t)?o.push(t.then(i)):O(r,t)}else if("function"==typeof c.flatMap){const t=c.flatMap(w);n(t)?o.push(t.then(i)):i(t)}else if("function"==typeof c.reduce){const t=c.reduce(s,null);n(t)&&o.push(t)}else O(r,c)}return 0==o.length?r:x(o).then((()=>r))},P=function(t,e){const o=function(t,e){const o={};let r=!1;for(const u in t){const f=e(t[u],u,t);n(f)&&(r=!0),o[u]=f}return r?A(o):o}(t,e);return n(o)?o.then(I):I(o)},D=(n,t,e)=>n[t](e),z=function(r){r.size;const c=[],i=new Set,s=(n,t)=>i.add(t),l=o(D,i,"add",e);for(const e of r)if(t(e)){const n=e.length;let t=-1;for(;++t<n;)i.add(e[t])}else if(null==e)i.add(e);else if("function"==typeof e[u])for(const n of e)i.add(n);else if("function"==typeof e[f])c.push(j(e[f](),l));else if("function"==typeof e.chain){const t=e.chain(w);n(t)?c.push(t.then(l)):i.add(t)}else if("function"==typeof e.flatMap){const t=e.flatMap(w);n(t)?c.push(t.then(l)):i.add(t)}else if("function"==typeof e.reduce){const t=e.reduce(s,null);n(t)&&c.push(t)}else if(e.constructor==Object)for(const n in e)i.add(e[n]);else i.add(e);return 0==c.length?i:x(c).then((()=>i))},T=function(t,r){const u=function(t,r){const u=new Set,f=[];for(const c of t){const i=r(c,c,t);n(i)?f.push(i.then(o(D,u,"add",e))):u.add(i)}return 0==f.length?u:x(f).then(v(u))}(t,r);return n(u)?u.then(z):z(u)},k=(F=m,q=c(((n,t)=>n.join(t)),e,""),function(...t){const e=F(...t);return n(e)?e.then(q):q(e)});var F,q;const B=function(r,c){if(t(r))return function(t,e){const o=S(t,e);return n(o)?o.then(m):m(o)}(r,c);if(null==r)return c(r);if("function"==typeof r.then)return r.then(c);if("function"==typeof r.next)return u in r?function(n,t){let e=[],o=0;return{[u](){return this},next(){if(o<e.length){const n=e[o];return o+=1,{value:n,done:!1}}const r=n.next();if(r.done)return r;const u=p(t(r.value),d,[]);return u.length>1&&(e=u,o=1),{value:u[0],done:!1}}}}(r,c):function(t,r){const u=[],c=new Set;return{isAsyncIteratorDone:!1,[f](){return this},toString:()=>"[object FlatMappingAsyncIterator]",async next(){for(;!this.isAsyncIteratorDone||u.length>0||c.size>0;){if(!this.isAsyncIteratorDone){const{value:f,done:i}=await t.next();if(i)this.isAsyncIteratorDone=i;else{const t=r(f);if(n(t)){const n=t.then(o(p,e,d,u)).then((()=>c.delete(n)));c.add(n)}else{const e=p(t,d,u);if(n(e)){const n=e.then((()=>c.delete(n)));c.add(n)}}}}if(u.length>0)return{value:u.shift(),done:!1};c.size>0&&await y([g(1e3),...c])}return{value:void 0,done:!0}}}}(r,c);if("function"==typeof r.chain)return r.chain(c);if("function"==typeof r.flatMap)return r.flatMap(c);const i=r.constructor;return i==Object?P(r,c):i==Set?T(r,c):"string"==typeof r||i==String?function(t,e){const o=S(t,e);return n(o)?o.then(k):k(o)}(r,c):c(r)};return(t,o)=>"function"==typeof t?c(B,e,t):n(t)?t.then(c(B,e,o)):B(t,o)}());
package/dist/flatMap.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/forEach.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
6
6
  * Rubico may be freely distributed under the CFOSS license.
7
7
  */
8
8
 
9
- !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define(()=>t):n.forEach=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=n=>null!=n&&"function"==typeof n.then,t=Symbol.for("placeholder"),o=function(n,o,r){return o==t?((n,t)=>function(o){return n(o,t)})(n,r):((n,t)=>function(o){return n(t,o)})(n,o)},r=Array.isArray,e=(Object.prototype.toString,Promise.all.bind(Promise)),c=n=>function(){return n},u=Symbol.iterator,f=Symbol.asyncIterator,i=(n,t,o,r)=>function(){return n(t,o,r)},s=async function(t,o,r){const e=t.length;for(;++r<e;){const e=o(t[r]);n(e)&&await e}return t},l=async function(t,o,r){for(const e in t){if(e in r)continue;const c=o(t[e]);n(c)&&await c}return t},a=(n,t,o)=>function(){return n(t,o)},h=async function(t,o){let r=t.next();for(;!r.done;){const e=o(r.value);n(e)&&await e,r=t.next()}return t},y=function(t,o){return r(t)?function(t,o){const r=t.length,u=[];let f=-1;for(;++f<r;){const r=o(t[f],f,t);n(r)&&u.push(r)}return 0==u.length?t:e(u).then(c(t))}(t,o):null==t?t:"function"==typeof t.forEach?(t.forEach(o),t):"function"==typeof t[u]?function(t,o){const r=[];for(const e of t){const t=o(e);n(t)&&r.push(t)}return 0==r.length?t:e(r).then(c(t))}(t[u](),o):"function"==typeof t[f]?async function(t,o){const r=[];for await(const e of t){const t=o(e);n(t)&&r.push(t)}return 0==r.length?t:e(r).then(c(t))}(t[f](),o):t.constructor==Object?function(t,o){const r=[];for(const e in t){const c=o(t[e],e,t);n(c)&&r.push(c)}return 0==r.length?t:e(r).then(c(t))}(t,o):t},p=function(r,e){return"function"==typeof r?o(y,t,r):n(r)?r.then(o(y,t,e)):y(r,e)},b=function(t,o){if(r(t))return function(t,o){const r=t.length;let e=-1;for(;++e<r;){const r=o(t[e],e,t);if(n(r))return r.then(i(s,t,o,e))}return t}(t,o);if(null==t)throw new TypeError(`invalid collection ${t}`);if("function"==typeof t[u])return function(t,o){let r=t.next();for(;!t.done;){const e=o(r.value);if(n(e))return e.then(a(h,t,o));r=t.next()}return t}(t[u](),o);if("function"==typeof t[f])return async function(t,o){for await(const r of t){const t=o(r);n(t)&&await t}return t}(t[f](),o);if(t.constructor==Object)return function(t,o){const r={};for(const e in t){r[e]=!0;const c=o(t[e],e,t);if(n(c))return c.then(i(l,t,o,r))}return t}(t,o);throw new TypeError(`invalid collection ${t}`)};return p.series=function(r,e){return"function"==typeof r?o(b,t,r):n(r)?r.then(o(b,t,e)):b(r,e)},p}());
9
+ !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define((()=>t)):n.forEach=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=n=>null!=n&&"function"==typeof n.then,t=Symbol.for("placeholder"),o=function(n,o,r){return o==t?((n,t)=>function(o){return n(o,t)})(n,r):((n,t)=>function(o){return n(t,o)})(n,o)},r=Array.isArray,e=(Object.prototype.toString,Promise.all.bind(Promise)),c=n=>function(){return n},u=Symbol.iterator,f=Symbol.asyncIterator,i=(n,t,o,r)=>function(){return n(t,o,r)},s=async function(t,o,r){const e=t.length;for(;++r<e;){const e=o(t[r]);n(e)&&await e}return t},l=async function(t,o,r){for(const e in t){if(e in r)continue;const c=o(t[e]);n(c)&&await c}return t},a=(n,t,o)=>function(){return n(t,o)},h=async function(t,o){let r=t.next();for(;!r.done;){const e=o(r.value);n(e)&&await e,r=t.next()}return t},y=function(t,o){return r(t)?function(t,o){const r=t.length,u=[];let f=-1;for(;++f<r;){const r=o(t[f],f,t);n(r)&&u.push(r)}return 0==u.length?t:e(u).then(c(t))}(t,o):null==t?t:"function"==typeof t.forEach?(t.forEach(o),t):"function"==typeof t[u]?function(t,o){const r=[];for(const e of t){const t=o(e);n(t)&&r.push(t)}return 0==r.length?t:e(r).then(c(t))}(t[u](),o):"function"==typeof t[f]?async function(t,o){const r=[];for await(const e of t){const t=o(e);n(t)&&r.push(t)}return 0==r.length?t:e(r).then(c(t))}(t[f](),o):t.constructor==Object?function(t,o){const r=[];for(const e in t){const c=o(t[e],e,t);n(c)&&r.push(c)}return 0==r.length?t:e(r).then(c(t))}(t,o):t},p=function(r,e){return"function"==typeof r?o(y,t,r):n(r)?r.then(o(y,t,e)):y(r,e)},b=function(t,o){if(r(t))return function(t,o){const r=t.length;let e=-1;for(;++e<r;){const r=o(t[e],e,t);if(n(r))return r.then(i(s,t,o,e))}return t}(t,o);if(null==t)throw new TypeError(`invalid collection ${t}`);if("function"==typeof t[u])return function(t,o){let r=t.next();for(;!t.done;){const e=o(r.value);if(n(e))return e.then(a(h,t,o));r=t.next()}return t}(t[u](),o);if("function"==typeof t[f])return async function(t,o){for await(const r of t){const t=o(r);n(t)&&await t}return t}(t[f](),o);if(t.constructor==Object)return function(t,o){const r={};for(const e in t){r[e]=!0;const c=o(t[e],e,t);if(n(c))return c.then(i(l,t,o,r))}return t}(t,o);throw new TypeError(`invalid collection ${t}`)};return p.series=function(r,e){return"function"==typeof r?o(b,t,r):n(r)?r.then(o(b,t,e)):b(r,e)},p}());
package/dist/forEach.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/get.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/get.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/get.min.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
6
6
  * Rubico may be freely distributed under the CFOSS license.
7
7
  */
8
8
 
9
- !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define(()=>t):n.get=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=Symbol.for("placeholder"),t=function(t,e,o,r){return e==n?((n,t,e)=>function(o){return n(o,t,e)})(t,o,r):o==n?((n,t,e)=>function(o){return n(t,o,e)})(t,e,r):((n,t,e)=>function(o){return n(t,e,o)})(t,e,o)},e=Array.isArray,o=/[.|[|\]]+/,r=function(n,t){const e=new Map,o=function(o){if(e.has(o))return e.get(o);const r=n(o);return e.set(o,r),e.size>t&&e.clear(),r};return o.cache=e,o}(function(n){const t=n.length-1,e="["==n[0],r="]"==n[t];return e&&r?n.slice(1,t).split(o):e?n.slice(1).split(o):r?n.slice(0,t).split(o):n.split(o)},500),i=function(n,t){const o=(n=>e(n)?n:"string"==typeof n?r(n):[n])(t),i=o.length;let u=-1,c=n;for(;++u<i;)if(c=c[o[u]],null==c)return;return c},u=function(n,t,e){const o=null==n?void 0:i(n,t);return void 0===o?"function"==typeof e?e(n):e:o};return function(o,r,i){return"string"==typeof o||"number"==typeof o||e(o)?t(u,n,o,r):null!=(c=o)&&"function"==typeof c.then?o.then(t(u,n,r,i)):u(o,r,i);var c}}());
9
+ !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define((()=>t)):n.get=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=Symbol.for("placeholder"),t=function(t,e,o,r){return e==n?((n,t,e)=>function(o){return n(o,t,e)})(t,o,r):o==n?((n,t,e)=>function(o){return n(t,o,e)})(t,e,r):((n,t,e)=>function(o){return n(t,e,o)})(t,e,o)},e=Array.isArray,o=/[.|[|\]]+/,r=function(n,t){const e=new Map,o=function(o){if(e.has(o))return e.get(o);const r=n(o);return e.set(o,r),e.size>t&&e.clear(),r};return o.cache=e,o}((function(n){const t=n.length-1,e="["==n[0],r="]"==n[t];return e&&r?n.slice(1,t).split(o):e?n.slice(1).split(o):r?n.slice(0,t).split(o):n.split(o)}),500),i=function(n,t){const o=(n=>e(n)?n:"string"==typeof n?r(n):[n])(t),i=o.length;let u=-1,c=n;for(;++u<i;)if(c=c[o[u]],null==c)return;return c},u=function(n,t,e){const o=null==n?void 0:i(n,t);return void 0===o?"function"==typeof e?e(n):e:o};return function(o,r,i){return"string"==typeof o||"number"==typeof o||e(o)?t(u,n,o,r):null!=(c=o)&&"function"==typeof c.then?o.then(t(u,n,r,i)):u(o,r,i);var c}}());
package/dist/get.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/gt.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/gt.es.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/gt.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/gt.min.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
6
6
  * Rubico may be freely distributed under the CFOSS license.
7
7
  */
8
8
 
9
- !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define(()=>t):n.gt=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=n=>null!=n&&"function"==typeof n.then,t=Array.isArray,e=function(e){if(t(e)){const t=e.length;let o=-1;for(;++o<t;){const t=e[o];if(n(t))return!0}return!1}for(const t in e){const o=e[t];if(n(o))return!0}return!1},o=Symbol.for("placeholder"),r=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(r){return n(t,e,o,r)})(n,t,e,r)},u=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(...r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(...r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(...r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(...r){return n(t,e,o,r)})(n,t,e,r)},f=n=>function([t,e]){return n(t,e)},i=Promise.all.bind(Promise),c=function(t,e,o,r){const u=o(...t),c=r(...t);return n(u)||n(c)?i([u,c]).then(f(e)):e(u,c)},l=function(t,e,o,r){const u=o(...t);return n(u)||n(r)?i([u,r]).then(f(e)):e(u,r)},s=function(t,e,o,r){const u=r(...t);return n(o)||n(u)?i([o,u]).then(f(e)):e(o,u)};var h;return h=(n,t)=>n>t,function(...t){const p=t.pop(),y=t.pop(),a="function"==typeof y,g="function"==typeof p;return a&&g?0==t.length?u(c,o,h,y,p):e(t)?i(t).then(r(c,o,h,y,p)):c(t,h,y,p):a?0==t.length?u(l,o,h,y,p):e(t)?i(t).then(r(l,o,h,y,p)):l(t,h,y,p):g?0==t.length?u(s,o,h,y,p):e(t)?i(t).then(r(s,o,h,y,p)):s(t,h,y,p):n(y)||n(p)?i([y,p]).then(f(h)):h(y,p)}}());
9
+ !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define((()=>t)):n.gt=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=n=>null!=n&&"function"==typeof n.then,t=Array.isArray,e=function(e){if(t(e)){const t=e.length;let o=-1;for(;++o<t;){const t=e[o];if(n(t))return!0}return!1}for(const t in e){const o=e[t];if(n(o))return!0}return!1},o=Symbol.for("placeholder"),r=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(r){return n(t,e,o,r)})(n,t,e,r)},u=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(...r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(...r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(...r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(...r){return n(t,e,o,r)})(n,t,e,r)},f=n=>function([t,e]){return n(t,e)},i=Promise.all.bind(Promise),c=function(t,e,o,r){const u=o(...t),c=r(...t);return n(u)||n(c)?i([u,c]).then(f(e)):e(u,c)},l=function(t,e,o,r){const u=o(...t);return n(u)||n(r)?i([u,r]).then(f(e)):e(u,r)},s=function(t,e,o,r){const u=r(...t);return n(o)||n(u)?i([o,u]).then(f(e)):e(o,u)};var h;return h=(n,t)=>n>t,function(...t){const p=t.pop(),y=t.pop(),a="function"==typeof y,g="function"==typeof p;return a&&g?0==t.length?u(c,o,h,y,p):e(t)?i(t).then(r(c,o,h,y,p)):c(t,h,y,p):a?0==t.length?u(l,o,h,y,p):e(t)?i(t).then(r(l,o,h,y,p)):l(t,h,y,p):g?0==t.length?u(s,o,h,y,p):e(t)?i(t).then(r(s,o,h,y,p)):s(t,h,y,p):n(y)||n(p)?i([y,p]).then(f(h)):h(y,p)}}());
package/dist/gt.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/gte.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/gte.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/gte.min.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
6
6
  * Rubico may be freely distributed under the CFOSS license.
7
7
  */
8
8
 
9
- !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define(()=>t):n.gte=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=n=>null!=n&&"function"==typeof n.then,t=Array.isArray,e=function(e){if(t(e)){const t=e.length;let o=-1;for(;++o<t;){const t=e[o];if(n(t))return!0}return!1}for(const t in e){const o=e[t];if(n(o))return!0}return!1},o=Symbol.for("placeholder"),r=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(r){return n(t,e,o,r)})(n,t,e,r)},u=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(...r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(...r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(...r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(...r){return n(t,e,o,r)})(n,t,e,r)},f=n=>function([t,e]){return n(t,e)},i=Promise.all.bind(Promise),c=function(t,e,o,r){const u=o(...t),c=r(...t);return n(u)||n(c)?i([u,c]).then(f(e)):e(u,c)},l=function(t,e,o,r){const u=o(...t);return n(u)||n(r)?i([u,r]).then(f(e)):e(u,r)},s=function(t,e,o,r){const u=r(...t);return n(o)||n(u)?i([o,u]).then(f(e)):e(o,u)};var h;return h=(n,t)=>n>=t,function(...t){const p=t.pop(),y=t.pop(),a="function"==typeof y,g="function"==typeof p;return a&&g?0==t.length?u(c,o,h,y,p):e(t)?i(t).then(r(c,o,h,y,p)):c(t,h,y,p):a?0==t.length?u(l,o,h,y,p):e(t)?i(t).then(r(l,o,h,y,p)):l(t,h,y,p):g?0==t.length?u(s,o,h,y,p):e(t)?i(t).then(r(s,o,h,y,p)):s(t,h,y,p):n(y)||n(p)?i([y,p]).then(f(h)):h(y,p)}}());
9
+ !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define((()=>t)):n.gte=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=n=>null!=n&&"function"==typeof n.then,t=Array.isArray,e=function(e){if(t(e)){const t=e.length;let o=-1;for(;++o<t;){const t=e[o];if(n(t))return!0}return!1}for(const t in e){const o=e[t];if(n(o))return!0}return!1},o=Symbol.for("placeholder"),r=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(r){return n(t,e,o,r)})(n,t,e,r)},u=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(...r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(...r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(...r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(...r){return n(t,e,o,r)})(n,t,e,r)},f=n=>function([t,e]){return n(t,e)},i=Promise.all.bind(Promise),c=function(t,e,o,r){const u=o(...t),c=r(...t);return n(u)||n(c)?i([u,c]).then(f(e)):e(u,c)},l=function(t,e,o,r){const u=o(...t);return n(u)||n(r)?i([u,r]).then(f(e)):e(u,r)},s=function(t,e,o,r){const u=r(...t);return n(o)||n(u)?i([o,u]).then(f(e)):e(o,u)};var h;return h=(n,t)=>n>=t,function(...t){const p=t.pop(),y=t.pop(),a="function"==typeof y,g="function"==typeof p;return a&&g?0==t.length?u(c,o,h,y,p):e(t)?i(t).then(r(c,o,h,y,p)):c(t,h,y,p):a?0==t.length?u(l,o,h,y,p):e(t)?i(t).then(r(l,o,h,y,p)):l(t,h,y,p):g?0==t.length?u(s,o,h,y,p):e(t)?i(t).then(r(s,o,h,y,p)):s(t,h,y,p):n(y)||n(p)?i([y,p]).then(f(h)):h(y,p)}}());
package/dist/gte.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/lt.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/lt.es.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/lt.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/lt.min.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
6
6
  * Rubico may be freely distributed under the CFOSS license.
7
7
  */
8
8
 
9
- !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define(()=>t):n.lt=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=n=>null!=n&&"function"==typeof n.then,t=Array.isArray,e=function(e){if(t(e)){const t=e.length;let o=-1;for(;++o<t;){const t=e[o];if(n(t))return!0}return!1}for(const t in e){const o=e[t];if(n(o))return!0}return!1},o=Symbol.for("placeholder"),r=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(r){return n(t,e,o,r)})(n,t,e,r)},u=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(...r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(...r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(...r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(...r){return n(t,e,o,r)})(n,t,e,r)},f=n=>function([t,e]){return n(t,e)},i=Promise.all.bind(Promise),c=function(t,e,o,r){const u=o(...t),c=r(...t);return n(u)||n(c)?i([u,c]).then(f(e)):e(u,c)},l=function(t,e,o,r){const u=o(...t);return n(u)||n(r)?i([u,r]).then(f(e)):e(u,r)},s=function(t,e,o,r){const u=r(...t);return n(o)||n(u)?i([o,u]).then(f(e)):e(o,u)};var h;return h=(n,t)=>n<t,function(...t){const p=t.pop(),y=t.pop(),a="function"==typeof y,b="function"==typeof p;return a&&b?0==t.length?u(c,o,h,y,p):e(t)?i(t).then(r(c,o,h,y,p)):c(t,h,y,p):a?0==t.length?u(l,o,h,y,p):e(t)?i(t).then(r(l,o,h,y,p)):l(t,h,y,p):b?0==t.length?u(s,o,h,y,p):e(t)?i(t).then(r(s,o,h,y,p)):s(t,h,y,p):n(y)||n(p)?i([y,p]).then(f(h)):h(y,p)}}());
9
+ !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define((()=>t)):n.lt=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=n=>null!=n&&"function"==typeof n.then,t=Array.isArray,e=function(e){if(t(e)){const t=e.length;let o=-1;for(;++o<t;){const t=e[o];if(n(t))return!0}return!1}for(const t in e){const o=e[t];if(n(o))return!0}return!1},o=Symbol.for("placeholder"),r=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(r){return n(t,e,o,r)})(n,t,e,r)},u=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(...r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(...r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(...r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(...r){return n(t,e,o,r)})(n,t,e,r)},f=n=>function([t,e]){return n(t,e)},i=Promise.all.bind(Promise),c=function(t,e,o,r){const u=o(...t),c=r(...t);return n(u)||n(c)?i([u,c]).then(f(e)):e(u,c)},l=function(t,e,o,r){const u=o(...t);return n(u)||n(r)?i([u,r]).then(f(e)):e(u,r)},s=function(t,e,o,r){const u=r(...t);return n(o)||n(u)?i([o,u]).then(f(e)):e(o,u)};var h;return h=(n,t)=>n<t,function(...t){const p=t.pop(),y=t.pop(),a="function"==typeof y,b="function"==typeof p;return a&&b?0==t.length?u(c,o,h,y,p):e(t)?i(t).then(r(c,o,h,y,p)):c(t,h,y,p):a?0==t.length?u(l,o,h,y,p):e(t)?i(t).then(r(l,o,h,y,p)):l(t,h,y,p):b?0==t.length?u(s,o,h,y,p):e(t)?i(t).then(r(s,o,h,y,p)):s(t,h,y,p):n(y)||n(p)?i([y,p]).then(f(h)):h(y,p)}}());
package/dist/lt.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/lte.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/lte.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/lte.min.js CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
6
6
  * Rubico may be freely distributed under the CFOSS license.
7
7
  */
8
8
 
9
- !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define(()=>t):n.lte=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=n=>null!=n&&"function"==typeof n.then,t=Array.isArray,e=function(e){if(t(e)){const t=e.length;let o=-1;for(;++o<t;){const t=e[o];if(n(t))return!0}return!1}for(const t in e){const o=e[t];if(n(o))return!0}return!1},o=Symbol.for("placeholder"),r=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(r){return n(t,e,o,r)})(n,t,e,r)},u=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(...r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(...r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(...r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(...r){return n(t,e,o,r)})(n,t,e,r)},f=n=>function([t,e]){return n(t,e)},i=Promise.all.bind(Promise),c=function(t,e,o,r){const u=o(...t),c=r(...t);return n(u)||n(c)?i([u,c]).then(f(e)):e(u,c)},l=function(t,e,o,r){const u=o(...t);return n(u)||n(r)?i([u,r]).then(f(e)):e(u,r)},s=function(t,e,o,r){const u=r(...t);return n(o)||n(u)?i([o,u]).then(f(e)):e(o,u)};var h;return h=(n,t)=>n<=t,function(...t){const p=t.pop(),y=t.pop(),a="function"==typeof y,b="function"==typeof p;return a&&b?0==t.length?u(c,o,h,y,p):e(t)?i(t).then(r(c,o,h,y,p)):c(t,h,y,p):a?0==t.length?u(l,o,h,y,p):e(t)?i(t).then(r(l,o,h,y,p)):l(t,h,y,p):b?0==t.length?u(s,o,h,y,p):e(t)?i(t).then(r(s,o,h,y,p)):s(t,h,y,p):n(y)||n(p)?i([y,p]).then(f(h)):h(y,p)}}());
9
+ !function(n,t){"object"==typeof module?module.exports=t:"function"==typeof define?define((()=>t)):n.lte=t}("object"==typeof globalThis?globalThis:this,function(){"use strict";const n=n=>null!=n&&"function"==typeof n.then,t=Array.isArray,e=function(e){if(t(e)){const t=e.length;let o=-1;for(;++o<t;){const t=e[o];if(n(t))return!0}return!1}for(const t in e){const o=e[t];if(n(o))return!0}return!1},o=Symbol.for("placeholder"),r=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(r){return n(t,e,o,r)})(n,t,e,r)},u=function(n,t,e,r,u){return t==o?((n,t,e,o)=>function(...r){return n(r,t,e,o)})(n,e,r,u):e==o?((n,t,e,o)=>function(...r){return n(t,r,e,o)})(n,t,r,u):r==o?((n,t,e,o)=>function(...r){return n(t,e,r,o)})(n,t,e,u):((n,t,e,o)=>function(...r){return n(t,e,o,r)})(n,t,e,r)},f=n=>function([t,e]){return n(t,e)},i=Promise.all.bind(Promise),c=function(t,e,o,r){const u=o(...t),c=r(...t);return n(u)||n(c)?i([u,c]).then(f(e)):e(u,c)},l=function(t,e,o,r){const u=o(...t);return n(u)||n(r)?i([u,r]).then(f(e)):e(u,r)},s=function(t,e,o,r){const u=r(...t);return n(o)||n(u)?i([o,u]).then(f(e)):e(o,u)};var h;return h=(n,t)=>n<=t,function(...t){const p=t.pop(),y=t.pop(),a="function"==typeof y,b="function"==typeof p;return a&&b?0==t.length?u(c,o,h,y,p):e(t)?i(t).then(r(c,o,h,y,p)):c(t,h,y,p):a?0==t.length?u(l,o,h,y,p):e(t)?i(t).then(r(l,o,h,y,p)):l(t,h,y,p):b?0==t.length?u(s,o,h,y,p):e(t)?i(t).then(r(s,o,h,y,p)):s(t,h,y,p):n(y)||n(p)?i([y,p]).then(f(h)):h(y,p)}}());
package/dist/lte.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
package/dist/map.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software
6
6
  * Rubico may be freely distributed under the CFOSS license.
7
7
  */
8
- const isPromise=r=>null!=r&&"function"==typeof r.then,symbolIterator=Symbol.iterator,MappingIterator=(r,e)=>({toString:()=>"[object MappingIterator]",[symbolIterator](){return this},next(){const t=r.next();return t.done?t:{value:e(t.value),done:!1}}}),NextIteration=r=>({value:r,done:!1}),symbolAsyncIterator=Symbol.asyncIterator,MappingAsyncIterator=(r,e)=>({[symbolAsyncIterator](){return this},async next(){const t=await r.next();if(t.done)return t;const n=e(t.value);return isPromise(n)?n.then(NextIteration):{value:n,done:!1}}}),__=Symbol.for("placeholder"),curry2ResolveArg0=(r,e)=>function(t){return r(t,e)},curry2ResolveArg1=(r,e)=>function(t){return r(e,t)},curry2=function(r,e,t){return e==__?curry2ResolveArg0(r,t):curry2ResolveArg1(r,e)},curry3ResolveArg0=(r,e,t)=>function(n){return r(n,e,t)},curry3ResolveArg1=(r,e,t)=>function(n){return r(e,n,t)},curry3ResolveArg2=(r,e,t)=>function(n){return r(e,t,n)},curry3=function(r,e,t,n){return e==__?curry3ResolveArg0(r,t,n):t==__?curry3ResolveArg1(r,e,n):curry3ResolveArg2(r,e,t)},isArray=Array.isArray,isObject=r=>{if(null==r)return!1;const e=typeof r;return"object"==e||"function"==e},promiseAll=Promise.all.bind(Promise),arrayMap=function(r,e){const t=r.length,n=Array(t);let o=-1,s=!1;for(;++o<t;){const t=e(r[o],o,r);isPromise(t)&&(s=!0),n[o]=t}return s?promiseAll(n):n},callPropUnary=(r,e,t)=>r[e](t),stringMap=function(r,e){const t=arrayMap(r,e);return isPromise(t)?t.then(curry3(callPropUnary,__,"join","")):t.join("")},always=r=>function(){return r},setMap=function(r,e){const t=new Set,n=[];for(const o of r){const s=e(o,o,r);isPromise(s)?n.push(s.then(curry3(callPropUnary,t,"add",__))):t.add(s)}return 0==n.length?t:promiseAll(n).then(always(t))},curry4ResolveArg0=(r,e,t,n)=>function(o){return r(o,e,t,n)},curry4ResolveArg1=(r,e,t,n)=>function(o){return r(e,o,t,n)},curry4ResolveArg2=(r,e,t,n)=>function(o){return r(e,t,o,n)},curry4ResolveArg3=(r,e,t,n)=>function(o){return r(e,t,n,o)},curry4=function(r,e,t,n,o){return e==__?curry4ResolveArg0(r,t,n,o):t==__?curry4ResolveArg1(r,e,n,o):n==__?curry4ResolveArg2(r,e,t,o):curry4ResolveArg3(r,e,t,n)},callPropBinary=(r,e,t,n)=>r[e](t,n),mapMap=function(r,e){const t=new Map,n=[];for(const[o,s]of r){const i=e(s,o,r);isPromise(i)?n.push(i.then(curry4(callPropBinary,t,"set",o,__))):t.set(o,i)}return 0==n.length?t:promiseAll(n).then(always(t))},promiseObjectAllExecutor=r=>function(e){const t={};let n=0;for(const o in r){const s=r[o];isPromise(s)?(n+=1,s.then((r=>function(o){t[r]=o,n-=1,0==n&&e(t)})(o))):t[o]=s}0==n&&e(t)},promiseObjectAll=r=>new Promise(promiseObjectAllExecutor(r)),objectMap=function(r,e){const t={};let n=!1;for(const o in r){const s=e(r[o],o,r);isPromise(s)&&(n=!0),t[o]=s}return n?promiseObjectAll(t):t},funcConcat=(r,e)=>function(...t){const n=r(...t);return isPromise(n)?n.then(e):e(n)},objectSet=function(r,e,t){return r[e]=t,r},arrayMapSeriesAsync=async function(r,e,t,n){const o=r.length;for(;++n<o;){const o=e(r[n],n);t[n]=isPromise(o)?await o:o}return t},arrayMapSeries=function(r,e){const t=r.length,n=Array(t);let o=-1;for(;++o<t;){const t=e(r[o],o);if(isPromise(t))return t.then(funcConcat(curry3(objectSet,n,o,__),curry4(arrayMapSeriesAsync,r,e,__,o)));n[o]=t}return n},stringMapSeries=function(r,e){const t=arrayMapSeries(r,e);return isPromise(t)?t.then(curry3(callPropUnary,__,"join","")):t.join("")},thunkify4=(r,e,t,n,o)=>function(){return r(e,t,n,o)},_objectMapSeriesAsync=async function(r,e,t,n){for(const o in r){if(o in n)continue;let s=e(r[o]);isPromise(s)&&(s=await s),t[o]=s}return t},objectMapSeries=function(r,e){const t={},n={};for(const o in r){n[o]=!0;const s=e(r[o],o,r);if(isPromise(s))return s.then(funcConcat(curry3(objectSet,t,o,__),thunkify4(_objectMapSeriesAsync,r,e,t,n)));t[o]=s}return t},thunkify3=(r,e,t,n)=>function(){return r(e,t,n)},setAdd=function(r,e){return r.add(e),r},_setMapSeriesAsync=async function(r,e,t){let n=r.next();for(;!n.done;){let o=e(n.value);isPromise(o)&&(o=await o),t.add(o),n=r.next()}return t},setMapSeries=function(r,e){const t=new Set,n=r[symbolIterator]();let o=n.next();for(;!o.done;){const r=e(o.value);if(isPromise(r))return r.then(funcConcat(curry2(setAdd,t,__),thunkify3(_setMapSeriesAsync,n,e,t)));t.add(r),o=n.next()}return t},mapSet=function(r,e,t){return r.set(e,t)},_mapMapSeriesAsync=async function(r,e,t){let n=r.next();for(;!n.done;){let o=e(n.value[1]);isPromise(o)&&(o=await o),t.set(n.value[0],o),n=r.next()}return t},mapMapSeries=function(r,e){const t=new Map,n=r[symbolIterator]();let o=n.next();for(;!o.done;){const r=o.value[0],s=e(o.value[1]);if(isPromise(s))return s.then(funcConcat(curry3(mapSet,t,r,__),thunkify3(_mapMapSeriesAsync,n,e,t)));t.set(r,s),o=n.next()}return t},tapSync=r=>function(...e){return r(...e),e[0]},promiseRace=Promise.race.bind(Promise),arrayMapPoolAsync=async function(r,e,t,n,o,s){const i=r.length;for(;++o<i;){s.size>=t&&await promiseRace(s);const i=e(r[o]);if(isPromise(i)){const r=i.then(tapSync(()=>s.delete(r)));s.add(r),n[o]=r}else n[o]=i}return promiseAll(n)},arrayMapPool=function(r,e,t){const n=r.length,o=Array(n);let s=-1;for(;++s<n;){const n=t(r[s]);if(isPromise(n)){const i=new Set,c=n.then(tapSync(()=>i.delete(c)));return i.add(c),o[s]=c,arrayMapPoolAsync(r,t,e,o,s,i)}o[s]=n}return o},stringMapPool=function(r,e,t){const n=arrayMapPool(r,e,t);return isPromise(n)?n.then(curry3(callPropUnary,__,"join","")):n.join("")},_setMapPoolAsync=async function(r,e,t,n,o,s){let i=e.next();for(;!i.done;){s.size>=t&&await promiseRace(s);const c=n(i.value,i.value,r);if(isPromise(c)){const r=c.then(e=>{s.delete(r),o.add(e)});s.add(r)}else o.add(c);i=e.next()}return s.size>0&&await promiseAll(s),o},setMapPool=function(r,e,t){const n=new Set,o=r[symbolIterator]();let s=o.next();for(;!s.done;){const i=t(s.value,s.value,r);if(isPromise(i)){const s=new Set,c=i.then(r=>{s.delete(c),n.add(r)});return s.add(c),_setMapPoolAsync(r,o,e,t,n,s)}n.add(i),s=o.next()}return n},_mapMapPoolAsync=async function(r,e,t,n,o,s){let i=e.next();for(;!i.done;){s.size>=t&&await promiseRace(s);const c=i.value[0],a=n(i.value[1],c,r);if(isPromise(a)){o.set(c,a);const r=a.then(e=>{s.delete(r),o.set(c,e)});s.add(r)}else o.set(c,a);i=e.next()}return s.size>0&&await promiseAll(s),o},mapMapPool=function(r,e,t){const n=new Map,o=r[symbolIterator]();let s=o.next();for(;!s.done;){const i=s.value[0],c=t(s.value[1],i,r);if(isPromise(c)){const s=new Set;n.set(i,c);const a=c.then(r=>{s.delete(a),n.set(i,r)});return s.add(a),_mapMapPoolAsync(r,o,e,t,n,s)}n.set(i,c),s=o.next()}return n},_objectMapPoolAsync=async function(r,e,t,n,o,s){for(const i in r){if(i in o)continue;s.size>=e&&await promiseRace(s);const c=t(r[i],i,r);if(isPromise(c)){n[i]=c;const r=c.then(e=>{s.delete(r),n[i]=e});s.add(r)}else n[i]=c}return s.size>0&&await promiseAll(s),n},objectMapPool=function(r,e,t){const n={},o={};for(const s in r){o[s]=!0;const i=t(r[s],s,r);if(isPromise(i)){const c=new Set;n[s]=i;const a=i.then(r=>{c.delete(a),n[s]=r});return c.add(a),_objectMapPoolAsync(r,e,t,n,o,c)}n[s]=i}return n},areAnyValuesPromises=function(r){if(isArray(r)){const e=r.length;let t=-1;for(;++t<e;){const e=r[t];if(isPromise(e))return!0}return!1}for(const e in r){const t=r[e];if(isPromise(t))return!0}return!1},funcApply2=(r,e,t)=>r.apply(e,t),_curryArity=(r,e,t,n)=>function(...o){const s=n.length,i=o.length,c=[];let a=-1,u=-1,l=0;for(;++a<s;){const s=n[a];if(s==__&&(u+=1)<i){const r=o[u];r==__&&(l+=1),c.push(r)}else c.push(s);if(c.length==r)return areAnyValuesPromises(c)?0==l?promiseAll(c).then(curry3(funcApply2,e,t,__)):promiseAll(c).then(curry4(curryArity,r,e,t,__)):0==l?e.apply(t,c):curryArity(r,e,t,c)}for(;++u<i;){const n=o[u];if(n==__&&(l+=1),c.push(n),c.length==r)return areAnyValuesPromises(c)?0==l?promiseAll(c).then(curry3(funcApply2,e,t,__)):promiseAll(c).then(curry4(curryArity,r,e,t,__)):0==l?e.apply(t,c):curryArity(r,e,t,c)}return areAnyValuesPromises(c)?promiseAll(c).then(curry4(curryArity,r,e,t,__)):curryArity(r,e,t,c)},curryArity=function(r,e,t,n){const o=n.length;if(o<r)return _curryArity(r,e,t,n);let s=-1;for(;++s<o;){if(n[s]==__)return _curryArity(r,e,t,n)}return e.apply(t,n)},spread2=r=>function([e,t]){return r(e,t)},objectMapEntries=function(r,e){const t={},n=[];for(const o in r){const s=e([o,r[o]]);isPromise(s)?n.push(s.then(spread2(curryArity(3,objectSet,this,[t])))):t[s[0]]=s[1]}return 0==n.length?t:promiseAll(n).then(always(t))},mapMapEntriesForEachCallback=(r,e,t)=>function(n,o){const s=r([o,n]);isPromise(s)?t.push(s.then(spread2(curryArity(3,mapSet,this,[e])))):e.set(s[0],s[1])},mapMapEntries=function(r,e){const t=new Map,n=[];return r.forEach(mapMapEntriesForEachCallback(e,t,n)),0==n.length?t:promiseAll(n).then(always(t))},_map=function(r,e){return isArray(r)?arrayMap(r,e):null==r?r:"function"==typeof r.then?r.then(e):"function"==typeof r.map?r.map(e):"string"==typeof r||r.constructor==String?stringMap(r,e):r.constructor==Set?setMap(r,e):r.constructor==Map?mapMap(r,e):"function"==typeof r[symbolIterator]?MappingIterator(r[symbolIterator](),e):"function"==typeof r[symbolAsyncIterator]?MappingAsyncIterator(r[symbolAsyncIterator](),e):r.constructor==Object?objectMap(r,e):e(r)},map=function(r,e){return null==e?curry2(_map,__,r):isPromise(r)?r.then(curry2(_map,__,e)):_map(r,e)},_mapEntries=(r,e)=>{if(null==r)throw new TypeError("value is not an Object or Map");if(r.constructor==Object)return objectMapEntries(r,e);if(r.constructor==Map)return mapMapEntries(r,e);throw new TypeError("value is not an Object or Map")};map.entries=function(r,e){return null==e?curry2(_mapEntries,__,r):isPromise(r)?r.then(curry2(_mapEntries,__,e)):_mapEntries(r,e)};const _mapSeries=function(r,e){if(isArray(r))return arrayMapSeries(r,e);if(null==r)throw new TypeError(`invalid collection ${r}`);if("string"==typeof r||r.constructor==String)return stringMapSeries(r,e);if(r.constructor==Set)return setMapSeries(r,e);if(r.constructor==Map)return mapMapSeries(r,e);if(r.constructor==Object)return objectMapSeries(r,e);throw new TypeError(`invalid collection ${r}`)};map.series=function(r,e){return null==e?curry2(_mapSeries,__,r):isPromise(r)?r.then(curry2(_mapSeries,__,e)):_mapSeries(r,e)};const _mapPool=function(r,e,t){if(isArray(r))return arrayMapPool(r,e,t);if(null==r)throw new TypeError(`invalid functor ${r}`);if("string"==typeof r||r.constructor==String)return stringMapPool(r,e,t);if(r.constructor==Set)return setMapPool(r,e,t);if(r.constructor==Map)return mapMapPool(r,e,t);if(r.constructor==Object)return objectMapPool(r,e,t);throw new TypeError(`invalid functor ${r}`)};map.pool=function(r,e,t){return null==t?curry3(_mapPool,__,r,e):isPromise(r)?r.then(curry3(_mapPool,__,e,t)):_mapPool(r,e,t)};export default map;
8
+ const isPromise=r=>null!=r&&"function"==typeof r.then,symbolIterator=Symbol.iterator,MappingIterator=(r,e)=>({toString:()=>"[object MappingIterator]",[symbolIterator](){return this},next(){const t=r.next();return t.done?t:{value:e(t.value),done:!1}}}),NextIteration=r=>({value:r,done:!1}),symbolAsyncIterator=Symbol.asyncIterator,MappingAsyncIterator=(r,e)=>({[symbolAsyncIterator](){return this},async next(){const t=await r.next();if(t.done)return t;const n=e(t.value);return isPromise(n)?n.then(NextIteration):{value:n,done:!1}}}),__=Symbol.for("placeholder"),curry2ResolveArg0=(r,e)=>function(t){return r(t,e)},curry2ResolveArg1=(r,e)=>function(t){return r(e,t)},curry2=function(r,e,t){return e==__?curry2ResolveArg0(r,t):curry2ResolveArg1(r,e)},curry3ResolveArg0=(r,e,t)=>function(n){return r(n,e,t)},curry3ResolveArg1=(r,e,t)=>function(n){return r(e,n,t)},curry3ResolveArg2=(r,e,t)=>function(n){return r(e,t,n)},curry3=function(r,e,t,n){return e==__?curry3ResolveArg0(r,t,n):t==__?curry3ResolveArg1(r,e,n):curry3ResolveArg2(r,e,t)},isArray=Array.isArray,isObject=r=>{if(null==r)return!1;const e=typeof r;return"object"==e||"function"==e},promiseAll=Promise.all.bind(Promise),arrayMap=function(r,e){const t=r.length,n=Array(t);let o=-1,s=!1;for(;++o<t;){const t=e(r[o],o,r);isPromise(t)&&(s=!0),n[o]=t}return s?promiseAll(n):n},callPropUnary=(r,e,t)=>r[e](t),stringMap=function(r,e){const t=arrayMap(r,e);return isPromise(t)?t.then(curry3(callPropUnary,__,"join","")):t.join("")},always=r=>function(){return r},setMap=function(r,e){const t=new Set,n=[];for(const o of r){const s=e(o,o,r);isPromise(s)?n.push(s.then(curry3(callPropUnary,t,"add",__))):t.add(s)}return 0==n.length?t:promiseAll(n).then(always(t))},curry4ResolveArg0=(r,e,t,n)=>function(o){return r(o,e,t,n)},curry4ResolveArg1=(r,e,t,n)=>function(o){return r(e,o,t,n)},curry4ResolveArg2=(r,e,t,n)=>function(o){return r(e,t,o,n)},curry4ResolveArg3=(r,e,t,n)=>function(o){return r(e,t,n,o)},curry4=function(r,e,t,n,o){return e==__?curry4ResolveArg0(r,t,n,o):t==__?curry4ResolveArg1(r,e,n,o):n==__?curry4ResolveArg2(r,e,t,o):curry4ResolveArg3(r,e,t,n)},callPropBinary=(r,e,t,n)=>r[e](t,n),mapMap=function(r,e){const t=new Map,n=[];for(const[o,s]of r){const i=e(s,o,r);isPromise(i)?n.push(i.then(curry4(callPropBinary,t,"set",o,__))):t.set(o,i)}return 0==n.length?t:promiseAll(n).then(always(t))},promiseObjectAllExecutor=r=>function(e){const t={};let n=0;for(const o in r){const s=r[o];isPromise(s)?(n+=1,s.then((r=>function(o){t[r]=o,n-=1,0==n&&e(t)})(o))):t[o]=s}0==n&&e(t)},promiseObjectAll=r=>new Promise(promiseObjectAllExecutor(r)),objectMap=function(r,e){const t={};let n=!1;for(const o in r){const s=e(r[o],o,r);isPromise(s)&&(n=!0),t[o]=s}return n?promiseObjectAll(t):t},funcConcat=(r,e)=>function(...t){const n=r(...t);return isPromise(n)?n.then(e):e(n)},objectSet=function(r,e,t){return r[e]=t,r},arrayMapSeriesAsync=async function(r,e,t,n){const o=r.length;for(;++n<o;){const o=e(r[n],n);t[n]=isPromise(o)?await o:o}return t},arrayMapSeries=function(r,e){const t=r.length,n=Array(t);let o=-1;for(;++o<t;){const t=e(r[o],o);if(isPromise(t))return t.then(funcConcat(curry3(objectSet,n,o,__),curry4(arrayMapSeriesAsync,r,e,__,o)));n[o]=t}return n},stringMapSeries=function(r,e){const t=arrayMapSeries(r,e);return isPromise(t)?t.then(curry3(callPropUnary,__,"join","")):t.join("")},thunkify4=(r,e,t,n,o)=>function(){return r(e,t,n,o)},_objectMapSeriesAsync=async function(r,e,t,n){for(const o in r){if(o in n)continue;let s=e(r[o]);isPromise(s)&&(s=await s),t[o]=s}return t},objectMapSeries=function(r,e){const t={},n={};for(const o in r){n[o]=!0;const s=e(r[o],o,r);if(isPromise(s))return s.then(funcConcat(curry3(objectSet,t,o,__),thunkify4(_objectMapSeriesAsync,r,e,t,n)));t[o]=s}return t},thunkify3=(r,e,t,n)=>function(){return r(e,t,n)},setAdd=function(r,e){return r.add(e),r},_setMapSeriesAsync=async function(r,e,t){let n=r.next();for(;!n.done;){let o=e(n.value);isPromise(o)&&(o=await o),t.add(o),n=r.next()}return t},setMapSeries=function(r,e){const t=new Set,n=r[symbolIterator]();let o=n.next();for(;!o.done;){const r=e(o.value);if(isPromise(r))return r.then(funcConcat(curry2(setAdd,t,__),thunkify3(_setMapSeriesAsync,n,e,t)));t.add(r),o=n.next()}return t},mapSet=function(r,e,t){return r.set(e,t)},_mapMapSeriesAsync=async function(r,e,t){let n=r.next();for(;!n.done;){let o=e(n.value[1]);isPromise(o)&&(o=await o),t.set(n.value[0],o),n=r.next()}return t},mapMapSeries=function(r,e){const t=new Map,n=r[symbolIterator]();let o=n.next();for(;!o.done;){const r=o.value[0],s=e(o.value[1]);if(isPromise(s))return s.then(funcConcat(curry3(mapSet,t,r,__),thunkify3(_mapMapSeriesAsync,n,e,t)));t.set(r,s),o=n.next()}return t},tapSync=r=>function(...e){return r(...e),e[0]},promiseRace=Promise.race.bind(Promise),arrayMapPoolAsync=async function(r,e,t,n,o,s){const i=r.length;for(;++o<i;){s.size>=t&&await promiseRace(s);const i=e(r[o]);if(isPromise(i)){const r=i.then(tapSync((()=>s.delete(r))));s.add(r),n[o]=r}else n[o]=i}return promiseAll(n)},arrayMapPool=function(r,e,t){const n=r.length,o=Array(n);let s=-1;for(;++s<n;){const n=t(r[s]);if(isPromise(n)){const i=new Set,c=n.then(tapSync((()=>i.delete(c))));return i.add(c),o[s]=c,arrayMapPoolAsync(r,t,e,o,s,i)}o[s]=n}return o},stringMapPool=function(r,e,t){const n=arrayMapPool(r,e,t);return isPromise(n)?n.then(curry3(callPropUnary,__,"join","")):n.join("")},_setMapPoolAsync=async function(r,e,t,n,o,s){let i=e.next();for(;!i.done;){s.size>=t&&await promiseRace(s);const c=n(i.value,i.value,r);if(isPromise(c)){const r=c.then((e=>{s.delete(r),o.add(e)}));s.add(r)}else o.add(c);i=e.next()}return s.size>0&&await promiseAll(s),o},setMapPool=function(r,e,t){const n=new Set,o=r[symbolIterator]();let s=o.next();for(;!s.done;){const i=t(s.value,s.value,r);if(isPromise(i)){const s=new Set,c=i.then((r=>{s.delete(c),n.add(r)}));return s.add(c),_setMapPoolAsync(r,o,e,t,n,s)}n.add(i),s=o.next()}return n},_mapMapPoolAsync=async function(r,e,t,n,o,s){let i=e.next();for(;!i.done;){s.size>=t&&await promiseRace(s);const c=i.value[0],a=n(i.value[1],c,r);if(isPromise(a)){o.set(c,a);const r=a.then((e=>{s.delete(r),o.set(c,e)}));s.add(r)}else o.set(c,a);i=e.next()}return s.size>0&&await promiseAll(s),o},mapMapPool=function(r,e,t){const n=new Map,o=r[symbolIterator]();let s=o.next();for(;!s.done;){const i=s.value[0],c=t(s.value[1],i,r);if(isPromise(c)){const s=new Set;n.set(i,c);const a=c.then((r=>{s.delete(a),n.set(i,r)}));return s.add(a),_mapMapPoolAsync(r,o,e,t,n,s)}n.set(i,c),s=o.next()}return n},_objectMapPoolAsync=async function(r,e,t,n,o,s){for(const i in r){if(i in o)continue;s.size>=e&&await promiseRace(s);const c=t(r[i],i,r);if(isPromise(c)){n[i]=c;const r=c.then((e=>{s.delete(r),n[i]=e}));s.add(r)}else n[i]=c}return s.size>0&&await promiseAll(s),n},objectMapPool=function(r,e,t){const n={},o={};for(const s in r){o[s]=!0;const i=t(r[s],s,r);if(isPromise(i)){const c=new Set;n[s]=i;const a=i.then((r=>{c.delete(a),n[s]=r}));return c.add(a),_objectMapPoolAsync(r,e,t,n,o,c)}n[s]=i}return n},areAnyValuesPromises=function(r){if(isArray(r)){const e=r.length;let t=-1;for(;++t<e;){const e=r[t];if(isPromise(e))return!0}return!1}for(const e in r){const t=r[e];if(isPromise(t))return!0}return!1},funcApply2=(r,e,t)=>r.apply(e,t),_curryArity=(r,e,t,n)=>function(...o){const s=n.length,i=o.length,c=[];let a=-1,u=-1,l=0;for(;++a<s;){const s=n[a];if(s==__&&(u+=1)<i){const r=o[u];r==__&&(l+=1),c.push(r)}else c.push(s);if(c.length==r)return areAnyValuesPromises(c)?0==l?promiseAll(c).then(curry3(funcApply2,e,t,__)):promiseAll(c).then(curry4(curryArity,r,e,t,__)):0==l?e.apply(t,c):curryArity(r,e,t,c)}for(;++u<i;){const n=o[u];if(n==__&&(l+=1),c.push(n),c.length==r)return areAnyValuesPromises(c)?0==l?promiseAll(c).then(curry3(funcApply2,e,t,__)):promiseAll(c).then(curry4(curryArity,r,e,t,__)):0==l?e.apply(t,c):curryArity(r,e,t,c)}return areAnyValuesPromises(c)?promiseAll(c).then(curry4(curryArity,r,e,t,__)):curryArity(r,e,t,c)},curryArity=function(r,e,t,n){const o=n.length;if(o<r)return _curryArity(r,e,t,n);let s=-1;for(;++s<o;){if(n[s]==__)return _curryArity(r,e,t,n)}return e.apply(t,n)},spread2=r=>function([e,t]){return r(e,t)},objectMapEntries=function(r,e){const t={},n=[];for(const o in r){const s=e([o,r[o]]);isPromise(s)?n.push(s.then(spread2(curryArity(3,objectSet,this,[t])))):t[s[0]]=s[1]}return 0==n.length?t:promiseAll(n).then(always(t))},mapMapEntriesForEachCallback=(r,e,t)=>function(n,o){const s=r([o,n]);isPromise(s)?t.push(s.then(spread2(curryArity(3,mapSet,this,[e])))):e.set(s[0],s[1])},mapMapEntries=function(r,e){const t=new Map,n=[];return r.forEach(mapMapEntriesForEachCallback(e,t,n)),0==n.length?t:promiseAll(n).then(always(t))},_map=function(r,e){return isArray(r)?arrayMap(r,e):null==r?r:"function"==typeof r.then?r.then(e):"function"==typeof r.map?r.map(e):"string"==typeof r||r.constructor==String?stringMap(r,e):r.constructor==Set?setMap(r,e):r.constructor==Map?mapMap(r,e):"function"==typeof r[symbolIterator]?MappingIterator(r[symbolIterator](),e):"function"==typeof r[symbolAsyncIterator]?MappingAsyncIterator(r[symbolAsyncIterator](),e):r.constructor==Object?objectMap(r,e):e(r)},map=function(r,e){return null==e?curry2(_map,__,r):isPromise(r)?r.then(curry2(_map,__,e)):_map(r,e)},_mapEntries=(r,e)=>{if(null==r)throw new TypeError("value is not an Object or Map");if(r.constructor==Object)return objectMapEntries(r,e);if(r.constructor==Map)return mapMapEntries(r,e);throw new TypeError("value is not an Object or Map")};map.entries=function(r,e){return null==e?curry2(_mapEntries,__,r):isPromise(r)?r.then(curry2(_mapEntries,__,e)):_mapEntries(r,e)};const _mapSeries=function(r,e){if(isArray(r))return arrayMapSeries(r,e);if(null==r)throw new TypeError(`invalid collection ${r}`);if("string"==typeof r||r.constructor==String)return stringMapSeries(r,e);if(r.constructor==Set)return setMapSeries(r,e);if(r.constructor==Map)return mapMapSeries(r,e);if(r.constructor==Object)return objectMapSeries(r,e);throw new TypeError(`invalid collection ${r}`)};map.series=function(r,e){return null==e?curry2(_mapSeries,__,r):isPromise(r)?r.then(curry2(_mapSeries,__,e)):_mapSeries(r,e)};const _mapPool=function(r,e,t){if(isArray(r))return arrayMapPool(r,e,t);if(null==r)throw new TypeError(`invalid functor ${r}`);if("string"==typeof r||r.constructor==String)return stringMapPool(r,e,t);if(r.constructor==Set)return setMapPool(r,e,t);if(r.constructor==Map)return mapMapPool(r,e,t);if(r.constructor==Object)return objectMapPool(r,e,t);throw new TypeError(`invalid functor ${r}`)};map.pool=function(r,e,t){return null==t?curry3(_mapPool,__,r,e):isPromise(r)?r.then(curry3(_mapPool,__,e,t)):_mapPool(r,e,t)};export default map;
package/dist/map.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Rubico v2.8.2
2
+ * Rubico v2.8.3
3
3
  * https://rubico.land/
4
4
  *
5
5
  * © Richard Yufei Tong, King of Software