@synnaxlabs/x 0.48.0 → 0.49.2

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 (247) hide show
  1. package/.turbo/turbo-build.log +6 -104
  2. package/dist/src/csv/csv.d.ts +5 -7
  3. package/dist/src/csv/csv.d.ts.map +1 -1
  4. package/dist/src/deep/join.d.ts.map +1 -0
  5. package/dist/src/deep/path.d.ts +1 -1
  6. package/dist/src/deep/path.d.ts.map +1 -1
  7. package/dist/src/destructor/destructor.d.ts +7 -0
  8. package/dist/src/destructor/destructor.d.ts.map +1 -0
  9. package/dist/src/destructor/index.d.ts +2 -0
  10. package/dist/src/destructor/index.d.ts.map +1 -0
  11. package/dist/src/index.d.ts +5 -10
  12. package/dist/src/index.d.ts.map +1 -1
  13. package/dist/src/math/constants.d.ts +1 -0
  14. package/dist/src/math/constants.d.ts.map +1 -1
  15. package/dist/src/migrate/migrate.d.ts +3 -3
  16. package/dist/src/migrate/migrate.d.ts.map +1 -1
  17. package/dist/src/narrow/index.d.ts +2 -0
  18. package/dist/src/narrow/index.d.ts.map +1 -0
  19. package/dist/src/narrow/narrow.d.ts +4 -0
  20. package/dist/src/narrow/narrow.d.ts.map +1 -0
  21. package/dist/src/narrow/narrow.spec.d.ts +2 -0
  22. package/dist/src/narrow/narrow.spec.d.ts.map +1 -0
  23. package/dist/src/numeric/numeric.d.ts +0 -1
  24. package/dist/src/numeric/numeric.d.ts.map +1 -1
  25. package/dist/src/observe/observe.d.ts +4 -4
  26. package/dist/src/observe/observe.d.ts.map +1 -1
  27. package/dist/src/optional/index.d.ts +2 -0
  28. package/dist/src/optional/index.d.ts.map +1 -0
  29. package/dist/src/optional/optional.d.ts.map +1 -0
  30. package/dist/src/scheduler/index.d.ts +2 -0
  31. package/dist/src/scheduler/index.d.ts.map +1 -0
  32. package/dist/src/{flush.d.ts → scheduler/scheduler.d.ts} +1 -1
  33. package/dist/src/scheduler/scheduler.d.ts.map +1 -0
  34. package/dist/src/scheduler/scheduler.spec.d.ts +2 -0
  35. package/dist/src/scheduler/scheduler.spec.d.ts.map +1 -0
  36. package/dist/src/shallow/copy.d.ts +2 -0
  37. package/dist/src/shallow/copy.d.ts.map +1 -0
  38. package/dist/src/shallow/copy.spec.d.ts +2 -0
  39. package/dist/src/shallow/copy.spec.d.ts.map +1 -0
  40. package/dist/src/shallow/index.d.ts +2 -0
  41. package/dist/src/shallow/index.d.ts.map +1 -0
  42. package/dist/src/spatial/base.d.ts +5 -38
  43. package/dist/src/spatial/base.d.ts.map +1 -1
  44. package/dist/src/spatial/direction/direction.d.ts +2 -1
  45. package/dist/src/spatial/direction/direction.d.ts.map +1 -1
  46. package/dist/src/spatial/external.d.ts +2 -1
  47. package/dist/src/spatial/external.d.ts.map +1 -1
  48. package/dist/src/spatial/location/location.d.ts +2 -2
  49. package/dist/src/spatial/location/location.d.ts.map +1 -1
  50. package/dist/src/spatial/sticky/index.d.ts +2 -0
  51. package/dist/src/spatial/sticky/index.d.ts.map +1 -0
  52. package/dist/src/spatial/sticky/sticky.d.ts +74 -0
  53. package/dist/src/spatial/sticky/sticky.d.ts.map +1 -0
  54. package/dist/src/spatial/sticky/sticky.spec.d.ts +2 -0
  55. package/dist/src/spatial/sticky/sticky.spec.d.ts.map +1 -0
  56. package/dist/src/spatial/xy/xy.d.ts +10 -2
  57. package/dist/src/spatial/xy/xy.d.ts.map +1 -1
  58. package/dist/src/status/status.d.ts +2 -2
  59. package/dist/src/status/status.d.ts.map +1 -1
  60. package/dist/src/telem/series.d.ts +4 -4
  61. package/dist/src/telem/series.d.ts.map +1 -1
  62. package/dist/src/telem/telem.d.ts +0 -1
  63. package/dist/src/telem/telem.d.ts.map +1 -1
  64. package/dist/src/types/index.d.ts +2 -0
  65. package/dist/src/types/index.d.ts.map +1 -0
  66. package/dist/src/zod/external.d.ts +1 -0
  67. package/dist/src/zod/external.d.ts.map +1 -1
  68. package/dist/src/zod/schemas.d.ts +3 -0
  69. package/dist/src/zod/schemas.d.ts.map +1 -0
  70. package/dist/src/zod/schemas.spec.d.ts +2 -0
  71. package/dist/src/zod/schemas.spec.d.ts.map +1 -0
  72. package/dist/x.cjs +12 -0
  73. package/dist/x.js +5537 -0
  74. package/package.json +4 -142
  75. package/src/binary/codec.ts +2 -2
  76. package/src/csv/csv.spec.ts +59 -11
  77. package/src/csv/csv.ts +27 -11
  78. package/src/deep/merge.ts +3 -3
  79. package/src/deep/path.ts +1 -1
  80. package/src/{destructor.ts → destructor/destructor.ts} +1 -1
  81. package/src/{invert.ts → destructor/index.ts} +1 -1
  82. package/src/index.ts +5 -10
  83. package/src/math/constants.ts +1 -0
  84. package/src/migrate/migrate.ts +5 -3
  85. package/src/{mock → narrow}/index.ts +1 -1
  86. package/src/narrow/narrow.spec.ts +70 -0
  87. package/src/{identity.ts → narrow/narrow.ts} +6 -0
  88. package/src/numeric/numeric.ts +0 -5
  89. package/src/observe/observe.ts +4 -4
  90. package/src/{replace.ts → optional/index.ts} +1 -1
  91. package/src/scheduler/index.ts +10 -0
  92. package/src/scheduler/scheduler.spec.ts +82 -0
  93. package/src/shallow/copy.spec.ts +141 -0
  94. package/src/{shallowCopy.ts → shallow/copy.ts} +1 -1
  95. package/src/shallow/index.ts +10 -0
  96. package/src/spatial/base.ts +6 -15
  97. package/src/spatial/direction/direction.ts +2 -0
  98. package/src/spatial/external.ts +2 -1
  99. package/src/spatial/location/location.spec.ts +16 -0
  100. package/src/spatial/location/location.ts +7 -7
  101. package/src/spatial/sticky/index.ts +10 -0
  102. package/src/spatial/sticky/sticky.spec.ts +584 -0
  103. package/src/spatial/sticky/sticky.ts +98 -0
  104. package/src/spatial/xy/xy.spec.ts +55 -0
  105. package/src/spatial/xy/xy.ts +27 -2
  106. package/src/status/status.ts +5 -5
  107. package/src/telem/series.ts +5 -6
  108. package/src/telem/telem.spec.ts +0 -28
  109. package/src/telem/telem.ts +1 -9
  110. package/src/{clamp → types}/index.ts +1 -1
  111. package/src/zod/external.ts +1 -0
  112. package/src/zod/schemas.spec.ts +51 -0
  113. package/src/zod/schemas.ts +14 -0
  114. package/tsconfig.tsbuildinfo +1 -1
  115. package/vite.config.ts +1 -36
  116. package/dist/array.cjs +0 -1
  117. package/dist/array.js +0 -4
  118. package/dist/base-DRybODwJ.js +0 -42
  119. package/dist/base-KIBsp6TI.cjs +0 -1
  120. package/dist/binary.cjs +0 -1
  121. package/dist/binary.js +0 -4
  122. package/dist/bounds-4BWKPqaP.js +0 -183
  123. package/dist/bounds-C2TKFgVk.cjs +0 -1
  124. package/dist/bounds.cjs +0 -1
  125. package/dist/bounds.js +0 -4
  126. package/dist/box-BXWXSkKu.js +0 -203
  127. package/dist/box-rH3ggwXk.cjs +0 -1
  128. package/dist/box.cjs +0 -1
  129. package/dist/box.js +0 -4
  130. package/dist/caseconv.cjs +0 -1
  131. package/dist/caseconv.js +0 -4
  132. package/dist/change-C-YELKx6.cjs +0 -1
  133. package/dist/change-DLl6DccR.js +0 -12
  134. package/dist/change.cjs +0 -1
  135. package/dist/change.js +0 -4
  136. package/dist/compare-Bnx9CdjS.js +0 -119
  137. package/dist/compare-GPoFaKRW.cjs +0 -1
  138. package/dist/compare.cjs +0 -1
  139. package/dist/compare.js +0 -36
  140. package/dist/debounce.cjs +0 -1
  141. package/dist/debounce.js +0 -17
  142. package/dist/deep.cjs +0 -1
  143. package/dist/deep.js +0 -247
  144. package/dist/destructor.cjs +0 -1
  145. package/dist/destructor.js +0 -1
  146. package/dist/dimensions-Cg5Owbwn.cjs +0 -1
  147. package/dist/dimensions-DC0uLPwn.js +0 -43
  148. package/dist/dimensions.cjs +0 -1
  149. package/dist/dimensions.js +0 -4
  150. package/dist/direction-C_b4tfRN.js +0 -19
  151. package/dist/direction-DqQB9M37.cjs +0 -1
  152. package/dist/direction.cjs +0 -1
  153. package/dist/direction.js +0 -4
  154. package/dist/external-2YWy569j.js +0 -23
  155. package/dist/external-B6edOwoQ.cjs +0 -1
  156. package/dist/external-B80i4ymZ.js +0 -29
  157. package/dist/external-B9AAGv50.cjs +0 -1
  158. package/dist/external-BYuXBYJh.js +0 -40
  159. package/dist/external-BxmTQZ6m.cjs +0 -1
  160. package/dist/external-DLiGrXn7.cjs +0 -1
  161. package/dist/external-Du5qzfYv.js +0 -35
  162. package/dist/get-CtJEJIC_.js +0 -82
  163. package/dist/get-D2VRwUw4.cjs +0 -1
  164. package/dist/identity.cjs +0 -1
  165. package/dist/identity.js +0 -4
  166. package/dist/index-Bfvg0v-N.cjs +0 -3
  167. package/dist/index-Bv029kh3.js +0 -19
  168. package/dist/index-CqisIWWC.cjs +0 -1
  169. package/dist/index-CyNZHQFw.cjs +0 -1
  170. package/dist/index-qmkoZBNO.js +0 -57
  171. package/dist/index-yz34Wc2p.js +0 -92
  172. package/dist/index.cjs +0 -5
  173. package/dist/index.js +0 -1004
  174. package/dist/kv.cjs +0 -1
  175. package/dist/kv.js +0 -4
  176. package/dist/link.cjs +0 -1
  177. package/dist/link.js +0 -10
  178. package/dist/location-0qDBiCqP.cjs +0 -1
  179. package/dist/location-BIzpxczO.js +0 -95
  180. package/dist/location.cjs +0 -1
  181. package/dist/location.js +0 -4
  182. package/dist/observe.cjs +0 -1
  183. package/dist/observe.js +0 -48
  184. package/dist/record-BwjIgrpU.cjs +0 -1
  185. package/dist/record-tSFQKmdG.js +0 -19
  186. package/dist/record.cjs +0 -1
  187. package/dist/record.js +0 -4
  188. package/dist/runtime.cjs +0 -1
  189. package/dist/runtime.js +0 -4
  190. package/dist/scale-BXy1w8R_.cjs +0 -1
  191. package/dist/scale-DJCMZbfU.js +0 -228
  192. package/dist/scale.cjs +0 -1
  193. package/dist/scale.js +0 -4
  194. package/dist/series-B7l2au4y.cjs +0 -6
  195. package/dist/series-TpAaBlEg.js +0 -2837
  196. package/dist/spatial-DnsaOypA.js +0 -11
  197. package/dist/spatial-DrxzaD5U.cjs +0 -1
  198. package/dist/spatial.cjs +0 -1
  199. package/dist/spatial.js +0 -18
  200. package/dist/src/clamp/index.d.ts +0 -2
  201. package/dist/src/clamp/index.d.ts.map +0 -1
  202. package/dist/src/destructor.d.ts +0 -7
  203. package/dist/src/destructor.d.ts.map +0 -1
  204. package/dist/src/flush.d.ts.map +0 -1
  205. package/dist/src/identity.d.ts +0 -3
  206. package/dist/src/identity.d.ts.map +0 -1
  207. package/dist/src/invert.d.ts +0 -2
  208. package/dist/src/invert.d.ts.map +0 -1
  209. package/dist/src/join.d.ts.map +0 -1
  210. package/dist/src/mock/index.d.ts +0 -2
  211. package/dist/src/mock/index.d.ts.map +0 -1
  212. package/dist/src/optional.d.ts.map +0 -1
  213. package/dist/src/renderable.d.ts +0 -5
  214. package/dist/src/renderable.d.ts.map +0 -1
  215. package/dist/src/replace.d.ts +0 -2
  216. package/dist/src/replace.d.ts.map +0 -1
  217. package/dist/src/shallowCopy.d.ts +0 -2
  218. package/dist/src/shallowCopy.d.ts.map +0 -1
  219. package/dist/src/telem/generate.d.ts +0 -3
  220. package/dist/src/telem/generate.d.ts.map +0 -1
  221. package/dist/src/transform.d.ts +0 -6
  222. package/dist/src/transform.d.ts.map +0 -1
  223. package/dist/src/undefined.d.ts +0 -2
  224. package/dist/src/undefined.d.ts.map +0 -1
  225. package/dist/telem.cjs +0 -1
  226. package/dist/telem.js +0 -18
  227. package/dist/unique.cjs +0 -1
  228. package/dist/unique.js +0 -4
  229. package/dist/url.cjs +0 -1
  230. package/dist/url.js +0 -51
  231. package/dist/worker.cjs +0 -1
  232. package/dist/worker.js +0 -43
  233. package/dist/xy-C-MUIjVs.cjs +0 -1
  234. package/dist/xy-DnrCAZaw.js +0 -154
  235. package/dist/xy.cjs +0 -1
  236. package/dist/xy.js +0 -4
  237. package/dist/zod.cjs +0 -1
  238. package/dist/zod.js +0 -4
  239. package/src/renderable.ts +0 -20
  240. package/src/telem/generate.ts +0 -17
  241. package/src/transform.ts +0 -17
  242. package/src/undefined.ts +0 -14
  243. /package/dist/src/{join.d.ts → deep/join.d.ts} +0 -0
  244. /package/dist/src/{optional.d.ts → optional/optional.d.ts} +0 -0
  245. /package/src/{join.ts → deep/join.ts} +0 -0
  246. /package/src/{optional.ts → optional/optional.ts} +0 -0
  247. /package/src/{flush.ts → scheduler/scheduler.ts} +0 -0
@@ -1,119 +0,0 @@
1
- import { u as g } from "./index-Bv029kh3.js";
2
- const b = (e) => e != null && typeof e == "object" && "value" in e;
3
- class h {
4
- /** The underlying primitive value */
5
- value;
6
- constructor(t) {
7
- this.value = t;
8
- }
9
- /** Overrides the JS default valueOf() function to return the primitive value. */
10
- valueOf() {
11
- return this.value;
12
- }
13
- /** toJSON ensures that only the primitive value gets encoded during JSON
14
- * stringification. */
15
- toJSON() {
16
- return this.value;
17
- }
18
- /** @returns a string representation of the item. */
19
- toString() {
20
- return this.value.toString();
21
- }
22
- }
23
- const l = (e) => e != null && typeof e == "object" && "toString" in e, m = (e) => {
24
- if (l(e)) return e?.toString().length === 0;
25
- switch (typeof e) {
26
- case "string":
27
- return e.length === 0;
28
- case "number":
29
- return e === 0;
30
- case "bigint":
31
- return e === 0n;
32
- case "boolean":
33
- return !e;
34
- case "undefined":
35
- return !0;
36
- case "object":
37
- return e == null;
38
- default:
39
- return !1;
40
- }
41
- }, N = (e) => !m(e), y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42
- __proto__: null,
43
- ValueExtension: h,
44
- isCrudeValueExtension: b,
45
- isNonZero: N,
46
- isStringer: l,
47
- isZero: m
48
- }, Symbol.toStringTag, { value: "Module" })), f = (e, t = !1) => {
49
- const o = l(e) ? "stringer" : typeof e;
50
- let r;
51
- switch (o) {
52
- case "string":
53
- r = (n, s) => n.localeCompare(s);
54
- break;
55
- case "stringer":
56
- r = (n, s) => n.toString().localeCompare(s.toString());
57
- break;
58
- case "number":
59
- r = (n, s) => Number(n) - Number(s);
60
- break;
61
- case "bigint":
62
- r = (n, s) => BigInt(n) - BigInt(s) > 0n ? 1 : -1;
63
- break;
64
- case "boolean":
65
- r = (n, s) => Number(n) - Number(s);
66
- break;
67
- case "undefined":
68
- r = () => 0;
69
- break;
70
- default:
71
- return console.warn(`sortFunc: unknown type ${o}`), () => -1;
72
- }
73
- return t ? d(r) : r;
74
- }, A = (e, t, o) => {
75
- const r = f(t[e], o);
76
- return (n, s) => r(n[e], s[e]);
77
- }, E = (e, t) => e.length !== t.length ? e.length - t.length : e.every((o, r) => o === t[r]) ? 0 : -1, p = (e, t) => {
78
- if (e.length !== t.length) return e.length - t.length;
79
- if (e.length === 0) return 0;
80
- const o = f(e[0]), r = [...e].sort(o), n = [...t].sort(o);
81
- return r.every((s, i) => s === n[i]) ? 0 : -1;
82
- }, T = (e, t) => {
83
- const o = g(e), r = g(t);
84
- return p(o, r);
85
- }, _ = (e, t) => e === t ? 0 : e === "first" && t === "last" ? 1 : -1, d = (e) => (t, o) => e(o, t), c = 0, P = -1, q = 1, w = (e) => e < c, C = (e) => e > c, F = (e) => e >= c, j = (e) => e === c, k = (e, t) => {
86
- const o = /([a-zA-Z]+)|(\d+)/g, r = e.replace(/[\s_.-]+/g, "").match(o), n = t.replace(/[\s_.-]+/g, "").match(o);
87
- if (!r || !n) return 0;
88
- for (let s = 0; s < Math.min(r.length, n.length); s++) {
89
- const i = r[s], u = n[s];
90
- if (isNaN(Number(i)) && isNaN(Number(u))) {
91
- const a = i.localeCompare(u);
92
- if (a !== 0) return a;
93
- } else if (!isNaN(Number(i)) && !isNaN(Number(u))) {
94
- const a = Number(i) - Number(u);
95
- if (a !== 0) return a;
96
- } else return isNaN(Number(i)) ? -1 : 1;
97
- }
98
- return r.length - n.length;
99
- };
100
- export {
101
- c as E,
102
- q as G,
103
- P as L,
104
- h as V,
105
- j as a,
106
- C as b,
107
- w as c,
108
- F as d,
109
- A as e,
110
- E as f,
111
- p as g,
112
- b as i,
113
- f as n,
114
- _ as o,
115
- y as p,
116
- d as r,
117
- k as s,
118
- T as u
119
- };
@@ -1 +0,0 @@
1
- "use strict";const m=require("./index-CqisIWWC.cjs"),h=e=>e!=null&&typeof e=="object"&&"value"in e;class N{value;constructor(r){this.value=r}valueOf(){return this.value}toJSON(){return this.value}toString(){return this.value.toString()}}const l=e=>e!=null&&typeof e=="object"&&"toString"in e,b=e=>{if(l(e))return e?.toString().length===0;switch(typeof e){case"string":return e.length===0;case"number":return e===0;case"bigint":return e===0n;case"boolean":return!e;case"undefined":return!0;case"object":return e==null;default:return!1}},p=e=>!b(e),A=Object.freeze(Object.defineProperty({__proto__:null,ValueExtension:N,isCrudeValueExtension:h,isNonZero:p,isStringer:l,isZero:b},Symbol.toStringTag,{value:"Module"})),g=(e,r=!1)=>{const i=l(e)?"stringer":typeof e;let t;switch(i){case"string":t=(n,s)=>n.localeCompare(s);break;case"stringer":t=(n,s)=>n.toString().localeCompare(s.toString());break;case"number":t=(n,s)=>Number(n)-Number(s);break;case"bigint":t=(n,s)=>BigInt(n)-BigInt(s)>0n?1:-1;break;case"boolean":t=(n,s)=>Number(n)-Number(s);break;case"undefined":t=()=>0;break;default:return console.warn(`sortFunc: unknown type ${i}`),()=>-1}return r?d(t):t},E=(e,r,i)=>{const t=g(r[e],i);return(n,s)=>t(n[e],s[e])},S=(e,r)=>e.length!==r.length?e.length-r.length:e.every((i,t)=>i===r[t])?0:-1,f=(e,r)=>{if(e.length!==r.length)return e.length-r.length;if(e.length===0)return 0;const i=g(e[0]),t=[...e].sort(i),n=[...r].sort(i);return t.every((s,o)=>s===n[o])?0:-1},T=(e,r)=>{const i=m.unique(e),t=m.unique(r);return f(i,t)},y=(e,r)=>e===r?0:e==="first"&&r==="last"?1:-1,d=e=>(r,i)=>e(i,r),a=0,q=-1,F=1,_=e=>e<a,P=e=>e>a,v=e=>e>=a,w=e=>e===a,C=(e,r)=>{const i=/([a-zA-Z]+)|(\d+)/g,t=e.replace(/[\s_.-]+/g,"").match(i),n=r.replace(/[\s_.-]+/g,"").match(i);if(!t||!n)return 0;for(let s=0;s<Math.min(t.length,n.length);s++){const o=t[s],c=n[s];if(isNaN(Number(o))&&isNaN(Number(c))){const u=o.localeCompare(c);if(u!==0)return u}else if(!isNaN(Number(o))&&!isNaN(Number(c))){const u=Number(o)-Number(c);if(u!==0)return u}else return isNaN(Number(o))?-1:1}return t.length-n.length};exports.EQUAL=a;exports.GREATER_THAN=F;exports.LESS_THAN=q;exports.ValueExtension=N;exports.isCrudeValueExtension=h;exports.isEqualTo=w;exports.isGreaterThan=P;exports.isGreaterThanEqual=v;exports.isLessThan=_;exports.newF=g;exports.newFieldF=E;exports.order=y;exports.primitive=A;exports.primitiveArrays=S;exports.reverseF=d;exports.stringsWithNumbers=C;exports.uniqueUnorderedPrimitiveArrays=T;exports.unorderedPrimitiveArrays=f;
package/dist/compare.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./compare-GPoFaKRW.cjs"),l=(i,t,n)=>{let r=0,o=i.length;const u=n??e.newF(t);for(;r<o;){const s=Math.floor((r+o)/2),a=u(i[s],t);if(a===0)return s;a<0?r=s+1:o=s}return r},c=(i,t,n)=>{const r=l(i,t,n);i.splice(r,0,t)},d=Object.freeze(Object.defineProperty({__proto__:null,EQUAL:e.EQUAL,GREATER_THAN:e.GREATER_THAN,LESS_THAN:e.LESS_THAN,insert:c,isEqualTo:e.isEqualTo,isGreaterThan:e.isGreaterThan,isGreaterThanEqual:e.isGreaterThanEqual,isLessThan:e.isLessThan,newF:e.newF,newFieldF:e.newFieldF,order:e.order,primitiveArrays:e.primitiveArrays,reverseF:e.reverseF,search:l,stringsWithNumbers:e.stringsWithNumbers,uniqueUnorderedPrimitiveArrays:e.uniqueUnorderedPrimitiveArrays,unorderedPrimitiveArrays:e.unorderedPrimitiveArrays},Symbol.toStringTag,{value:"Module"}));exports.compare=d;
package/dist/compare.js DELETED
@@ -1,36 +0,0 @@
1
- import { n as o, E as d, G as m, L as u, a as f, b as h, d as p, c as T, e as A, o as E, f as g, r as _, s as b, u as F, g as G } from "./compare-Bnx9CdjS.js";
2
- const c = (s, r, i) => {
3
- let e = 0, a = s.length;
4
- const l = i ?? o(r);
5
- for (; e < a; ) {
6
- const t = Math.floor((e + a) / 2), n = l(s[t], r);
7
- if (n === 0) return t;
8
- n < 0 ? e = t + 1 : a = t;
9
- }
10
- return e;
11
- }, L = (s, r, i) => {
12
- const e = c(s, r, i);
13
- s.splice(e, 0, r);
14
- }, q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15
- __proto__: null,
16
- EQUAL: d,
17
- GREATER_THAN: m,
18
- LESS_THAN: u,
19
- insert: L,
20
- isEqualTo: f,
21
- isGreaterThan: h,
22
- isGreaterThanEqual: p,
23
- isLessThan: T,
24
- newF: o,
25
- newFieldF: A,
26
- order: E,
27
- primitiveArrays: g,
28
- reverseF: _,
29
- search: c,
30
- stringsWithNumbers: b,
31
- uniqueUnorderedPrimitiveArrays: F,
32
- unorderedPrimitiveArrays: G
33
- }, Symbol.toStringTag, { value: "Module" }));
34
- export {
35
- q as compare
36
- };
package/dist/debounce.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=(e,l)=>{let t=null;return l===0?e:(...u)=>{t!==null&&(clearTimeout(t),t=null),t=setTimeout(()=>e(...u),l)}},r=(e,l)=>{let t=null;return l===0?e:(...u)=>{t===null&&(t=setTimeout(()=>{e(...u),t=null},l))}};exports.debounce=n;exports.throttle=r;
package/dist/debounce.js DELETED
@@ -1,17 +0,0 @@
1
- const o = (e, l) => {
2
- let t = null;
3
- return l === 0 ? e : (...u) => {
4
- t !== null && (clearTimeout(t), t = null), t = setTimeout(() => e(...u), l);
5
- };
6
- }, r = (e, l) => {
7
- let t = null;
8
- return l === 0 ? e : (...u) => {
9
- t === null && (t = setTimeout(() => {
10
- e(...u), t = null;
11
- }, l));
12
- };
13
- };
14
- export {
15
- o as debounce,
16
- r as throttle
17
- };
package/dist/deep.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./get-D2VRwUw4.cjs"),d=require("./identity.cjs"),A=l=>{try{return structuredClone(l)}catch{return console.warn("Failed to deep copy object, falling back to JSON.parse(JSON.stringify)",l),console.trace(),JSON.parse(JSON.stringify(l))}},j=(l,c,o="")=>{const t={},n=(i,e,r)=>{if(typeof i!=typeof e||i===null||e===null){t[r]=[i,e];return}if(typeof i=="object"&&typeof e=="object")if(Array.isArray(i)&&Array.isArray(e)){if(i.length!==e.length){t[r]=[i,e];return}for(let s=0;s<i.length;s++)n(i[s],e[s],`${r}[${s}]`)}else new Set([...Object.keys(i),...Object.keys(e)]).forEach(f=>{n(i[f],e[f],r!==""?`${r}.${f}`:f)});else i!==e&&(t[r]=[i,e])};return n(l,c,o),t},g=(l,c)=>{const o=Array.isArray(l),t=Array.isArray(c);if(o!==t)return!1;if(o&&t){const e=l,r=c;if(e.length!==r.length)return!1;for(let s=0;s<e.length;s++)if(!g(e[s],r[s]))return!1;return!0}if(l==null||c==null||typeof l!="object"||typeof c!="object")return l===c;if("equals"in l)return l.equals(c);const n=Object.keys(l),i=Object.keys(c);if(n.length!==i.length)return!1;for(const e of n){const r=l[e],s=c[e];if(typeof r=="object"&&typeof s=="object"){if(!g(r,s))return!1}else if(r!==s)return!1}return!0},h=(l,c)=>{if(typeof l!="object"||l==null)return l===c;const o=Object.keys(l),t=Object.keys(c);if(t.length>o.length)return!1;for(const n of t){const i=l[n],e=c[n];if(typeof i=="object"&&typeof e=="object"){if(!h(i,e))return!1}else if(i!==e)return!1}return!0},p=(l,...c)=>{if(c.length===0)return l;const o=c.shift();if(d.isObject(l)&&d.isObject(o))for(const t in o)try{d.isObject(o[t])?(t in l||Object.assign(l,{[t]:{}}),p(l[t],o[t])):Object.assign(l,{[t]:o[t]})}catch(n){throw n instanceof TypeError?new TypeError(`.${t}: ${n.message}`):n}return p(l,...c)},x=(l,c,o)=>{const t=(n,i,e)=>{if(e.def?.type==="union")return e.def.options.reduce((r,s)=>t(r,i,s),n);if(e.def?.type==="intersection"){const r=t(n,i,e.def.left);return t(r,i,e.def.right)}for(const r in i){const s=i[r];let f=e?.shape;if(f!=null)for(;f!=null;){if(f[r]!=null){const u=f[r].safeParse(s);if(u.success){n[r]=u.data;break}}f=f.def?.shape}typeof s=="object"&&!Array.isArray(s)&&s!==null&&e&&e.shape&&e.shape[r]&&(n[r]||={},t(n[r],s,e.shape[r]))}return n};return t({...l},c,o)},k=(l,c)=>{const o=c.split(y.SEPARATOR);let t=l,n=0;for(;n<o.length;){if(n===o.length-1){const e=o[n];if(Array.isArray(t)){const r=parseInt(e);if(!isNaN(r)&&r<t.length){t.splice(r,1);return}const s=t[0];if(typeof s=="object"&&"key"in s){const f=t.findIndex(u=>u.key===e);if(f!==-1){t.splice(f,1);return}}return}delete t[e];return}let i=!1;if(Array.isArray(t)&&t.length>0){const e=t[0];if(typeof e=="object"&&"key"in e)for(let r=o.length-n;r>=1;r--){const s=o.slice(n,n+r).join(y.SEPARATOR),f=t.find(u=>u.key===s);if(f!=null){if(n+r===o.length){const u=t.findIndex(a=>a.key===s);u!==-1&&t.splice(u,1);return}t=f,n+=r,i=!0;break}}}if(!i)for(let e=o.length-n;e>=1;e--){const r=o.slice(n,n+e).join(y.SEPARATOR);if(!Array.isArray(t)&&typeof t=="object"&&t!==null&&r in t){if(n+e===o.length){delete t[r];return}t=t[r],n+=e,i=!0;break}}if(!i){const e=y.defaultGetter(t,o[n]);if(e==null)return;t=e,n++}}},I=(l,c,o)=>{const t=c.split(y.SEPARATOR);let n=l,i=0;for(;i<t.length-1;){const e=y.findBestKey(n,t.slice(i,t.length-1));let r;e!=null?[r,i]=[e[0],i+e[1]]:(r=t[i],i++);let s=y.defaultGetter(n,r);if(s==null){const f=t[i];let u=y.getIndex(f);u==null&&f.startsWith("-")&&y.getIndex(f.substring(1))!=null&&(u=0),s=u!=null?[]:{},n[r]=s}n=s}try{const e=t[t.length-1];if(Array.isArray(n)){let s=y.getIndex(e);if(s==null){if(e.startsWith("-")){const f=y.getIndex(e.substring(1));f!=null&&(s=n.length-f)}if(s==null){if(n.length===0){const u=y.getIndex(e);if(u!=null){n[u]=o;return}}const f=n[0];if(typeof f=="object"&&"key"in f){const u=n.findIndex(a=>a.key===e);if(u!==-1){n[u]=o;return}}return}}n[s]=o;return}const r=y.findBestKey(n,[e]);if(r!=null){n[r[0]]=o;return}n[e]=o}catch(e){throw console.error("failed to set value",o,"at path",c,"on object",l),e}},O=Object.freeze(Object.defineProperty({__proto__:null,SEPARATOR:y.SEPARATOR,copy:A,defaultGetter:y.defaultGetter,difference:j,element:y.element,equal:g,findBestKey:y.findBestKey,get:y.get,getIndex:y.getIndex,has:y.has,override:p,overrideValidItems:x,partialEqual:h,pathsMatch:y.pathsMatch,remove:k,resolvePath:y.resolvePath,set:I,transformPath:y.transformPath},Symbol.toStringTag,{value:"Module"}));exports.deep=O;
package/dist/deep.js DELETED
@@ -1,247 +0,0 @@
1
- import { S as a, d as j, f as g, a as u, e as x, g as I, h as w, p as K, r as O, t as V } from "./get-CtJEJIC_.js";
2
- import { isObject as d } from "./identity.js";
3
- const N = (i) => {
4
- try {
5
- return structuredClone(i);
6
- } catch {
7
- return console.warn(
8
- "Failed to deep copy object, falling back to JSON.parse(JSON.stringify)",
9
- i
10
- ), console.trace(), JSON.parse(JSON.stringify(i));
11
- }
12
- }, $ = (i, c, o = "") => {
13
- const t = {}, n = (l, e, r) => {
14
- if (typeof l != typeof e || l === null || e === null) {
15
- t[r] = [l, e];
16
- return;
17
- }
18
- if (typeof l == "object" && typeof e == "object")
19
- if (Array.isArray(l) && Array.isArray(e)) {
20
- if (l.length !== e.length) {
21
- t[r] = [l, e];
22
- return;
23
- }
24
- for (let s = 0; s < l.length; s++) n(l[s], e[s], `${r}[${s}]`);
25
- } else
26
- (/* @__PURE__ */ new Set([...Object.keys(l), ...Object.keys(e)])).forEach((f) => {
27
- n(
28
- l[f],
29
- e[f],
30
- r !== "" ? `${r}.${f}` : f
31
- );
32
- });
33
- else l !== e && (t[r] = [l, e]);
34
- };
35
- return n(i, c, o), t;
36
- }, h = (i, c) => {
37
- const o = Array.isArray(i), t = Array.isArray(c);
38
- if (o !== t) return !1;
39
- if (o && t) {
40
- const e = i, r = c;
41
- if (e.length !== r.length) return !1;
42
- for (let s = 0; s < e.length; s++) if (!h(e[s], r[s])) return !1;
43
- return !0;
44
- }
45
- if (i == null || c == null || typeof i != "object" || typeof c != "object")
46
- return i === c;
47
- if ("equals" in i) return i.equals(c);
48
- const n = Object.keys(i), l = Object.keys(c);
49
- if (n.length !== l.length) return !1;
50
- for (const e of n) {
51
- const r = i[e], s = c[e];
52
- if (typeof r == "object" && typeof s == "object") {
53
- if (!h(r, s)) return !1;
54
- } else if (r !== s) return !1;
55
- }
56
- return !0;
57
- }, k = (i, c) => {
58
- if (typeof i != "object" || i == null) return i === c;
59
- const o = Object.keys(i), t = Object.keys(c);
60
- if (t.length > o.length) return !1;
61
- for (const n of t) {
62
- const l = i[n], e = c[n];
63
- if (typeof l == "object" && typeof e == "object") {
64
- if (!k(l, e)) return !1;
65
- } else if (l !== e) return !1;
66
- }
67
- return !0;
68
- }, A = (i, ...c) => {
69
- if (c.length === 0) return i;
70
- const o = c.shift();
71
- if (d(i) && d(o))
72
- for (const t in o)
73
- try {
74
- d(o[t]) ? (t in i || Object.assign(i, { [t]: {} }), A(i[t], o[t])) : Object.assign(i, { [t]: o[t] });
75
- } catch (n) {
76
- throw n instanceof TypeError ? new TypeError(`.${t}: ${n.message}`) : n;
77
- }
78
- return A(i, ...c);
79
- }, E = (i, c, o) => {
80
- const t = (n, l, e) => {
81
- if (e.def?.type === "union")
82
- return e.def.options.reduce(
83
- (r, s) => t(r, l, s),
84
- n
85
- );
86
- if (e.def?.type === "intersection") {
87
- const r = t(n, l, e.def.left);
88
- return t(r, l, e.def.right);
89
- }
90
- for (const r in l) {
91
- const s = l[r];
92
- let f = e?.shape;
93
- if (f != null)
94
- for (; f != null; ) {
95
- if (f[r] != null) {
96
- const y = f[r].safeParse(s);
97
- if (y.success) {
98
- n[r] = y.data;
99
- break;
100
- }
101
- }
102
- f = f.def?.shape;
103
- }
104
- typeof s == "object" && !Array.isArray(s) && s !== null && e && e.shape && e.shape[r] && (n[r] ||= {}, t(n[r], s, e.shape[r]));
105
- }
106
- return n;
107
- };
108
- return t({ ...i }, c, o);
109
- }, _ = (i, c) => {
110
- const o = c.split(a);
111
- let t = i, n = 0;
112
- for (; n < o.length; ) {
113
- if (n === o.length - 1) {
114
- const e = o[n];
115
- if (Array.isArray(t)) {
116
- const r = parseInt(e);
117
- if (!isNaN(r) && r < t.length) {
118
- t.splice(r, 1);
119
- return;
120
- }
121
- const s = t[0];
122
- if (typeof s == "object" && "key" in s) {
123
- const f = t.findIndex((y) => y.key === e);
124
- if (f !== -1) {
125
- t.splice(f, 1);
126
- return;
127
- }
128
- }
129
- return;
130
- }
131
- delete t[e];
132
- return;
133
- }
134
- let l = !1;
135
- if (Array.isArray(t) && t.length > 0) {
136
- const e = t[0];
137
- if (typeof e == "object" && "key" in e)
138
- for (let r = o.length - n; r >= 1; r--) {
139
- const s = o.slice(n, n + r).join(a), f = t.find((y) => y.key === s);
140
- if (f != null) {
141
- if (n + r === o.length) {
142
- const y = t.findIndex((p) => p.key === s);
143
- y !== -1 && t.splice(y, 1);
144
- return;
145
- }
146
- t = f, n += r, l = !0;
147
- break;
148
- }
149
- }
150
- }
151
- if (!l)
152
- for (let e = o.length - n; e >= 1; e--) {
153
- const r = o.slice(n, n + e).join(a);
154
- if (!Array.isArray(t) && typeof t == "object" && t !== null && r in t) {
155
- if (n + e === o.length) {
156
- delete t[r];
157
- return;
158
- }
159
- t = t[r], n += e, l = !0;
160
- break;
161
- }
162
- }
163
- if (!l) {
164
- const e = j(t, o[n]);
165
- if (e == null) return;
166
- t = e, n++;
167
- }
168
- }
169
- }, m = (i, c, o) => {
170
- const t = c.split(a);
171
- let n = i, l = 0;
172
- for (; l < t.length - 1; ) {
173
- const e = g(n, t.slice(l, t.length - 1));
174
- let r;
175
- e != null ? [r, l] = [e[0], l + e[1]] : (r = t[l], l++);
176
- let s = j(n, r);
177
- if (s == null) {
178
- const f = t[l];
179
- let y = u(f);
180
- y == null && f.startsWith("-") && u(f.substring(1)) != null && (y = 0), s = y != null ? [] : {}, n[r] = s;
181
- }
182
- n = s;
183
- }
184
- try {
185
- const e = t[t.length - 1];
186
- if (Array.isArray(n)) {
187
- let s = u(e);
188
- if (s == null) {
189
- if (e.startsWith("-")) {
190
- const f = u(e.substring(1));
191
- f != null && (s = n.length - f);
192
- }
193
- if (s == null) {
194
- if (n.length === 0) {
195
- const y = u(e);
196
- if (y != null) {
197
- n[y] = o;
198
- return;
199
- }
200
- }
201
- const f = n[0];
202
- if (typeof f == "object" && "key" in f) {
203
- const y = n.findIndex((p) => p.key === e);
204
- if (y !== -1) {
205
- n[y] = o;
206
- return;
207
- }
208
- }
209
- return;
210
- }
211
- }
212
- n[s] = o;
213
- return;
214
- }
215
- const r = g(n, [e]);
216
- if (r != null) {
217
- n[r[0]] = o;
218
- return;
219
- }
220
- n[e] = o;
221
- } catch (e) {
222
- throw console.error("failed to set value", o, "at path", c, "on object", i), e;
223
- }
224
- }, T = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
225
- __proto__: null,
226
- SEPARATOR: a,
227
- copy: N,
228
- defaultGetter: j,
229
- difference: $,
230
- element: x,
231
- equal: h,
232
- findBestKey: g,
233
- get: I,
234
- getIndex: u,
235
- has: w,
236
- override: A,
237
- overrideValidItems: E,
238
- partialEqual: k,
239
- pathsMatch: K,
240
- remove: _,
241
- resolvePath: O,
242
- set: m,
243
- transformPath: V
244
- }, Symbol.toStringTag, { value: "Module" }));
245
- export {
246
- T as deep
247
- };
@@ -1 +0,0 @@
1
- "use strict";
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
- "use strict";const h=require("zod"),s=require("./base-KIBsp6TI.cjs"),o=h.z.object({signedWidth:h.z.number(),signedHeight:h.z.number()}),g=h.z.union([s.dimensions,o,s.xy,s.numberCouple]),c={width:0,height:0},u={width:1,height:1},n=(t,e)=>typeof t=="number"?{width:t,height:e??t}:Array.isArray(t)?{width:t[0],height:t[1]}:"x"in t?{width:t.x,height:t.y}:"signedWidth"in t?{width:t.signedWidth,height:t.signedHeight}:{...t},a=(t,e)=>{if(e==null)return!1;const i=n(t),r=n(e);return i.width===r.width&&i.height===r.height},d=t=>{const e=n(t);return{width:e.height,height:e.width}},m=t=>{const e=n(t);return`0 0 ${e.width} ${e.height}`},l=t=>{const e=n(t);return[e.width,e.height]},p=t=>({width:Math.max(...t.map(e=>n(e).width)),height:Math.max(...t.map(e=>n(e).height))}),b=t=>({width:Math.min(...t.map(e=>n(e).width)),height:Math.min(...t.map(e=>n(e).height))}),f=(t,e)=>{const i=n(t);return{width:i.width*e,height:i.height*e}},w=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:u,ZERO:c,construct:n,couple:l,crude:g,dimensions:s.dimensions,equals:a,max:p,min:b,scale:f,signed:o,svgViewBox:m,swap:d},Symbol.toStringTag,{value:"Module"}));exports.dimensions=w;
@@ -1,43 +0,0 @@
1
- import { z as h } from "zod";
2
- import { d as o, x as g, n as a } from "./base-DRybODwJ.js";
3
- const r = h.object({ signedWidth: h.number(), signedHeight: h.number() }), c = h.union([o, r, g, a]), u = { width: 0, height: 0 }, m = { width: 1, height: 1 }, n = (t, e) => typeof t == "number" ? { width: t, height: e ?? t } : Array.isArray(t) ? { width: t[0], height: t[1] } : "x" in t ? { width: t.x, height: t.y } : "signedWidth" in t ? { width: t.signedWidth, height: t.signedHeight } : { ...t }, d = (t, e) => {
4
- if (e == null) return !1;
5
- const i = n(t), s = n(e);
6
- return i.width === s.width && i.height === s.height;
7
- }, p = (t) => {
8
- const e = n(t);
9
- return { width: e.height, height: e.width };
10
- }, l = (t) => {
11
- const e = n(t);
12
- return `0 0 ${e.width} ${e.height}`;
13
- }, f = (t) => {
14
- const e = n(t);
15
- return [e.width, e.height];
16
- }, x = (t) => ({
17
- width: Math.max(...t.map((e) => n(e).width)),
18
- height: Math.max(...t.map((e) => n(e).height))
19
- }), b = (t) => ({
20
- width: Math.min(...t.map((e) => n(e).width)),
21
- height: Math.min(...t.map((e) => n(e).height))
22
- }), w = (t, e) => {
23
- const i = n(t);
24
- return { width: i.width * e, height: i.height * e };
25
- }, _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
26
- __proto__: null,
27
- DECIMAL: m,
28
- ZERO: u,
29
- construct: n,
30
- couple: f,
31
- crude: c,
32
- dimensions: o,
33
- equals: d,
34
- max: x,
35
- min: b,
36
- scale: w,
37
- signed: r,
38
- svgViewBox: l,
39
- swap: p
40
- }, Symbol.toStringTag, { value: "Module" }));
41
- export {
42
- _ as d
43
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./dimensions-Cg5Owbwn.cjs");exports.dimensions=e.dimensions;
@@ -1,4 +0,0 @@
1
- import { d } from "./dimensions-DC0uLPwn.js";
2
- export {
3
- d as dimensions
4
- };
@@ -1,19 +0,0 @@
1
- import { c as i, D as n, Y as o, b as r } from "./base-DRybODwJ.js";
2
- const s = i, t = (e) => n.includes(e) ? e : o.includes(e) ? "y" : "x", c = (e) => t(e) === "x" ? "y" : "x", d = (e) => t(e) === "x" ? "width" : "height", u = (e) => t(e) === "x" ? "left" : "top", a = (e) => s.safeParse(e).success, l = (e) => t(e) === "x" ? "signedWidth" : "signedHeight", f = (e) => e === "center" ? !1 : t(e) === "x", x = (e) => t(e) === "y", p = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3
- __proto__: null,
4
- DIRECTIONS: n,
5
- construct: t,
6
- crude: s,
7
- dimension: d,
8
- direction: r,
9
- isDirection: a,
10
- isX: f,
11
- isY: x,
12
- location: u,
13
- signedDimension: l,
14
- swap: c
15
- }, Symbol.toStringTag, { value: "Module" }));
16
- export {
17
- t as c,
18
- p as d
19
- };
@@ -1 +0,0 @@
1
- "use strict";const n=require("./base-KIBsp6TI.cjs"),i=n.crudeDirection,t=e=>n.DIRECTIONS.includes(e)?e:n.Y_LOCATIONS.includes(e)?"y":"x",s=e=>t(e)==="x"?"y":"x",c=e=>t(e)==="x"?"width":"height",o=e=>t(e)==="x"?"left":"top",r=e=>i.safeParse(e).success,u=e=>t(e)==="x"?"signedWidth":"signedHeight",d=e=>e==="center"?!1:t(e)==="x",l=e=>t(e)==="y",a=Object.freeze(Object.defineProperty({__proto__:null,DIRECTIONS:n.DIRECTIONS,construct:t,crude:i,dimension:c,direction:n.direction,isDirection:r,isX:d,isY:l,location:o,signedDimension:u,swap:s},Symbol.toStringTag,{value:"Module"}));exports.construct=t;exports.direction=a;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./direction-DqQB9M37.cjs");exports.direction=e.direction;
package/dist/direction.js DELETED
@@ -1,4 +0,0 @@
1
- import { d } from "./direction-C_b4tfRN.js";
2
- export {
3
- d as direction
4
- };
@@ -1,23 +0,0 @@
1
- import a from "zod";
2
- import { t as i, g as f } from "./get-CtJEJIC_.js";
3
- const m = (e) => e.nullable().transform((t) => t === null ? void 0 : t).optional(), p = (e) => a.array(e).or(e.transform((t) => [t])), s = (e) => i(e, (t, r, n) => {
4
- const l = r === n.length - 1, u = !isNaN(parseInt(t)), c = !isNaN(parseInt(n[r + 1]));
5
- return u && (t = "element"), l || c ? t : [t, "shape"];
6
- }), o = (e, t) => {
7
- if (e == null) return null;
8
- const r = e[t];
9
- return r == null && typeof e == "object" && "sourceType" in e ? e.sourceType()[t] : r;
10
- }, y = ((e, t, r) => t === "" ? e : f(
11
- o(e, "shape"),
12
- s(t),
13
- { ...r, getter: o }
14
- )), d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15
- __proto__: null,
16
- getFieldSchema: y,
17
- getFieldSchemaPath: s,
18
- nullToUndefined: m,
19
- toArray: p
20
- }, Symbol.toStringTag, { value: "Module" }));
21
- export {
22
- d as e
23
- };
@@ -1 +0,0 @@
1
- "use strict";const r=require("zod"),t=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null?"node":typeof window>"u"||window.document===void 0?"webworker":"browser",u=t(),s=["macOS","Windows","Linux"],c=["macos","windows","linux"],d={macos:"macOS",windows:"Windows",linux:"Linux"},l=r.z.enum(s).or(r.z.enum(c).transform(n=>d[n])),f=()=>{if(typeof window>"u")return;const n=window.navigator.userAgent.toLowerCase();if(n.includes("mac"))return"macOS";if(n.includes("win"))return"Windows";if(n.includes("linux"))return"Linux"};let e;const w=((n={})=>{const{force:o,default:i}=n;return o??e??(e=f(),e??i)}),a=Object.freeze(Object.defineProperty({__proto__:null,OPERATING_SYSTEMS:s,RUNTIME:u,detect:t,getOS:w,osZ:l},Symbol.toStringTag,{value:"Module"}));exports.external=a;
@@ -1,29 +0,0 @@
1
- import { z as r } from "zod";
2
- const t = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", u = t(), i = ["macOS", "Windows", "Linux"], d = ["macos", "windows", "linux"], c = {
3
- macos: "macOS",
4
- windows: "Windows",
5
- linux: "Linux"
6
- }, l = r.enum(i).or(
7
- r.enum(d).transform((n) => c[n])
8
- ), f = () => {
9
- if (typeof window > "u") return;
10
- const n = window.navigator.userAgent.toLowerCase();
11
- if (n.includes("mac")) return "macOS";
12
- if (n.includes("win")) return "Windows";
13
- if (n.includes("linux")) return "Linux";
14
- };
15
- let e;
16
- const w = ((n = {}) => {
17
- const { force: o, default: s } = n;
18
- return o ?? e ?? (e = f(), e ?? s);
19
- }), S = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
20
- __proto__: null,
21
- OPERATING_SYSTEMS: i,
22
- RUNTIME: u,
23
- detect: t,
24
- getOS: w,
25
- osZ: l
26
- }, Symbol.toStringTag, { value: "Module" }));
27
- export {
28
- S as e
29
- };
@@ -1 +0,0 @@
1
- "use strict";const s=require("zod");class n{store=new Map;async get(e){return this.store.get(e)??null}async set(e,t){this.store.set(e,t)}async delete(e){this.store.delete(e)}async length(){return this.store.size}async clear(){this.store.clear()}}class o{store=new Map;get(e){return this.store.get(e)??null}set(e,t){this.store.set(e,t)}delete(e){this.store.delete(e)}}const l=s.z.object({key:s.z.string(),value:s.z.string()}),c=Object.freeze(Object.defineProperty({__proto__:null,MockAsync:n,MockSync:o,stringPairZ:l},Symbol.toStringTag,{value:"Module"}));exports.external=c;
@@ -1,40 +0,0 @@
1
- import { z as s } from "zod";
2
- class n {
3
- store = /* @__PURE__ */ new Map();
4
- async get(e) {
5
- return this.store.get(e) ?? null;
6
- }
7
- async set(e, t) {
8
- this.store.set(e, t);
9
- }
10
- async delete(e) {
11
- this.store.delete(e);
12
- }
13
- async length() {
14
- return this.store.size;
15
- }
16
- async clear() {
17
- this.store.clear();
18
- }
19
- }
20
- class o {
21
- store = /* @__PURE__ */ new Map();
22
- get(e) {
23
- return this.store.get(e) ?? null;
24
- }
25
- set(e, t) {
26
- this.store.set(e, t);
27
- }
28
- delete(e) {
29
- this.store.delete(e);
30
- }
31
- }
32
- const l = s.object({ key: s.string(), value: s.string() }), a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33
- __proto__: null,
34
- MockAsync: n,
35
- MockSync: o,
36
- stringPairZ: l
37
- }, Symbol.toStringTag, { value: "Module" }));
38
- export {
39
- a as e
40
- };
@@ -1 +0,0 @@
1
- "use strict";const a=require("zod"),s=require("./get-D2VRwUw4.cjs"),f=e=>e.nullable().transform(t=>t===null?void 0:t).optional(),y=e=>a.array(e).or(e.transform(t=>[t])),u=e=>s.transformPath(e,(t,r,n)=>{const l=r===n.length-1,c=!isNaN(parseInt(t)),i=!isNaN(parseInt(n[r+1]));return c&&(t="element"),l||i?t:[t,"shape"]}),o=(e,t)=>{if(e==null)return null;const r=e[t];return r==null&&typeof e=="object"&&"sourceType"in e?e.sourceType()[t]:r},g=((e,t,r)=>t===""?e:s.get(o(e,"shape"),u(t),{...r,getter:o})),p=Object.freeze(Object.defineProperty({__proto__:null,getFieldSchema:g,getFieldSchemaPath:u,nullToUndefined:f,toArray:y},Symbol.toStringTag,{value:"Module"}));exports.external=p;
@@ -1 +0,0 @@
1
- "use strict";const u=require("zod"),o=r=>u.union([u.union([u.null(),u.undefined()]).transform(()=>[]),r.array()]),d=r=>Array.isArray(r)?r:r==null?[]:[r],f=(r,n)=>{if(Array.isArray(n))return n.reduce((i,l)=>f(i,l),r??[]);if(r==null)return[n];const t=r.findIndex(i=>i==n),e=[...r];return t===-1?e.push(n):e[t]=n,e},s=((r,n)=>{if(r!=null)return Array.isArray(n)?r.filter(t=>!n.includes(t)):r.filter(t=>t!=n)}),y=(r,n)=>{if(Array.isArray(n))return n.reduce((i,l)=>y(i,l),r??[]);if(r==null)return[n];const t=r.findIndex(i=>i.key===n.key),e=[...r];return t===-1?e.push(n):e[t]=n,e},A=((r,n)=>{if(r!=null)return Array.isArray(n)?r.filter(t=>!n.includes(t.key)):r.filter(t=>t.key!==n)}),c=Object.freeze(Object.defineProperty({__proto__:null,nullableZ:o,remove:s,removeKeyed:A,toArray:d,upsert:f,upsertKeyed:y},Symbol.toStringTag,{value:"Module"}));exports.external=c;exports.nullableZ=o;