inferred-types 0.46.1 → 0.47.0

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 (697) hide show
  1. package/dist/constants/Marked.d.ts +7 -0
  2. package/dist/constants/Marked.d.ts.map +1 -1
  3. package/dist/constants/Never.d.ts.map +1 -1
  4. package/dist/constants/TypeTokens.d.ts +15 -0
  5. package/dist/constants/TypeTokens.d.ts.map +1 -1
  6. package/dist/constants/TypeTokens.js +92 -0
  7. package/dist/constants/Wide.d.ts +2 -1
  8. package/dist/constants/Wide.d.ts.map +1 -1
  9. package/dist/constants/Wide.js +0 -1
  10. package/dist/constants/createConstant.d.ts.map +1 -1
  11. package/dist/constants/tsconfig.tsbuildinfo +1 -1
  12. package/dist/inferred-types/index.cjs +1799 -1076
  13. package/dist/inferred-types/tsconfig.tsbuildinfo +1 -1
  14. package/dist/runtime/api/defineApi.d.ts +1 -36
  15. package/dist/runtime/api/defineApi.d.ts.map +1 -1
  16. package/dist/runtime/api/defineApi.js +90 -73
  17. package/dist/runtime/api/handleDoneFn.d.ts.map +1 -1
  18. package/dist/runtime/api/index.d.ts +1 -1
  19. package/dist/runtime/boolean-logic/ifArray.d.ts.map +1 -1
  20. package/dist/runtime/boolean-logic/ifArrayPartial.d.ts +1 -1
  21. package/dist/runtime/boolean-logic/ifArrayPartial.d.ts.map +1 -1
  22. package/dist/runtime/boolean-logic/ifBoolean.d.ts.map +1 -1
  23. package/dist/runtime/boolean-logic/ifChar.d.ts.map +1 -1
  24. package/dist/runtime/boolean-logic/ifFalse.d.ts.map +1 -1
  25. package/dist/runtime/boolean-logic/ifHasKey.d.ts.map +1 -1
  26. package/dist/runtime/boolean-logic/ifLength.d.ts.map +1 -1
  27. package/dist/runtime/boolean-logic/ifNotNull.d.ts.map +1 -1
  28. package/dist/runtime/boolean-logic/ifNull.d.ts.map +1 -1
  29. package/dist/runtime/boolean-logic/ifNumber.d.ts.map +1 -1
  30. package/dist/runtime/boolean-logic/ifScalar.d.ts.map +1 -1
  31. package/dist/runtime/boolean-logic/ifString.d.ts.map +1 -1
  32. package/dist/runtime/boolean-logic/ifTrue.d.ts.map +1 -1
  33. package/dist/runtime/boolean-logic/ifUndefined.d.ts.map +1 -1
  34. package/dist/runtime/boolean-logic/ifUndefined.js +1 -1
  35. package/dist/runtime/combinators/and.d.ts.map +1 -1
  36. package/dist/runtime/combinators/or.d.ts.map +1 -1
  37. package/dist/runtime/dictionary/entries.js +1 -1
  38. package/dist/runtime/dictionary/get.d.ts.map +1 -1
  39. package/dist/runtime/dictionary/keysOf.d.ts.map +1 -1
  40. package/dist/runtime/dictionary/omit.d.ts.map +1 -1
  41. package/dist/runtime/dictionary/retain.d.ts +4 -9
  42. package/dist/runtime/dictionary/retain.d.ts.map +1 -1
  43. package/dist/runtime/dictionary/sharedKeys.d.ts +1 -1
  44. package/dist/runtime/dictionary/sharedKeys.d.ts.map +1 -1
  45. package/dist/runtime/dictionary/takeProp.d.ts.map +1 -1
  46. package/dist/runtime/dictionary/valuesOf.d.ts.map +1 -1
  47. package/dist/runtime/dictionary/withDefaults.d.ts.map +1 -1
  48. package/dist/runtime/dictionary/withKeys.d.ts +2 -2
  49. package/dist/runtime/dictionary/withKeys.d.ts.map +1 -1
  50. package/dist/runtime/dictionary/withoutKeys.d.ts +1 -13
  51. package/dist/runtime/dictionary/withoutKeys.d.ts.map +1 -1
  52. package/dist/runtime/dictionary/withoutValue.d.ts.map +1 -1
  53. package/dist/runtime/errors/KindError.d.ts.map +1 -1
  54. package/dist/runtime/errors/TypedError.d.ts.map +1 -1
  55. package/dist/runtime/errors/createErrorCondition.d.ts +5 -0
  56. package/dist/runtime/errors/createErrorCondition.d.ts.map +1 -1
  57. package/dist/runtime/errors/createErrorCondition.js +5 -0
  58. package/dist/runtime/errors/kindedError.d.ts.map +1 -1
  59. package/dist/runtime/functions/fnMeta.d.ts.map +1 -1
  60. package/dist/runtime/index.d.ts +2 -0
  61. package/dist/runtime/index.d.ts.map +1 -1
  62. package/dist/runtime/index.js +2 -0
  63. package/dist/runtime/initializers/addFnToProps.d.ts +2 -2
  64. package/dist/runtime/initializers/addFnToProps.d.ts.map +1 -1
  65. package/dist/runtime/initializers/addPropsToFn.d.ts +2 -2
  66. package/dist/runtime/initializers/addPropsToFn.d.ts.map +1 -1
  67. package/dist/runtime/initializers/createFnWithProps.d.ts.map +1 -1
  68. package/dist/runtime/initializers/defineObj.d.ts +2 -2
  69. package/dist/runtime/initializers/defineObj.d.ts.map +1 -1
  70. package/dist/runtime/initializers/defineTuple.d.ts.map +1 -1
  71. package/dist/runtime/lists/asArray.d.ts.map +1 -1
  72. package/dist/runtime/lists/createComparison.d.ts +2 -3
  73. package/dist/runtime/lists/createComparison.d.ts.map +1 -1
  74. package/dist/runtime/lists/createComparison.js +1 -1
  75. package/dist/runtime/lists/createConverter.d.ts +1 -1
  76. package/dist/runtime/lists/createConverter.d.ts.map +1 -1
  77. package/dist/runtime/lists/filter.d.ts +1 -1
  78. package/dist/runtime/lists/filter.js +4 -4
  79. package/dist/runtime/lists/find.d.ts +1 -1
  80. package/dist/runtime/lists/find.d.ts.map +1 -1
  81. package/dist/runtime/lists/index.d.ts +0 -1
  82. package/dist/runtime/lists/index.d.ts.map +1 -1
  83. package/dist/runtime/lists/index.js +0 -1
  84. package/dist/runtime/lists/indexOf.d.ts.map +1 -1
  85. package/dist/runtime/lists/indexOf.js +8 -5
  86. package/dist/runtime/lists/intersection.d.ts.map +1 -1
  87. package/dist/runtime/lists/join.d.ts +1 -1
  88. package/dist/runtime/lists/join.d.ts.map +1 -1
  89. package/dist/runtime/lists/join.js +6 -2
  90. package/dist/runtime/lists/last.d.ts +2 -2
  91. package/dist/runtime/lists/last.d.ts.map +1 -1
  92. package/dist/runtime/lists/logicalReturns.d.ts.map +1 -1
  93. package/dist/runtime/lists/reverse.d.ts.map +1 -1
  94. package/dist/runtime/lists/shift.d.ts +17 -5
  95. package/dist/runtime/lists/shift.d.ts.map +1 -1
  96. package/dist/runtime/lists/shift.js +33 -5
  97. package/dist/runtime/lists/slice.d.ts +2 -2
  98. package/dist/runtime/lists/slice.d.ts.map +1 -1
  99. package/dist/runtime/lists/unique.d.ts +2 -2
  100. package/dist/runtime/lists/unique.d.ts.map +1 -1
  101. package/dist/runtime/literals/box.d.ts.map +1 -1
  102. package/dist/runtime/literals/ensureLeading.d.ts +2 -2
  103. package/dist/runtime/literals/ensureLeading.d.ts.map +1 -1
  104. package/dist/runtime/literals/ensureLeading.js +6 -2
  105. package/dist/runtime/literals/ensureSurround.d.ts.map +1 -1
  106. package/dist/runtime/literals/ensureSurround.js +3 -1
  107. package/dist/runtime/literals/identity.d.ts.map +1 -1
  108. package/dist/runtime/literals/index.d.ts +2 -1
  109. package/dist/runtime/literals/index.d.ts.map +1 -1
  110. package/dist/runtime/literals/index.js +2 -1
  111. package/dist/runtime/literals/narrow.d.ts.map +1 -1
  112. package/dist/runtime/literals/phone/asPhoneNumber.d.ts +2 -0
  113. package/dist/runtime/literals/phone/asPhoneNumber.d.ts.map +1 -0
  114. package/dist/runtime/literals/phone/asPhoneNumber.js +62 -0
  115. package/dist/runtime/literals/phone/getPhoneCountryCode.d.ts +3 -0
  116. package/dist/runtime/literals/phone/getPhoneCountryCode.d.ts.map +1 -0
  117. package/dist/runtime/literals/phone/getPhoneCountryCode.js +7 -0
  118. package/dist/runtime/literals/phone/index.d.ts +4 -0
  119. package/dist/runtime/literals/phone/index.d.ts.map +1 -0
  120. package/dist/runtime/literals/phone/index.js +3 -0
  121. package/dist/runtime/literals/phone/removePhoneCountryCode.d.ts +3 -0
  122. package/dist/runtime/literals/phone/removePhoneCountryCode.d.ts.map +1 -0
  123. package/dist/runtime/literals/phone/removePhoneCountryCode.js +7 -0
  124. package/dist/runtime/literals/pluralize.d.ts.map +1 -1
  125. package/dist/runtime/literals/pluralize.js +4 -1
  126. package/dist/runtime/literals/retainAfter.d.ts.map +1 -1
  127. package/dist/runtime/literals/retainChars.d.ts +1 -1
  128. package/dist/runtime/literals/retainChars.d.ts.map +1 -1
  129. package/dist/runtime/literals/retainChars.js +2 -1
  130. package/dist/runtime/literals/retainWhile.d.ts.map +1 -1
  131. package/dist/runtime/literals/split.d.ts.map +1 -1
  132. package/dist/runtime/literals/stripAfter.d.ts.map +1 -1
  133. package/dist/runtime/literals/stripBefore.d.ts.map +1 -1
  134. package/dist/runtime/literals/stripChars.d.ts +1 -1
  135. package/dist/runtime/literals/stripChars.d.ts.map +1 -1
  136. package/dist/runtime/literals/stripChars.js +2 -1
  137. package/dist/runtime/literals/stripLeading.d.ts +1 -1
  138. package/dist/runtime/literals/stripLeading.d.ts.map +1 -1
  139. package/dist/runtime/literals/stripLeading.js +8 -6
  140. package/dist/runtime/literals/stripSurround.d.ts +19 -0
  141. package/dist/runtime/literals/stripSurround.d.ts.map +1 -0
  142. package/dist/runtime/literals/stripSurround.js +30 -0
  143. package/dist/runtime/literals/stripTrailing.d.ts +2 -2
  144. package/dist/runtime/literals/stripTrailing.d.ts.map +1 -1
  145. package/dist/runtime/literals/stripTrailing.js +9 -10
  146. package/dist/runtime/literals/stripUntil.d.ts.map +1 -1
  147. package/dist/runtime/literals/takeNumericCharacters.d.ts +2 -2
  148. package/dist/runtime/literals/takeNumericCharacters.d.ts.map +1 -1
  149. package/dist/runtime/literals/toKebabCase.d.ts.map +1 -1
  150. package/dist/runtime/literals/toNumericArray.d.ts +2 -2
  151. package/dist/runtime/literals/toNumericArray.d.ts.map +1 -1
  152. package/dist/runtime/literals/toPascalCase.d.ts.map +1 -1
  153. package/dist/runtime/literals/truncate.d.ts +1 -1
  154. package/dist/runtime/literals/truncate.d.ts.map +1 -1
  155. package/dist/runtime/literals/tuple.d.ts +1 -1
  156. package/dist/runtime/literals/tuple.d.ts.map +1 -1
  157. package/dist/runtime/meta/urlMeta.d.ts.map +1 -1
  158. package/dist/runtime/meta/urlMeta.js +8 -5
  159. package/dist/runtime/meta/youtube-meta.d.ts.map +1 -1
  160. package/dist/runtime/queues/fifo.d.ts +3 -0
  161. package/dist/runtime/queues/fifo.d.ts.map +1 -0
  162. package/dist/runtime/queues/fifo.js +40 -0
  163. package/dist/runtime/queues/index.d.ts +3 -0
  164. package/dist/runtime/queues/index.d.ts.map +1 -0
  165. package/dist/runtime/queues/index.js +2 -0
  166. package/dist/runtime/queues/lifo.d.ts +3 -0
  167. package/dist/runtime/queues/lifo.d.ts.map +1 -0
  168. package/dist/runtime/queues/lifo.js +34 -0
  169. package/dist/runtime/runtime-types/asToken.d.ts +35 -0
  170. package/dist/runtime/runtime-types/asToken.d.ts.map +1 -0
  171. package/dist/runtime/runtime-types/asToken.js +115 -0
  172. package/dist/runtime/runtime-types/asType.d.ts +4 -0
  173. package/dist/runtime/runtime-types/asType.d.ts.map +1 -0
  174. package/dist/runtime/runtime-types/asType.js +6 -0
  175. package/dist/runtime/runtime-types/choices.js +8 -8
  176. package/dist/runtime/runtime-types/index.d.ts +3 -2
  177. package/dist/runtime/runtime-types/index.d.ts.map +1 -1
  178. package/dist/runtime/runtime-types/index.js +3 -2
  179. package/dist/runtime/runtime-types/ip6Prefix.d.ts +2 -2
  180. package/dist/runtime/runtime-types/ip6Prefix.d.ts.map +1 -1
  181. package/dist/runtime/runtime-types/list.d.ts.map +1 -1
  182. package/dist/runtime/runtime-types/rec.d.ts.map +1 -1
  183. package/dist/runtime/runtime-types/shape-helpers/addToken.d.ts.map +1 -1
  184. package/dist/runtime/runtime-types/shape-helpers/atomics.d.ts.map +1 -1
  185. package/dist/runtime/runtime-types/shape-helpers/functions.d.ts +7 -2
  186. package/dist/runtime/runtime-types/shape-helpers/functions.d.ts.map +1 -1
  187. package/dist/runtime/runtime-types/shape-helpers/functions.js +5 -0
  188. package/dist/runtime/runtime-types/shape-helpers/getTokenData.d.ts +2 -1
  189. package/dist/runtime/runtime-types/shape-helpers/getTokenData.d.ts.map +1 -1
  190. package/dist/runtime/runtime-types/shape-helpers/getTokenName.d.ts +2 -1
  191. package/dist/runtime/runtime-types/shape-helpers/getTokenName.d.ts.map +1 -1
  192. package/dist/runtime/runtime-types/shape-helpers/literal-containers.d.ts.map +1 -1
  193. package/dist/runtime/runtime-types/shape-helpers/regexToken.d.ts +12 -0
  194. package/dist/runtime/runtime-types/shape-helpers/regexToken.d.ts.map +1 -0
  195. package/dist/runtime/runtime-types/shape-helpers/regexToken.js +39 -0
  196. package/dist/runtime/runtime-types/shape-helpers/singletons.d.ts +10 -0
  197. package/dist/runtime/runtime-types/shape-helpers/singletons.d.ts.map +1 -1
  198. package/dist/runtime/runtime-types/shape-helpers/singletons.js +15 -0
  199. package/dist/runtime/runtime-types/shape-helpers/union.d.ts +5 -0
  200. package/dist/runtime/runtime-types/shape-helpers/union.d.ts.map +1 -1
  201. package/dist/runtime/runtime-types/shape-helpers/union.js +5 -0
  202. package/dist/runtime/runtime-types/shape-helpers/wide-containers.d.ts +1 -1
  203. package/dist/runtime/runtime-types/shape-helpers/wide-containers.d.ts.map +1 -1
  204. package/dist/runtime/runtime-types/shape.d.ts +2 -2
  205. package/dist/runtime/runtime-types/shape.d.ts.map +1 -1
  206. package/dist/runtime/runtime-types/shape.js +1 -1
  207. package/dist/runtime/runtime-types/tokens/createTypeToken.d.ts +30 -0
  208. package/dist/runtime/runtime-types/tokens/createTypeToken.d.ts.map +1 -0
  209. package/dist/runtime/runtime-types/tokens/createTypeToken.js +29 -0
  210. package/dist/runtime/runtime-types/tokens/index.d.ts +3 -0
  211. package/dist/runtime/runtime-types/tokens/index.d.ts.map +1 -0
  212. package/dist/runtime/runtime-types/tokens/index.js +2 -0
  213. package/dist/runtime/runtime-types/tokens/simpleToken.d.ts +51 -0
  214. package/dist/runtime/runtime-types/tokens/simpleToken.d.ts.map +1 -0
  215. package/dist/runtime/runtime-types/tokens/simpleToken.js +64 -0
  216. package/dist/runtime/sets/uniqueKeys.d.ts.map +1 -1
  217. package/dist/runtime/tsconfig.tsbuildinfo +1 -1
  218. package/dist/runtime/type-conversion/asChars.d.ts.map +1 -1
  219. package/dist/runtime/type-conversion/asRecord.d.ts +1 -1
  220. package/dist/runtime/type-conversion/asRecord.d.ts.map +1 -1
  221. package/dist/runtime/type-conversion/asString.d.ts +7 -1
  222. package/dist/runtime/type-conversion/asString.d.ts.map +1 -1
  223. package/dist/runtime/type-conversion/asString.js +11 -3
  224. package/dist/runtime/type-conversion/csv.d.ts +17 -0
  225. package/dist/runtime/type-conversion/csv.d.ts.map +1 -0
  226. package/dist/runtime/type-conversion/csv.js +31 -0
  227. package/dist/runtime/type-conversion/index.d.ts +2 -0
  228. package/dist/runtime/type-conversion/index.d.ts.map +1 -1
  229. package/dist/runtime/type-conversion/index.js +2 -0
  230. package/dist/runtime/type-conversion/ip6GroupExpansion.d.ts.map +1 -1
  231. package/dist/runtime/type-conversion/json.d.ts +18 -0
  232. package/dist/runtime/type-conversion/json.d.ts.map +1 -0
  233. package/dist/runtime/type-conversion/json.js +27 -0
  234. package/dist/runtime/type-conversion/mergeObjects.d.ts.map +1 -1
  235. package/dist/runtime/type-conversion/mergeScalars.d.ts.map +1 -1
  236. package/dist/runtime/type-conversion/optional.d.ts +20 -4
  237. package/dist/runtime/type-conversion/optional.d.ts.map +1 -1
  238. package/dist/runtime/type-conversion/optional.js +24 -6
  239. package/dist/runtime/type-conversion/union.d.ts.map +1 -1
  240. package/dist/runtime/type-guards/api-tg.d.ts.map +1 -1
  241. package/dist/runtime/type-guards/hasErrorConditions.d.ts +2 -4
  242. package/dist/runtime/type-guards/hasErrorConditions.d.ts.map +1 -1
  243. package/dist/runtime/type-guards/hasIndexOf.d.ts +2 -2
  244. package/dist/runtime/type-guards/hasIndexOf.d.ts.map +1 -1
  245. package/dist/runtime/type-guards/hasKeys.d.ts.map +1 -1
  246. package/dist/runtime/type-guards/hasWhitespace.d.ts.map +1 -1
  247. package/dist/runtime/type-guards/hasWhitespace.js +1 -1
  248. package/dist/runtime/type-guards/higher-order/endsWith.d.ts.map +1 -1
  249. package/dist/runtime/type-guards/higher-order/isEqual.d.ts.map +1 -1
  250. package/dist/runtime/type-guards/higher-order/isEqual.js +1 -1
  251. package/dist/runtime/type-guards/higher-order/isLength.d.ts.map +1 -1
  252. package/dist/runtime/type-guards/higher-order/isLength.js +1 -5
  253. package/dist/runtime/type-guards/higher-order/isSameTypeOf.d.ts.map +1 -1
  254. package/dist/runtime/type-guards/higher-order/isTuple.d.ts +1 -2
  255. package/dist/runtime/type-guards/higher-order/isTuple.d.ts.map +1 -1
  256. package/dist/runtime/type-guards/higher-order/isTuple.js +1 -2
  257. package/dist/runtime/type-guards/higher-order/isTypeOf.d.ts +1 -1
  258. package/dist/runtime/type-guards/higher-order/isTypeOf.d.ts.map +1 -1
  259. package/dist/runtime/type-guards/higher-order/startsWith.d.ts.map +1 -1
  260. package/dist/runtime/type-guards/higher-order/startsWith.js +1 -2
  261. package/dist/runtime/type-guards/index.d.ts +5 -0
  262. package/dist/runtime/type-guards/index.d.ts.map +1 -1
  263. package/dist/runtime/type-guards/index.js +5 -0
  264. package/dist/runtime/type-guards/isAlpha.d.ts.map +1 -1
  265. package/dist/runtime/type-guards/isBooleanLike.d.ts +9 -0
  266. package/dist/runtime/type-guards/isBooleanLike.d.ts.map +1 -0
  267. package/dist/runtime/type-guards/isBooleanLike.js +11 -0
  268. package/dist/runtime/type-guards/isCssAspectRatio.d.ts +1 -1
  269. package/dist/runtime/type-guards/isCssAspectRatio.d.ts.map +1 -1
  270. package/dist/runtime/type-guards/isDoneFn.d.ts.map +1 -1
  271. package/dist/runtime/type-guards/isEmail.d.ts +2 -1
  272. package/dist/runtime/type-guards/isEmail.d.ts.map +1 -1
  273. package/dist/runtime/type-guards/isEmail.js +10 -4
  274. package/dist/runtime/type-guards/isFalsy.d.ts.map +1 -1
  275. package/dist/runtime/type-guards/isHexadecimal.d.ts.map +1 -1
  276. package/dist/runtime/type-guards/isInlineSvg.d.ts +2 -1
  277. package/dist/runtime/type-guards/isInlineSvg.d.ts.map +1 -1
  278. package/dist/runtime/type-guards/isLeftRight.d.ts +2 -2
  279. package/dist/runtime/type-guards/isLeftRight.d.ts.map +1 -1
  280. package/dist/runtime/type-guards/isNever.d.ts.map +1 -1
  281. package/dist/runtime/type-guards/isNumericString.d.ts +8 -0
  282. package/dist/runtime/type-guards/isNumericString.d.ts.map +1 -1
  283. package/dist/runtime/type-guards/isNumericString.js +11 -0
  284. package/dist/runtime/type-guards/isPhoneNumber.d.ts +1 -1
  285. package/dist/runtime/type-guards/isPhoneNumber.d.ts.map +1 -1
  286. package/dist/runtime/type-guards/isPhoneNumber.js +16 -10
  287. package/dist/runtime/type-guards/isRegExp.d.ts +17 -0
  288. package/dist/runtime/type-guards/isRegExp.d.ts.map +1 -0
  289. package/dist/runtime/type-guards/isRegExp.js +32 -0
  290. package/dist/runtime/type-guards/isRuntimeUnion.d.ts.map +1 -1
  291. package/dist/runtime/type-guards/isSpecificConstant.d.ts.map +1 -1
  292. package/dist/runtime/type-guards/isTrimmable.d.ts.map +1 -1
  293. package/dist/runtime/type-guards/isTruthy.d.ts.map +1 -1
  294. package/dist/runtime/type-guards/isUnset.d.ts.map +1 -1
  295. package/dist/runtime/type-guards/isUrl.d.ts +3 -3
  296. package/dist/runtime/type-guards/isUrl.d.ts.map +1 -1
  297. package/dist/runtime/type-guards/network-tg.d.ts +6 -7
  298. package/dist/runtime/type-guards/network-tg.d.ts.map +1 -1
  299. package/dist/runtime/type-guards/network-tg.js +4 -9
  300. package/dist/runtime/type-guards/repos.d.ts +9 -7
  301. package/dist/runtime/type-guards/repos.d.ts.map +1 -1
  302. package/dist/runtime/type-guards/repos.js +1 -3
  303. package/dist/runtime/type-guards/tokens/index.d.ts +6 -0
  304. package/dist/runtime/type-guards/tokens/index.d.ts.map +1 -0
  305. package/dist/runtime/type-guards/tokens/index.js +5 -0
  306. package/dist/runtime/type-guards/tokens/isAtomicToken.d.ts +9 -0
  307. package/dist/runtime/type-guards/tokens/isAtomicToken.d.ts.map +1 -0
  308. package/dist/runtime/type-guards/tokens/isAtomicToken.js +12 -0
  309. package/dist/runtime/type-guards/tokens/isContainerToken.d.ts +21 -0
  310. package/dist/runtime/type-guards/tokens/isContainerToken.d.ts.map +1 -0
  311. package/dist/runtime/type-guards/tokens/isContainerToken.js +48 -0
  312. package/dist/runtime/type-guards/tokens/isFunctionToken.d.ts +4 -0
  313. package/dist/runtime/type-guards/tokens/isFunctionToken.d.ts.map +1 -0
  314. package/dist/runtime/type-guards/tokens/isFunctionToken.js +7 -0
  315. package/dist/runtime/type-guards/tokens/isShapeToken.d.ts +9 -0
  316. package/dist/runtime/type-guards/tokens/isShapeToken.d.ts.map +1 -0
  317. package/dist/runtime/type-guards/tokens/isShapeToken.js +21 -0
  318. package/dist/runtime/type-guards/tokens/isSimpleToken.d.ts +53 -0
  319. package/dist/runtime/type-guards/tokens/isSimpleToken.d.ts.map +1 -0
  320. package/dist/runtime/type-guards/tokens/isSimpleToken.js +74 -0
  321. package/dist/runtime/type-guards/tokens/isSingletonToken.d.ts +9 -0
  322. package/dist/runtime/type-guards/tokens/isSingletonToken.d.ts.map +1 -0
  323. package/dist/runtime/type-guards/tokens/isSingletonToken.js +12 -0
  324. package/dist/runtime/type-guards/tokens/isTupleToken.d.ts +1 -0
  325. package/dist/runtime/type-guards/tokens/isTupleToken.d.ts.map +1 -0
  326. package/dist/runtime/type-guards/tokens/isTupleToken.js +1 -0
  327. package/dist/runtime/type-guards/tokens/isUnionSetToken.d.ts +1 -0
  328. package/dist/runtime/type-guards/tokens/isUnionSetToken.d.ts.map +1 -0
  329. package/dist/runtime/type-guards/tokens/isUnionSetToken.js +1 -0
  330. package/dist/runtime/type-guards/tokens/isUnionToken.d.ts +9 -0
  331. package/dist/runtime/type-guards/tokens/isUnionToken.d.ts.map +1 -0
  332. package/dist/runtime/type-guards/tokens/isUnionToken.js +12 -0
  333. package/dist/runtime/type-guards/youtube.d.ts +5 -5
  334. package/dist/runtime/type-guards/youtube.d.ts.map +1 -1
  335. package/dist/runtime/type-guards/youtube.js +1 -3
  336. package/dist/runtime/vuejs/asVueRef.d.ts +1 -1
  337. package/dist/runtime/vuejs/asVueRef.d.ts.map +1 -1
  338. package/dist/types/base-types/LikeRegExp.d.ts +9 -0
  339. package/dist/types/base-types/LikeRegExp.d.ts.map +1 -0
  340. package/dist/types/base-types/Something.d.ts.map +1 -1
  341. package/dist/types/base-types/Something.js +1 -0
  342. package/dist/types/base-types/fns/AnyFunction.d.ts.map +1 -1
  343. package/dist/types/base-types/fns/AnyFunction.js +1 -1
  344. package/dist/types/base-types/fns/FnAllowingProps.d.ts +11 -0
  345. package/dist/types/base-types/fns/FnAllowingProps.d.ts.map +1 -0
  346. package/dist/types/base-types/fns/index.d.ts +1 -2
  347. package/dist/types/base-types/fns/index.d.ts.map +1 -1
  348. package/dist/types/base-types/fns/index.js +1 -2
  349. package/dist/types/base-types/index.d.ts +1 -0
  350. package/dist/types/base-types/index.d.ts.map +1 -1
  351. package/dist/types/base-types/index.js +1 -0
  352. package/dist/types/boolean-logic/branching/OnPass.d.ts.map +1 -1
  353. package/dist/types/boolean-logic/combinators/Compare.d.ts.map +1 -1
  354. package/dist/types/boolean-logic/operators/AreSameLength.d.ts +2 -2
  355. package/dist/types/boolean-logic/operators/AreSameLength.d.ts.map +1 -1
  356. package/dist/types/boolean-logic/operators/Contains.d.ts +4 -3
  357. package/dist/types/boolean-logic/operators/Contains.d.ts.map +1 -1
  358. package/dist/types/boolean-logic/operators/HasArray.d.ts +10 -0
  359. package/dist/types/boolean-logic/operators/HasArray.d.ts.map +1 -0
  360. package/dist/types/boolean-logic/operators/HasArray.js +1 -0
  361. package/dist/types/boolean-logic/operators/HasRequiredProps.d.ts +1 -2
  362. package/dist/types/boolean-logic/operators/HasRequiredProps.d.ts.map +1 -1
  363. package/dist/types/boolean-logic/operators/HaveSameNumericSign.d.ts +9 -0
  364. package/dist/types/boolean-logic/operators/HaveSameNumericSign.d.ts.map +1 -0
  365. package/dist/types/boolean-logic/operators/HaveSameNumericSign.js +1 -0
  366. package/dist/types/boolean-logic/operators/IsEmptyString.d.ts +12 -0
  367. package/dist/types/boolean-logic/operators/IsEmptyString.d.ts.map +1 -0
  368. package/dist/types/boolean-logic/operators/IsEmptyString.js +1 -0
  369. package/dist/types/boolean-logic/operators/IsFloat.d.ts +2 -2
  370. package/dist/types/boolean-logic/operators/IsFloat.d.ts.map +1 -1
  371. package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts +8 -2
  372. package/dist/types/boolean-logic/operators/IsGreaterThan.d.ts.map +1 -1
  373. package/dist/types/boolean-logic/operators/IsInteger.d.ts +2 -2
  374. package/dist/types/boolean-logic/operators/IsInteger.d.ts.map +1 -1
  375. package/dist/types/boolean-logic/operators/IsLessThan.d.ts +8 -2
  376. package/dist/types/boolean-logic/operators/IsLessThan.d.ts.map +1 -1
  377. package/dist/types/boolean-logic/operators/IsNegativeNumber.d.ts +2 -4
  378. package/dist/types/boolean-logic/operators/IsNegativeNumber.d.ts.map +1 -1
  379. package/dist/types/boolean-logic/operators/IsNonLiteralUnion.d.ts +1 -1
  380. package/dist/types/boolean-logic/operators/IsNonLiteralUnion.d.ts.map +1 -1
  381. package/dist/types/boolean-logic/operators/IsPositiveNumber.d.ts +11 -0
  382. package/dist/types/boolean-logic/operators/IsPositiveNumber.d.ts.map +1 -0
  383. package/dist/types/boolean-logic/operators/IsPositiveNumber.js +1 -0
  384. package/dist/types/boolean-logic/operators/IsTuple.d.ts +1 -1
  385. package/dist/types/boolean-logic/operators/IsUrl.d.ts +7 -8
  386. package/dist/types/boolean-logic/operators/IsUrl.d.ts.map +1 -1
  387. package/dist/types/boolean-logic/operators/MaybeError.d.ts +20 -0
  388. package/dist/types/boolean-logic/operators/MaybeError.d.ts.map +1 -0
  389. package/dist/types/boolean-logic/operators/MaybeError.js +2 -0
  390. package/dist/types/boolean-logic/operators/PhoneOperators.d.ts +2 -3
  391. package/dist/types/boolean-logic/operators/PhoneOperators.d.ts.map +1 -1
  392. package/dist/types/boolean-logic/operators/StartsWith.d.ts +8 -9
  393. package/dist/types/boolean-logic/operators/StartsWith.d.ts.map +1 -1
  394. package/dist/types/boolean-logic/operators/UnionHasArray.d.ts +14 -0
  395. package/dist/types/boolean-logic/operators/UnionHasArray.d.ts.map +1 -0
  396. package/dist/types/boolean-logic/operators/UnionHasArray.js +1 -0
  397. package/dist/types/boolean-logic/operators/index.d.ts +6 -0
  398. package/dist/types/boolean-logic/operators/index.d.ts.map +1 -1
  399. package/dist/types/boolean-logic/operators/index.js +6 -0
  400. package/dist/types/containers/RemoveEmpty.d.ts +30 -0
  401. package/dist/types/containers/RemoveEmpty.d.ts.map +1 -0
  402. package/dist/types/containers/RemoveEmpty.js +1 -0
  403. package/dist/types/containers/RemoveMarked.d.ts +1 -1
  404. package/dist/types/containers/RemoveMarked.d.ts.map +1 -1
  405. package/dist/types/containers/RemoveUndefined.d.ts +1 -7
  406. package/dist/types/containers/RemoveUndefined.d.ts.map +1 -1
  407. package/dist/types/containers/index.d.ts +1 -0
  408. package/dist/types/containers/index.d.ts.map +1 -1
  409. package/dist/types/containers/index.js +1 -0
  410. package/dist/types/dictionary/EnsureKeys.d.ts +1 -3
  411. package/dist/types/dictionary/EnsureKeys.d.ts.map +1 -1
  412. package/dist/types/dictionary/Keys.d.ts +2 -2
  413. package/dist/types/dictionary/Keys.d.ts.map +1 -1
  414. package/dist/types/dictionary/OptionalKeys.d.ts +2 -2
  415. package/dist/types/dictionary/OptionalKeys.d.ts.map +1 -1
  416. package/dist/types/dictionary/OptionalKeys.js +0 -1
  417. package/dist/types/dictionary/RequireProps.d.ts +2 -2
  418. package/dist/types/dictionary/RequireProps.d.ts.map +1 -1
  419. package/dist/types/dictionary/RequiredKeys.d.ts +2 -2
  420. package/dist/types/dictionary/RequiredKeys.d.ts.map +1 -1
  421. package/dist/types/dictionary/WithValue.d.ts +2 -3
  422. package/dist/types/dictionary/WithValue.d.ts.map +1 -1
  423. package/dist/types/dictionary/WithoutKeys.d.ts +3 -3
  424. package/dist/types/dictionary/WithoutKeys.d.ts.map +1 -1
  425. package/dist/types/functional/Result.d.ts +1 -1
  426. package/dist/types/functional/Result.d.ts.map +1 -1
  427. package/dist/types/functions/FnFrom.d.ts +1 -1
  428. package/dist/types/functions/FnFrom.d.ts.map +1 -1
  429. package/dist/types/functions/FnWithProps.d.ts +10 -0
  430. package/dist/types/functions/FnWithProps.d.ts.map +1 -0
  431. package/dist/types/functions/FnWithProps.js +1 -0
  432. package/dist/types/functions/IdentityFn.d.ts +1 -2
  433. package/dist/types/functions/IdentityFn.d.ts.map +1 -1
  434. package/dist/types/functions/index.d.ts +1 -0
  435. package/dist/types/functions/index.d.ts.map +1 -1
  436. package/dist/types/functions/index.js +1 -0
  437. package/dist/types/index.d.ts +1 -0
  438. package/dist/types/index.d.ts.map +1 -1
  439. package/dist/types/index.js +1 -0
  440. package/dist/types/lists/AsArray.d.ts +7 -2
  441. package/dist/types/lists/AsArray.d.ts.map +1 -1
  442. package/dist/types/lists/BeforeLast.d.ts +3 -3
  443. package/dist/types/lists/Filter.d.ts +2 -9
  444. package/dist/types/lists/Filter.d.ts.map +1 -1
  445. package/dist/types/lists/FilterByProp.d.ts +37 -0
  446. package/dist/types/lists/FilterByProp.d.ts.map +1 -0
  447. package/dist/types/lists/FilterByProp.js +1 -0
  448. package/dist/types/lists/Flatten.d.ts +31 -14
  449. package/dist/types/lists/Flatten.d.ts.map +1 -1
  450. package/dist/types/lists/Last.d.ts +2 -2
  451. package/dist/types/lists/Last.d.ts.map +1 -1
  452. package/dist/types/lists/Length.d.ts +3 -4
  453. package/dist/types/lists/Length.d.ts.map +1 -1
  454. package/dist/types/lists/RetainByProp.d.ts +38 -0
  455. package/dist/types/lists/RetainByProp.d.ts.map +1 -0
  456. package/dist/types/lists/RetainByProp.js +1 -0
  457. package/dist/types/lists/Shift.d.ts +5 -3
  458. package/dist/types/lists/Shift.d.ts.map +1 -1
  459. package/dist/types/lists/Slice.d.ts +17 -9
  460. package/dist/types/lists/Slice.d.ts.map +1 -1
  461. package/dist/types/lists/TakeFirst.d.ts +21 -0
  462. package/dist/types/lists/TakeFirst.d.ts.map +1 -0
  463. package/dist/types/lists/TakeFirst.js +1 -0
  464. package/dist/types/lists/TakeLast.d.ts +16 -0
  465. package/dist/types/lists/TakeLast.d.ts.map +1 -0
  466. package/dist/types/lists/TakeLast.js +1 -0
  467. package/dist/types/lists/index.d.ts +4 -0
  468. package/dist/types/lists/index.d.ts.map +1 -1
  469. package/dist/types/lists/index.js +4 -0
  470. package/dist/types/literals/BooleanLike.d.ts +8 -0
  471. package/dist/types/literals/BooleanLike.d.ts.map +1 -0
  472. package/dist/types/literals/BooleanLike.js +1 -0
  473. package/dist/types/literals/NarrowableDefined.d.ts +2 -1
  474. package/dist/types/literals/NarrowableDefined.d.ts.map +1 -1
  475. package/dist/types/literals/NarrowableDefined.js +0 -1
  476. package/dist/types/literals/Shape.d.ts +10 -1
  477. package/dist/types/literals/Shape.d.ts.map +1 -1
  478. package/dist/types/literals/index.d.ts +1 -0
  479. package/dist/types/literals/index.d.ts.map +1 -1
  480. package/dist/types/literals/index.js +1 -0
  481. package/dist/types/numeric-literals/Abs.d.ts +2 -2
  482. package/dist/types/numeric-literals/Abs.d.ts.map +1 -1
  483. package/dist/types/numeric-literals/Add.d.ts +5 -3
  484. package/dist/types/numeric-literals/Add.d.ts.map +1 -1
  485. package/dist/types/numeric-literals/AsNegativeNumber.d.ts +12 -0
  486. package/dist/types/numeric-literals/AsNegativeNumber.d.ts.map +1 -0
  487. package/dist/types/numeric-literals/AsNegativeNumber.js +1 -0
  488. package/dist/types/numeric-literals/CSV.d.ts +73 -0
  489. package/dist/types/numeric-literals/CSV.d.ts.map +1 -0
  490. package/dist/types/numeric-literals/CSV.js +1 -0
  491. package/dist/types/numeric-literals/Delta.d.ts +14 -0
  492. package/dist/types/numeric-literals/Delta.d.ts.map +1 -0
  493. package/dist/types/numeric-literals/Delta.js +1 -0
  494. package/dist/types/numeric-literals/Digit.d.ts +2 -3
  495. package/dist/types/numeric-literals/Digit.d.ts.map +1 -1
  496. package/dist/types/numeric-literals/Digitize.d.ts +10 -20
  497. package/dist/types/numeric-literals/Digitize.d.ts.map +1 -1
  498. package/dist/types/numeric-literals/Increment.d.ts +2 -5
  499. package/dist/types/numeric-literals/Increment.d.ts.map +1 -1
  500. package/dist/types/numeric-literals/InvertNumericSign.d.ts +9 -0
  501. package/dist/types/numeric-literals/InvertNumericSign.d.ts.map +1 -0
  502. package/dist/types/numeric-literals/InvertNumericSign.js +1 -0
  503. package/dist/types/numeric-literals/NumberLike.d.ts.map +1 -1
  504. package/dist/types/numeric-literals/Subtract.d.ts +11 -8
  505. package/dist/types/numeric-literals/Subtract.d.ts.map +1 -1
  506. package/dist/types/numeric-literals/Zero.d.ts +8 -0
  507. package/dist/types/numeric-literals/Zero.d.ts.map +1 -0
  508. package/dist/types/numeric-literals/Zero.js +1 -0
  509. package/dist/types/numeric-literals/index.d.ts +5 -0
  510. package/dist/types/numeric-literals/index.d.ts.map +1 -1
  511. package/dist/types/numeric-literals/index.js +5 -0
  512. package/dist/types/queues/FifoQueue.d.ts +31 -0
  513. package/dist/types/queues/FifoQueue.d.ts.map +1 -0
  514. package/dist/types/queues/FifoQueue.js +1 -0
  515. package/dist/types/queues/LifoQueue.d.ts +31 -0
  516. package/dist/types/queues/LifoQueue.d.ts.map +1 -0
  517. package/dist/types/queues/LifoQueue.js +1 -0
  518. package/dist/types/queues/index.d.ts +3 -0
  519. package/dist/types/queues/index.d.ts.map +1 -0
  520. package/dist/types/queues/index.js +2 -0
  521. package/dist/types/runtime-types/AsType.d.ts +16 -0
  522. package/dist/types/runtime-types/AsType.d.ts.map +1 -0
  523. package/dist/types/runtime-types/AsType.js +1 -0
  524. package/dist/types/runtime-types/SimpleType.d.ts +47 -0
  525. package/dist/types/runtime-types/SimpleType.d.ts.map +1 -0
  526. package/dist/types/runtime-types/SimpleType.js +1 -0
  527. package/dist/types/runtime-types/Type.d.ts +1 -1
  528. package/dist/types/runtime-types/Type.d.ts.map +1 -1
  529. package/dist/types/runtime-types/TypeOf.d.ts +1 -1
  530. package/dist/types/runtime-types/TypeOf.d.ts.map +1 -1
  531. package/dist/types/runtime-types/TypeToken.d.ts +119 -9
  532. package/dist/types/runtime-types/TypeToken.d.ts.map +1 -1
  533. package/dist/types/runtime-types/index.d.ts +2 -1
  534. package/dist/types/runtime-types/index.d.ts.map +1 -1
  535. package/dist/types/runtime-types/index.js +2 -1
  536. package/dist/types/sets/Intersection.d.ts +1 -1
  537. package/dist/types/sets/Intersection.d.ts.map +1 -1
  538. package/dist/types/string-literals/Date.d.ts +4 -4
  539. package/dist/types/string-literals/Date.d.ts.map +1 -1
  540. package/dist/types/string-literals/EnsureLeading.d.ts +10 -6
  541. package/dist/types/string-literals/EnsureLeading.d.ts.map +1 -1
  542. package/dist/types/string-literals/EnsureTrailing.d.ts +5 -6
  543. package/dist/types/string-literals/EnsureTrailing.d.ts.map +1 -1
  544. package/dist/types/string-literals/Join.d.ts +3 -2
  545. package/dist/types/string-literals/Join.d.ts.map +1 -1
  546. package/dist/types/string-literals/Proxmox.d.ts +2 -3
  547. package/dist/types/string-literals/Proxmox.d.ts.map +1 -1
  548. package/dist/types/string-literals/Split.d.ts +1 -1
  549. package/dist/types/string-literals/Split.d.ts.map +1 -1
  550. package/dist/types/string-literals/StripLeading.d.ts +2 -2
  551. package/dist/types/string-literals/StripLeading.d.ts.map +1 -1
  552. package/dist/types/string-literals/StripSurround.d.ts +16 -0
  553. package/dist/types/string-literals/StripSurround.d.ts.map +1 -0
  554. package/dist/types/string-literals/StripSurround.js +1 -0
  555. package/dist/types/string-literals/StripTrailing.d.ts +2 -2
  556. package/dist/types/string-literals/StripTrailing.d.ts.map +1 -1
  557. package/dist/types/string-literals/StripUntil.d.ts +1 -1
  558. package/dist/types/string-literals/StripUntil.d.ts.map +1 -1
  559. package/dist/types/string-literals/Suggest.d.ts.map +1 -1
  560. package/dist/types/string-literals/Surround.d.ts +2 -2
  561. package/dist/types/string-literals/Surround.d.ts.map +1 -1
  562. package/dist/types/string-literals/Truncate.d.ts +4 -4
  563. package/dist/types/string-literals/Truncate.d.ts.map +1 -1
  564. package/dist/types/string-literals/UnderlyingType.d.ts +18 -0
  565. package/dist/types/string-literals/UnderlyingType.d.ts.map +1 -0
  566. package/dist/types/string-literals/UnderlyingType.js +1 -0
  567. package/dist/types/string-literals/character-sets/CSS.d.ts +13 -0
  568. package/dist/types/string-literals/character-sets/CSS.d.ts.map +1 -1
  569. package/dist/types/string-literals/character-sets/Consonants.d.ts +3 -4
  570. package/dist/types/string-literals/character-sets/Consonants.d.ts.map +1 -1
  571. package/dist/types/string-literals/character-sets/DomainName.d.ts +1 -1
  572. package/dist/types/string-literals/character-sets/DomainName.d.ts.map +1 -1
  573. package/dist/types/string-literals/character-sets/IpAddress.d.ts +1 -1
  574. package/dist/types/string-literals/character-sets/IpAddress.d.ts.map +1 -1
  575. package/dist/types/string-literals/character-sets/LowerAlphaChar.d.ts +2 -3
  576. package/dist/types/string-literals/character-sets/LowerAlphaChar.d.ts.map +1 -1
  577. package/dist/types/string-literals/character-sets/NumericChar.d.ts +3 -4
  578. package/dist/types/string-literals/character-sets/NumericChar.d.ts.map +1 -1
  579. package/dist/types/string-literals/character-sets/Repos.d.ts +2 -1
  580. package/dist/types/string-literals/character-sets/Repos.d.ts.map +1 -1
  581. package/dist/types/string-literals/character-sets/SingularNoun.d.ts +1 -1
  582. package/dist/types/string-literals/character-sets/SingularNoun.d.ts.map +1 -1
  583. package/dist/types/string-literals/character-sets/UpperAlphaChar.d.ts +2 -3
  584. package/dist/types/string-literals/character-sets/UpperAlphaChar.d.ts.map +1 -1
  585. package/dist/types/string-literals/character-sets/Url.d.ts +4 -3
  586. package/dist/types/string-literals/character-sets/Url.d.ts.map +1 -1
  587. package/dist/types/string-literals/character-sets/Url.js +0 -1
  588. package/dist/types/string-literals/character-sets/Whitespace.d.ts +1 -1
  589. package/dist/types/string-literals/character-sets/Whitespace.d.ts.map +1 -1
  590. package/dist/types/string-literals/character-sets/index.d.ts +1 -1
  591. package/dist/types/string-literals/character-sets/index.d.ts.map +1 -1
  592. package/dist/types/string-literals/character-sets/index.js +1 -1
  593. package/dist/types/string-literals/character-sets/phone/CountryPhoneNumber.d.ts +12 -0
  594. package/dist/types/string-literals/character-sets/phone/CountryPhoneNumber.d.ts.map +1 -0
  595. package/dist/types/string-literals/character-sets/phone/CountryPhoneNumber.js +1 -0
  596. package/dist/types/string-literals/character-sets/phone/DialCountryCode.d.ts +9 -0
  597. package/dist/types/string-literals/character-sets/phone/DialCountryCode.d.ts.map +1 -0
  598. package/dist/types/string-literals/character-sets/phone/DialCountryCode.js +1 -0
  599. package/dist/types/string-literals/character-sets/phone/GetPhoneCountryCode.d.ts +14 -0
  600. package/dist/types/string-literals/character-sets/phone/GetPhoneCountryCode.d.ts.map +1 -0
  601. package/dist/types/string-literals/character-sets/phone/GetPhoneCountryCode.js +1 -0
  602. package/dist/types/string-literals/character-sets/phone/GetPhoneNumberType.d.ts +10 -0
  603. package/dist/types/string-literals/character-sets/phone/GetPhoneNumberType.d.ts.map +1 -0
  604. package/dist/types/string-literals/character-sets/phone/GetPhoneNumberType.js +1 -0
  605. package/dist/types/string-literals/character-sets/phone/InternationalPhoneNumber.d.ts +12 -0
  606. package/dist/types/string-literals/character-sets/phone/InternationalPhoneNumber.d.ts.map +1 -0
  607. package/dist/types/string-literals/character-sets/phone/InternationalPhoneNumber.js +1 -0
  608. package/dist/types/string-literals/character-sets/phone/LocalPhoneNumber.d.ts +12 -0
  609. package/dist/types/string-literals/character-sets/phone/LocalPhoneNumber.d.ts.map +1 -0
  610. package/dist/types/string-literals/character-sets/phone/LocalPhoneNumber.js +1 -0
  611. package/dist/types/string-literals/character-sets/phone/PhoneAreaCode.d.ts +6 -0
  612. package/dist/types/string-literals/character-sets/phone/PhoneAreaCode.d.ts.map +1 -0
  613. package/dist/types/string-literals/character-sets/phone/PhoneAreaCode.js +1 -0
  614. package/dist/types/string-literals/character-sets/phone/PhoneCountryCode.d.ts +13 -0
  615. package/dist/types/string-literals/character-sets/phone/PhoneCountryCode.d.ts.map +1 -0
  616. package/dist/types/string-literals/character-sets/phone/PhoneCountryCode.js +1 -0
  617. package/dist/types/string-literals/character-sets/phone/PhoneNumber.d.ts +23 -0
  618. package/dist/types/string-literals/character-sets/phone/PhoneNumber.d.ts.map +1 -0
  619. package/dist/types/string-literals/character-sets/phone/PhoneNumber.js +1 -0
  620. package/dist/types/string-literals/character-sets/phone/PhoneNumberDelimiter.d.ts +5 -0
  621. package/dist/types/string-literals/character-sets/phone/PhoneNumberDelimiter.d.ts.map +1 -0
  622. package/dist/types/string-literals/character-sets/phone/PhoneNumberDelimiter.js +1 -0
  623. package/dist/types/string-literals/character-sets/phone/PhoneShortCode.d.ts +19 -0
  624. package/dist/types/string-literals/character-sets/phone/PhoneShortCode.d.ts.map +1 -0
  625. package/dist/types/string-literals/character-sets/phone/PhoneShortCode.js +1 -0
  626. package/dist/types/string-literals/character-sets/phone/RawPhoneNumber.d.ts +30 -0
  627. package/dist/types/string-literals/character-sets/phone/RawPhoneNumber.d.ts.map +1 -0
  628. package/dist/types/string-literals/character-sets/phone/RawPhoneNumber.js +1 -0
  629. package/dist/types/string-literals/character-sets/phone/RemovePhoneCountryCode.d.ts +27 -0
  630. package/dist/types/string-literals/character-sets/phone/RemovePhoneCountryCode.d.ts.map +1 -0
  631. package/dist/types/string-literals/character-sets/phone/RemovePhoneCountryCode.js +1 -0
  632. package/dist/types/string-literals/character-sets/phone/ToPhoneFormat.d.ts +17 -0
  633. package/dist/types/string-literals/character-sets/phone/ToPhoneFormat.d.ts.map +1 -0
  634. package/dist/types/string-literals/character-sets/phone/ToPhoneFormat.js +1 -0
  635. package/dist/types/string-literals/character-sets/phone/index.d.ts +15 -0
  636. package/dist/types/string-literals/character-sets/phone/index.d.ts.map +1 -0
  637. package/dist/types/string-literals/character-sets/phone/index.js +14 -0
  638. package/dist/types/string-literals/character-sets/phone.d.ts +0 -187
  639. package/dist/types/string-literals/character-sets/phone.d.ts.map +1 -1
  640. package/dist/types/string-literals/geo/state.d.ts +1 -1
  641. package/dist/types/string-literals/geo/state.d.ts.map +1 -1
  642. package/dist/types/string-literals/geo/zip.d.ts +1 -1
  643. package/dist/types/string-literals/geo/zip.d.ts.map +1 -1
  644. package/dist/types/string-literals/index.d.ts +2 -0
  645. package/dist/types/string-literals/index.d.ts.map +1 -1
  646. package/dist/types/string-literals/index.js +2 -0
  647. package/dist/types/tsconfig.tsbuildinfo +1 -1
  648. package/dist/types/type-conversion/AsBoolean.d.ts +7 -4
  649. package/dist/types/type-conversion/AsBoolean.d.ts.map +1 -1
  650. package/dist/types/type-conversion/AsNumber.d.ts +8 -3
  651. package/dist/types/type-conversion/AsNumber.d.ts.map +1 -1
  652. package/dist/types/type-conversion/AsString.d.ts +3 -1
  653. package/dist/types/type-conversion/AsString.d.ts.map +1 -1
  654. package/dist/types/type-conversion/AsStringUnion.d.ts +25 -0
  655. package/dist/types/type-conversion/AsStringUnion.d.ts.map +1 -0
  656. package/dist/types/type-conversion/AsStringUnion.js +1 -0
  657. package/dist/types/type-conversion/JSON.d.ts +25 -0
  658. package/dist/types/type-conversion/JSON.d.ts.map +1 -0
  659. package/dist/types/type-conversion/JSON.js +1 -0
  660. package/dist/types/type-conversion/StringLiteralFromTuple.d.ts +18 -0
  661. package/dist/types/type-conversion/StringLiteralFromTuple.d.ts.map +1 -0
  662. package/dist/types/type-conversion/StringLiteralFromTuple.js +1 -0
  663. package/dist/types/type-conversion/StripChars.d.ts +7 -6
  664. package/dist/types/type-conversion/StripChars.d.ts.map +1 -1
  665. package/dist/types/type-conversion/ToJsonValue.d.ts +11 -0
  666. package/dist/types/type-conversion/ToJsonValue.d.ts.map +1 -0
  667. package/dist/types/type-conversion/ToJsonValue.js +1 -0
  668. package/dist/types/type-conversion/ToStringArray.d.ts +4 -3
  669. package/dist/types/type-conversion/ToStringArray.d.ts.map +1 -1
  670. package/dist/types/type-conversion/TupleToUnion.d.ts +2 -2
  671. package/dist/types/type-conversion/TupleToUnion.d.ts.map +1 -1
  672. package/dist/types/type-conversion/Widen.js +1 -0
  673. package/dist/types/type-conversion/index.d.ts +4 -0
  674. package/dist/types/type-conversion/index.d.ts.map +1 -1
  675. package/dist/types/type-conversion/index.js +4 -0
  676. package/package.json +36 -36
  677. package/dist/runtime/lists/pop.d.ts +0 -17
  678. package/dist/runtime/lists/pop.d.ts.map +0 -1
  679. package/dist/runtime/lists/pop.js +0 -16
  680. package/dist/runtime/literals/asPhoneNumber.d.ts +0 -10
  681. package/dist/runtime/literals/asPhoneNumber.d.ts.map +0 -1
  682. package/dist/runtime/literals/asPhoneNumber.js +0 -62
  683. package/dist/runtime/runtime-types/dict.d.ts +0 -10
  684. package/dist/runtime/runtime-types/dict.d.ts.map +0 -1
  685. package/dist/runtime/runtime-types/dict.js +0 -11
  686. package/dist/runtime/runtime-types/parse.d.ts +0 -16
  687. package/dist/runtime/runtime-types/parse.d.ts.map +0 -1
  688. package/dist/runtime/runtime-types/parse.js +0 -29
  689. package/dist/types/base-types/fns/AnyFnWithDict.d.ts +0 -9
  690. package/dist/types/base-types/fns/AnyFnWithDict.d.ts.map +0 -1
  691. package/dist/types/base-types/fns/FnWithDict.d.ts +0 -10
  692. package/dist/types/base-types/fns/FnWithDict.d.ts.map +0 -1
  693. package/dist/types/runtime-types/DescribeType.d.ts +0 -40
  694. package/dist/types/runtime-types/DescribeType.d.ts.map +0 -1
  695. package/dist/types/runtime-types/DescribeType.js +0 -2
  696. /package/dist/types/base-types/{fns/AnyFnWithDict.js → LikeRegExp.js} +0 -0
  697. /package/dist/types/base-types/fns/{FnWithDict.js → FnAllowingProps.js} +0 -0
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -16,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
16
17
  };
17
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
19
 
19
- // dist/inferred-types/index.js
20
+ // src/inferred-types/index.ts
20
21
  var inferred_types_exports = {};
21
22
  __export(inferred_types_exports, {
22
23
  ALPHA_CHARS: () => ALPHA_CHARS,
@@ -28,7 +29,6 @@ __export(inferred_types_exports, {
28
29
  DEFAULT_ONE_TO_ONE_MAPPING: () => DEFAULT_ONE_TO_ONE_MAPPING,
29
30
  FALSY_TYPE_KINDS: () => FALSY_TYPE_KINDS,
30
31
  FALSY_VALUES: () => FALSY_VALUES,
31
- FILTER: () => FILTER,
32
32
  GITHUB_INSIGHT_CATEGORY_LOOKUP: () => GITHUB_INSIGHT_CATEGORY_LOOKUP,
33
33
  HASH_TABLE_ALPHA_LOWER: () => HASH_TABLE_ALPHA_LOWER,
34
34
  HASH_TABLE_ALPHA_UPPER: () => HASH_TABLE_ALPHA_UPPER,
@@ -66,6 +66,14 @@ __export(inferred_types_exports, {
66
66
  RESULT: () => RESULT,
67
67
  SHAPE_DELIMITER: () => SHAPE_DELIMITER,
68
68
  SHAPE_PREFIXES: () => SHAPE_PREFIXES,
69
+ SIMPLE_CONTAINER_TOKENS: () => SIMPLE_CONTAINER_TOKENS,
70
+ SIMPLE_DICT_VALUES: () => SIMPLE_DICT_VALUES,
71
+ SIMPLE_MAP_KEYS: () => SIMPLE_MAP_KEYS,
72
+ SIMPLE_MAP_VALUES: () => SIMPLE_MAP_VALUES,
73
+ SIMPLE_SCALAR_TOKENS: () => SIMPLE_SCALAR_TOKENS,
74
+ SIMPLE_SET_TYPES: () => SIMPLE_SET_TYPES,
75
+ SIMPLE_TOKENS: () => SIMPLE_TOKENS,
76
+ SIMPLE_UNION_TOKENS: () => SIMPLE_UNION_TOKENS,
69
77
  SINGULAR_NOUN_ENDINGS: () => SINGULAR_NOUN_ENDINGS,
70
78
  ShapeApiImplementation: () => ShapeApiImplementation,
71
79
  TOP_LEVEL_DOMAINS: () => TOP_LEVEL_DOMAINS,
@@ -101,16 +109,17 @@ __export(inferred_types_exports, {
101
109
  addPropsToFn: () => addPropsToFn,
102
110
  and: () => and,
103
111
  asApi: () => asApi,
104
- asApiCallback: () => asApiCallback,
105
112
  asArray: () => asArray,
106
- asCallbackProp: () => asCallbackProp,
107
113
  asChars: () => asChars,
108
114
  asEscapeFunction: () => asEscapeFunction,
109
- asHandledApiCallback: () => asHandledApiCallback,
110
115
  asOptionalParamFunction: () => asOptionalParamFunction,
111
- asPhoneNumber: () => asPhoneNumber,
116
+ asPhoneFormat: () => asPhoneFormat,
112
117
  asRecord: () => asRecord,
118
+ asSimpleToken: () => asSimpleToken,
113
119
  asString: () => asString,
120
+ asStringLiteral: () => asStringLiteral,
121
+ asType: () => asType,
122
+ asTypeToken: () => asTypeToken,
114
123
  asVueRef: () => asVueRef,
115
124
  box: () => box,
116
125
  boxDictionaryValues: () => boxDictionaryValues,
@@ -119,20 +128,24 @@ __export(inferred_types_exports, {
119
128
  createConstant: () => createConstant,
120
129
  createConverter: () => createConverter,
121
130
  createErrorCondition: () => createErrorCondition,
131
+ createFifoQueue: () => createFifoQueue,
122
132
  createFnWithProps: () => createFnWithProps,
133
+ createLifoQueue: () => createLifoQueue,
134
+ createTypeToken: () => createTypeToken,
135
+ csv: () => csv,
123
136
  defineObj: () => defineObj,
124
137
  defineTuple: () => defineTuple,
125
- dict: () => dict,
126
138
  endsWith: () => endsWith,
127
139
  ensureLeading: () => ensureLeading,
128
140
  ensureSurround: () => ensureSurround,
129
141
  ensureTrailing: () => ensureTrailing,
130
142
  entries: () => entries,
143
+ errCondition: () => errCondition,
144
+ filter: () => filter,
131
145
  find: () => find,
132
146
  fnMeta: () => fnMeta,
133
147
  get: () => get,
134
148
  getEach: () => getEach,
135
- getEscapeFunction: () => getEscapeFunction,
136
149
  getPhoneCountryCode: () => getPhoneCountryCode,
137
150
  getUrlPath: () => getUrlPath,
138
151
  getUrlPort: () => getUrlPort,
@@ -150,22 +163,46 @@ __export(inferred_types_exports, {
150
163
  idLiteral: () => idLiteral,
151
164
  idTypeGuard: () => idTypeGuard,
152
165
  identity: () => identity,
166
+ ifArray: () => ifArray,
167
+ ifArrayPartial: () => ifArrayPartial,
168
+ ifBoolean: () => ifBoolean,
169
+ ifChar: () => ifChar,
170
+ ifContainer: () => ifContainer,
171
+ ifDefined: () => ifDefined,
172
+ ifFalse: () => ifFalse,
173
+ ifFunction: () => ifFunction,
174
+ ifHasKey: () => ifHasKey,
175
+ ifLength: () => ifLength,
153
176
  ifLowercaseChar: () => ifLowercaseChar,
177
+ ifNotNull: () => ifNotNull,
178
+ ifNull: () => ifNull,
179
+ ifNumber: () => ifNumber,
180
+ ifObject: () => ifObject,
181
+ ifSameType: () => ifSameType,
182
+ ifScalar: () => ifScalar,
183
+ ifString: () => ifString,
184
+ ifTrue: () => ifTrue,
185
+ ifUndefined: () => ifUndefined,
154
186
  ifUppercaseChar: () => ifUppercaseChar,
155
187
  indexOf: () => indexOf,
156
188
  intersect: () => intersect,
157
189
  intersection: () => intersection,
158
190
  ip6GroupExpansion: () => ip6GroupExpansion,
159
191
  ip6Prefix: () => ip6Prefix,
192
+ isAlpha: () => isAlpha,
160
193
  isApi: () => isApi,
161
194
  isApiSurface: () => isApiSurface,
162
195
  isArray: () => isArray,
196
+ isArrayToken: () => isArrayToken,
197
+ isAtomicToken: () => isAtomicToken,
163
198
  isBitbucketUrl: () => isBitbucketUrl,
164
199
  isBoolean: () => isBoolean,
200
+ isBooleanLike: () => isBooleanLike,
165
201
  isBox: () => isBox,
166
202
  isCodeCommitUrl: () => isCodeCommitUrl,
167
203
  isConstant: () => isConstant,
168
204
  isContainer: () => isContainer,
205
+ isContainerToken: () => isContainerToken,
169
206
  isCssAspectRatio: () => isCssAspectRatio,
170
207
  isDefined: () => isDefined,
171
208
  isDomainName: () => isDomainName,
@@ -176,8 +213,10 @@ __export(inferred_types_exports, {
176
213
  isEscapeFunction: () => isEscapeFunction,
177
214
  isFalse: () => isFalse,
178
215
  isFalsy: () => isFalsy,
216
+ isFnToken: () => isFnToken,
179
217
  isFnWithParams: () => isFnWithParams,
180
218
  isFunction: () => isFunction,
219
+ isGeneratorToken: () => isGeneratorToken,
181
220
  isGithubRepoUrl: () => isGithubRepoUrl,
182
221
  isGithubUrl: () => isGithubUrl,
183
222
  isHexadecimal: () => isHexadecimal,
@@ -187,24 +226,38 @@ __export(inferred_types_exports, {
187
226
  isIp6Address: () => isIp6Address,
188
227
  isIpAddress: () => isIpAddress,
189
228
  isLength: () => isLength,
229
+ isLikeRegExp: () => isLikeRegExp,
230
+ isMapToken: () => isMapToken,
190
231
  isNever: () => isNever,
191
232
  isNotNull: () => isNotNull,
192
233
  isNothing: () => isNothing,
193
234
  isNull: () => isNull,
194
235
  isNumber: () => isNumber,
236
+ isNumberLike: () => isNumberLike,
195
237
  isNumericString: () => isNumericString,
196
238
  isObject: () => isObject,
239
+ isObjectToken: () => isObjectToken,
197
240
  isOptionalParamFunction: () => isOptionalParamFunction,
198
241
  isPhoneNumber: () => isPhoneNumber,
199
242
  isReadonlyArray: () => isReadonlyArray,
243
+ isRecordToken: () => isRecordToken,
200
244
  isRef: () => isRef,
245
+ isRegExp: () => isRegExp,
201
246
  isRepoSource: () => isRepoSource,
202
247
  isRepoUrl: () => isRepoUrl,
203
248
  isSameTypeOf: () => isSameTypeOf,
204
249
  isScalar: () => isScalar,
205
250
  isSemanticVersion: () => isSemanticVersion,
206
251
  isSet: () => isSet,
252
+ isSetToken: () => isSetToken,
207
253
  isShape: () => isShape,
254
+ isSimpleContainerToken: () => isSimpleContainerToken,
255
+ isSimpleContainerTokenTuple: () => isSimpleContainerTokenTuple,
256
+ isSimpleScalarToken: () => isSimpleScalarToken,
257
+ isSimpleScalarTokenTuple: () => isSimpleScalarTokenTuple,
258
+ isSimpleToken: () => isSimpleToken,
259
+ isSimpleTokenTuple: () => isSimpleTokenTuple,
260
+ isSingletonToken: () => isSingletonToken,
208
261
  isSpecificConstant: () => isSpecificConstant,
209
262
  isString: () => isString,
210
263
  isSymbol: () => isSymbol,
@@ -212,15 +265,19 @@ __export(inferred_types_exports, {
212
265
  isTrue: () => isTrue,
213
266
  isTruthy: () => isTruthy,
214
267
  isTuple: () => isTuple,
268
+ isTupleToken: () => isTupleToken,
215
269
  isTypeOf: () => isTypeOf,
216
270
  isTypeToken: () => isTypeToken,
217
271
  isTypeTuple: () => isTypeTuple,
218
272
  isUndefined: () => isUndefined,
273
+ isUnionSetToken: () => isUnionSetToken,
274
+ isUnionToken: () => isUnionToken,
219
275
  isUnset: () => isUnset,
220
276
  isUri: () => isUri,
221
277
  isUrl: () => isUrl,
222
278
  isUrlPath: () => isUrlPath,
223
279
  isUrlSource: () => isUrlSource,
280
+ isWeakMapToken: () => isWeakMapToken,
224
281
  isYouTubeCreatorUrl: () => isYouTubeCreatorUrl,
225
282
  isYouTubeFeedUrl: () => isYouTubeFeedUrl,
226
283
  isYouTubePlaylistUrl: () => isYouTubePlaylistUrl,
@@ -228,7 +285,9 @@ __export(inferred_types_exports, {
228
285
  isYouTubeUrl: () => isYouTubeUrl,
229
286
  isYouTubeVideoUrl: () => isYouTubeVideoUrl,
230
287
  isYouTubeVideosInPlaylist: () => isYouTubeVideosInPlaylist,
231
- join: () => join,
288
+ joinWith: () => joinWith,
289
+ jsonValue: () => jsonValue,
290
+ jsonValues: () => jsonValues,
232
291
  keysOf: () => keysOf,
233
292
  kindError: () => kindError,
234
293
  kindLiteral: () => kindLiteral,
@@ -245,11 +304,11 @@ __export(inferred_types_exports, {
245
304
  never: () => never,
246
305
  omit: () => omit,
247
306
  optional: () => optional,
307
+ optionalOrNull: () => optionalOrNull,
248
308
  or: () => or,
249
- parse: () => parse,
309
+ orNull: () => orNull,
250
310
  pathJoin: () => pathJoin,
251
311
  pluralize: () => pluralize,
252
- pop: () => pop,
253
312
  removePhoneCountryCode: () => removePhoneCountryCode,
254
313
  removeUrlProtocol: () => removeUrlProtocol,
255
314
  result: () => result,
@@ -261,6 +320,15 @@ __export(inferred_types_exports, {
261
320
  shape: () => shape,
262
321
  sharedKeys: () => sharedKeys,
263
322
  shift: () => shift,
323
+ simpleContainerToken: () => simpleContainerToken,
324
+ simpleContainerTokenToTypeToken: () => simpleContainerTokenToTypeToken,
325
+ simpleContainerType: () => simpleContainerType,
326
+ simpleScalarToken: () => simpleScalarToken,
327
+ simpleScalarTokenToTypeToken: () => simpleScalarTokenToTypeToken,
328
+ simpleScalarType: () => simpleScalarType,
329
+ simpleToken: () => simpleToken,
330
+ simpleType: () => simpleType,
331
+ simpleUnionTokenToTypeToken: () => simpleUnionTokenToTypeToken,
264
332
  slice: () => slice,
265
333
  split: () => split,
266
334
  startsWith: () => startsWith,
@@ -268,6 +336,7 @@ __export(inferred_types_exports, {
268
336
  stripBefore: () => stripBefore,
269
337
  stripChars: () => stripChars,
270
338
  stripLeading: () => stripLeading,
339
+ stripSurround: () => stripSurround,
271
340
  stripTrailing: () => stripTrailing,
272
341
  stripUntil: () => stripUntil,
273
342
  surround: () => surround,
@@ -308,7 +377,7 @@ __export(inferred_types_exports, {
308
377
  });
309
378
  module.exports = __toCommonJS(inferred_types_exports);
310
379
 
311
- // dist/constants/createConstant.js
380
+ // src/constants/createConstant.ts
312
381
  function createConstant(kind) {
313
382
  return {
314
383
  _type: "Constant",
@@ -316,13 +385,13 @@ function createConstant(kind) {
316
385
  };
317
386
  }
318
387
 
319
- // dist/constants/NoDefaultValue.js
388
+ // src/constants/NoDefaultValue.ts
320
389
  var NO_DEFAULT_VALUE = createConstant("no-default-value");
321
390
 
322
- // dist/constants/NotApplicable.js
391
+ // src/constants/NotApplicable.ts
323
392
  var NOT_APPLICABLE = Symbol("not applicable");
324
393
 
325
- // dist/constants/DateTime.js
394
+ // src/constants/DateTime.ts
326
395
  var MONTH_NAME = [
327
396
  "January",
328
397
  "February",
@@ -352,7 +421,7 @@ var MONTH_ABBR = [
352
421
  "Dec"
353
422
  ];
354
423
 
355
- // dist/constants/Types.js
424
+ // src/constants/Types.ts
356
425
  var FALSY_TYPE_KINDS = [
357
426
  "undefined",
358
427
  "null"
@@ -393,10 +462,10 @@ var TYPE_KINDS = [
393
462
  ...WIDE_CONTAINER_TYPE_KINDS
394
463
  ];
395
464
 
396
- // dist/constants/Comma.js
465
+ // src/constants/Comma.ts
397
466
  var COMMA = createConstant("comma");
398
467
 
399
- // dist/constants/Functional.js
468
+ // src/constants/Functional.ts
400
469
  var RESULT = {
401
470
  Ok: "ok",
402
471
  Err: "err"
@@ -406,7 +475,7 @@ var OPTION = {
406
475
  None: 0
407
476
  };
408
477
 
409
- // dist/constants/Alpha.js
478
+ // src/constants/Alpha.ts
410
479
  var LOWER_ALPHA_CHARS = [
411
480
  "a",
412
481
  "b",
@@ -468,7 +537,7 @@ var ALPHA_CHARS = [
468
537
  ...UPPER_ALPHA_CHARS
469
538
  ];
470
539
 
471
- // dist/constants/Consonants.js
540
+ // src/constants/Consonants.ts
472
541
  var CONSONANTS = [
473
542
  "b",
474
543
  "c",
@@ -493,7 +562,7 @@ var CONSONANTS = [
493
562
  "y"
494
563
  ];
495
564
 
496
- // dist/constants/PluralExceptions.js
565
+ // src/constants/PluralExceptions.ts
497
566
  var PLURAL_EXCEPTIONS_OLD = [
498
567
  ["photo", "photos"],
499
568
  ["piano", "pianos"],
@@ -585,7 +654,7 @@ var PLURAL_EXCEPTIONS = {
585
654
  wolf: "wolves"
586
655
  };
587
656
 
588
- // dist/constants/SingularNounEnding.js
657
+ // src/constants/SingularNounEnding.ts
589
658
  var SINGULAR_NOUN_ENDINGS = [
590
659
  "s",
591
660
  "sh",
@@ -595,7 +664,7 @@ var SINGULAR_NOUN_ENDINGS = [
595
664
  "o"
596
665
  ];
597
666
 
598
- // dist/constants/CommonObjProps.js
667
+ // src/constants/CommonObjProps.ts
599
668
  var COMMON_OBJ_PROPS = [
600
669
  "id",
601
670
  "type",
@@ -607,7 +676,7 @@ var COMMON_OBJ_PROPS = [
607
676
  "name"
608
677
  ];
609
678
 
610
- // dist/constants/NumericChar.js
679
+ // src/constants/NumericChar.ts
611
680
  var NUMERIC_CHAR = [
612
681
  "0",
613
682
  "1",
@@ -632,7 +701,7 @@ var NON_ZERO_NUMERIC_CHAR = [
632
701
  "9"
633
702
  ];
634
703
 
635
- // dist/constants/NumericDigit.js
704
+ // src/constants/NumericDigit.ts
636
705
  var NUMERIC_DIGIT = [
637
706
  0,
638
707
  1,
@@ -646,7 +715,7 @@ var NUMERIC_DIGIT = [
646
715
  9
647
716
  ];
648
717
 
649
- // dist/constants/FalsyValues.js
718
+ // src/constants/FalsyValues.ts
650
719
  var FALSY_VALUES = [
651
720
  false,
652
721
  0,
@@ -657,13 +726,13 @@ var FALSY_VALUES = [
657
726
  Number.NaN
658
727
  ];
659
728
 
660
- // dist/constants/NotDefined.js
729
+ // src/constants/NotDefined.ts
661
730
  var NOT_DEFINED = createConstant("not-defined");
662
731
 
663
- // dist/constants/TypeOf.js
732
+ // src/constants/TypeOf.ts
664
733
  var TYPE_OF = ["string", "number", "boolean", "undefined", "symbol", "bigint", "function", "object"];
665
734
 
666
- // dist/constants/Wide.js
735
+ // src/constants/Wide.ts
667
736
  var WideAssignment = {
668
737
  boolean: () => "<<boolean>>",
669
738
  string: () => "<<string>>",
@@ -681,16 +750,17 @@ var WideAssignment = {
681
750
  */
682
751
  unknown: () => "<<unknown>>",
683
752
  nothing: () => "<<nothing>>",
684
- // eslint-disable-next-line @typescript-eslint/ban-types
685
753
  something: () => "<<something>>"
686
754
  };
687
755
 
688
- // dist/constants/TypeComparisons.js
756
+ // src/constants/TypeComparisons.ts
689
757
  var wide = WideAssignment;
690
758
  var entry = (refType, desc, ...params) => [
691
759
  refType(wide),
692
760
  desc,
693
- params.map((i) => typeof i === "function" ? i(wide) : i)
761
+ params.map(
762
+ (i) => typeof i === "function" ? i(wide) : i
763
+ )
694
764
  ];
695
765
  var TYPE_COMPARISONS = {
696
766
  "Extends": entry((t) => t.unknown(), "extends the type", (t) => t.unknown()),
@@ -725,7 +795,7 @@ var TYPE_COMPARISONS = {
725
795
  "ContainsSome": entry((t) => t.tuple(), "must be a tuple and have elements that extends the value [[0]]", (t) => t.singularTuple())
726
796
  };
727
797
 
728
- // dist/constants/TypeTransforms.js
798
+ // src/constants/TypeTransforms.ts
729
799
  var t_unknown = "<<unknown>>";
730
800
  var t_string = "<<string>>";
731
801
  var t_number = "<<number>>";
@@ -758,10 +828,107 @@ var TYPE_TRANSFORMS = {
758
828
  Decrement: [t_number, [], "Decrements a numeric value by one"]
759
829
  };
760
830
 
761
- // dist/constants/Never.js
831
+ // src/constants/Never.ts
762
832
  var Never = createConstant("never");
763
833
 
764
- // dist/constants/TypeTokens.js
834
+ // src/constants/TypeTokens.ts
835
+ var SIMPLE_MAP_KEYS = [
836
+ "string",
837
+ "number",
838
+ "Dict",
839
+ "Dict<string, string>",
840
+ "Dict<string, number>",
841
+ "Dict<string, boolean>",
842
+ "Dict<string, unknown>",
843
+ "Dict<string, opt(string)>",
844
+ "Dict<string, opt(number)>",
845
+ "Dict<string, opt(boolean)>",
846
+ "Dict<{id: number}>",
847
+ "Dict<{id: string}>"
848
+ ];
849
+ var SIMPLE_MAP_VALUES = [
850
+ ...SIMPLE_MAP_KEYS,
851
+ "boolean",
852
+ "unknown",
853
+ "undefined",
854
+ "Dict<string, opt(string)>",
855
+ "Dict<string, opt(number)>",
856
+ "Dict<string, opt(boolean)>",
857
+ "Dict<string, opt(unknown)>",
858
+ "Dict<{id: number}>",
859
+ "Dict<{id: string}>"
860
+ ];
861
+ var SIMPLE_DICT_VALUES = [
862
+ "string",
863
+ "number",
864
+ "boolean",
865
+ "unknown",
866
+ "opt(string)",
867
+ "opt(number)",
868
+ "opt(boolean)",
869
+ "opt(unknown)"
870
+ ];
871
+ var SIMPLE_SET_TYPES = [
872
+ "string",
873
+ "number",
874
+ "boolean",
875
+ "unknown",
876
+ "opt(string)",
877
+ "opt(number)",
878
+ "opt(boolean)",
879
+ "opt(unknown)"
880
+ ];
881
+ var SIMPLE_SCALAR_TOKENS = [
882
+ "string",
883
+ "number",
884
+ `string(TOKEN)`,
885
+ `number(TOKEN)`,
886
+ "boolean",
887
+ "true",
888
+ "false",
889
+ "null",
890
+ "undefined",
891
+ "unknown",
892
+ "any",
893
+ "never"
894
+ ];
895
+ var SIMPLE_UNION_TOKENS = [
896
+ `opt(string)`,
897
+ `opt(number)`,
898
+ `opt(boolean)`,
899
+ `opt(unknown)`,
900
+ `opt(TOKEN)`,
901
+ `Union(TOKEN)`
902
+ ];
903
+ var SIMPLE_CONTAINER_TOKENS = [
904
+ "array(string)",
905
+ "array(number)",
906
+ "array(boolean)",
907
+ "array(unknown)",
908
+ "Dict",
909
+ "Dict<string, string>",
910
+ "Dict<string, number>",
911
+ "Dict<string, boolean>",
912
+ "Dict<string, unknown>",
913
+ "Dict<string, opt(string)>",
914
+ "Dict<string, opt(number)>",
915
+ "Dict<string, opt(boolean)>",
916
+ "Dict<string, opt(unknown)>",
917
+ "Dict<{id: number}>",
918
+ "Dict<{id: string}>",
919
+ "Dict<{TOKEN: number}>",
920
+ "Dict<{TOKEN: string}>",
921
+ "Set",
922
+ "Set<TOKEN>",
923
+ "Map",
924
+ "Map<TOKEN, TOKEN>",
925
+ "WeakMap"
926
+ ];
927
+ var SIMPLE_TOKENS = [
928
+ ...SIMPLE_SCALAR_TOKENS,
929
+ ...SIMPLE_CONTAINER_TOKENS,
930
+ ...SIMPLE_UNION_TOKENS
931
+ ];
765
932
  var TT_Atomics = [
766
933
  "undefined",
767
934
  "null",
@@ -857,7 +1024,7 @@ var TYPE_TOKEN_ALL = [
857
1024
  ...TYPE_TOKEN_PARAM_TIME
858
1025
  ];
859
1026
 
860
- // dist/constants/Shape.js
1027
+ // src/constants/Shape.ts
861
1028
  var SHAPE_PREFIXES = [
862
1029
  "string",
863
1030
  "number",
@@ -874,10 +1041,10 @@ var SHAPE_PREFIXES = [
874
1041
  ];
875
1042
  var SHAPE_DELIMITER = "||,||";
876
1043
 
877
- // dist/constants/Marked.js
1044
+ // src/constants/Marked.ts
878
1045
  var MARKED = createConstant("Marked");
879
1046
 
880
- // dist/constants/HashTable.js
1047
+ // src/constants/HashTable.ts
881
1048
  var HASH_TABLE_WIDE = {
882
1049
  string: "318",
883
1050
  number: "523",
@@ -1000,7 +1167,7 @@ var HASH_TABLE_CHAR = {
1000
1167
  };
1001
1168
  var HASH_TABLE_OTHER = "999";
1002
1169
 
1003
- // dist/constants/Geo.js
1170
+ // src/constants/Geo.ts
1004
1171
  var US_STATE_LOOKUP_STRICT = [
1005
1172
  { name: "Alabama", abbrev: "AL" },
1006
1173
  { name: "Alaska", abbrev: "AK" },
@@ -1081,7 +1248,7 @@ var ZIP_TO_STATE = {
1081
1248
  "9": ["AK", "AS", "CA", "GU", "HI", "MH", "FM", "MP", "OR", "PW", "WA"]
1082
1249
  };
1083
1250
 
1084
- // dist/constants/RepoConstants.js
1251
+ // src/constants/RepoConstants.ts
1085
1252
  var REPO_SOURCES = [
1086
1253
  "github",
1087
1254
  "bitbucket",
@@ -1125,7 +1292,7 @@ var GITHUB_INSIGHT_CATEGORY_LOOKUP = {
1125
1292
  people: "people"
1126
1293
  };
1127
1294
 
1128
- // dist/constants/NetworkConstants.js
1295
+ // src/constants/NetworkConstants.ts
1129
1296
  var IPv6 = {
1130
1297
  "Loopback": "::1/128",
1131
1298
  "Multicast": "ff00::/8",
@@ -1201,14 +1368,14 @@ var TOP_LEVEL_DOMAINS = [
1201
1368
  "london"
1202
1369
  ];
1203
1370
 
1204
- // dist/constants/Characters.js
1371
+ // src/constants/Characters.ts
1205
1372
  var WHITESPACE_CHARS = [
1206
1373
  " ",
1207
1374
  "\n",
1208
1375
  " "
1209
1376
  ];
1210
1377
 
1211
- // dist/constants/Phone.js
1378
+ // src/constants/Phone.ts
1212
1379
  var PHONE_FORMAT = [
1213
1380
  "Dashed (e.g., 456-555-1212)",
1214
1381
  "Dotted (e.g., 456.555.1212)",
@@ -1467,7 +1634,7 @@ var PHONE_COUNTRY_CODES = [
1467
1634
  ["358", "ALA", "AX"]
1468
1635
  ];
1469
1636
 
1470
- // dist/constants/ProxmoxConstants.js
1637
+ // src/constants/ProxmoxConstants.ts
1471
1638
  var PROXMOX_CT_STATE = [
1472
1639
  "started",
1473
1640
  "stopped",
@@ -1476,7 +1643,7 @@ var PROXMOX_CT_STATE = [
1476
1643
  "ignored"
1477
1644
  ];
1478
1645
 
1479
- // dist/types/dictionary/MapTo.js
1646
+ // src/types/dictionary/MapTo.ts
1480
1647
  var toFinalizedConfig = (config) => {
1481
1648
  return { ...config, finalized: true };
1482
1649
  };
@@ -1495,62 +1662,164 @@ var DEFAULT_MANY_TO_ONE_MAPPING = toFinalizedConfig({
1495
1662
  output: "req",
1496
1663
  cardinality: "I[] -> O"
1497
1664
  });
1498
- var MapCardinality;
1499
- (function(MapCardinality2) {
1665
+ var MapCardinality = /* @__PURE__ */ ((MapCardinality2) => {
1500
1666
  MapCardinality2["OneToMany"] = "I -> O[]";
1501
1667
  MapCardinality2["OneToOne"] = "I -> O";
1502
1668
  MapCardinality2["ManyToOne"] = "I[] -> O";
1503
- })(MapCardinality || (MapCardinality = {}));
1669
+ return MapCardinality2;
1670
+ })(MapCardinality || {});
1504
1671
 
1505
- // dist/runtime/api/defineApi.js
1672
+ // src/runtime/api/defineApi.ts
1506
1673
  var asEscapeFunction = (fn2) => createFnWithProps(fn2, { escape: true });
1507
1674
  var asOptionalParamFunction = (fn2) => createFnWithProps(fn2, { optionalParams: true });
1508
1675
  var asApi = (api) => isApi(api) ? api : isApiSurface(api) ? { _kind: "api", surface: api } : createErrorCondition("invalid-api");
1509
- var asCallbackProp = (...args) => args;
1510
- var getEscapeFunction = (api) => {
1511
- const surface = api.surface;
1512
- return isFunction(surface) && "escape" in surface && surface.escape === true ? surface : isObject(surface) ? surface[Object.keys(surface).find((k) => isEscapeFunction(surface[k]))] : Never;
1513
- };
1514
- var defaultApiHandler = (_api) => {
1515
- return (_result) => {
1516
- };
1517
- };
1518
- var cb = (api) => (cb2) => {
1519
- try {
1520
- return cb2(api.surface);
1521
- } catch (e) {
1522
- throw new Error("oops");
1523
- }
1524
- };
1525
- var asApiCallback = (api) => cb(api);
1526
- var asHandledApiCallback = (api, handler) => {
1527
- let _h = handler ? handler : defaultApiHandler;
1528
- let _cb = asApiCallback(api);
1529
- };
1530
1676
 
1531
- // dist/runtime/api/handleDoneFn.js
1677
+ // src/runtime/api/handleDoneFn.ts
1532
1678
  var handleDoneFn = (val, call_bare_fn = false) => {
1533
1679
  return isObject(val) || isFunction(val) ? isDoneFn(val) ? val.done() : isFunction(val) ? call_bare_fn ? val() : val : val : isFunction(val) ? call_bare_fn ? val() : val : val;
1534
1680
  };
1535
1681
 
1536
- // dist/runtime/combinators/and.js
1682
+ // src/runtime/boolean-logic/ifArray.ts
1683
+ function ifArray(val, isAnArray, isNotAnArray) {
1684
+ return Array.isArray(val) ? isAnArray(val) : isNotAnArray(val);
1685
+ }
1686
+
1687
+ // src/runtime/boolean-logic/ifBoolean.ts
1688
+ function ifBoolean(val, ifBoolean2, notBoolean) {
1689
+ return isBoolean(val) ? ifBoolean2(val) : notBoolean(val);
1690
+ }
1691
+
1692
+ // src/runtime/boolean-logic/ifNumber.ts
1693
+ function ifNumber(val, ifVal, elseVal) {
1694
+ return isNumber(val) ? ifVal(val) : elseVal(val);
1695
+ }
1696
+
1697
+ // src/runtime/boolean-logic/ifNotNull.ts
1698
+ function ifNotNull(val, ifVal, elseVal) {
1699
+ return isNull(val) ? elseVal() : ifVal(val);
1700
+ }
1701
+
1702
+ // src/runtime/boolean-logic/ifSameType.ts
1703
+ function ifSameType(value, comparator, same, notSame) {
1704
+ return (
1705
+ // runtime values match
1706
+ typeof value === typeof comparator ? same(value) : notSame(value)
1707
+ );
1708
+ }
1709
+
1710
+ // src/runtime/boolean-logic/ifContainer.ts
1711
+ function ifContainer(value, ifContainer2, notContainer) {
1712
+ return isObject(value) || isArray(value) ? ifContainer2(value) : notContainer(value);
1713
+ }
1714
+
1715
+ // src/runtime/boolean-logic/ifHasKey.ts
1716
+ var ifHasKey = (container, key, hasKey, doesNotHaveKey) => hasIndexOf(container, key) ? hasKey(container) : doesNotHaveKey(container);
1717
+
1718
+ // src/runtime/boolean-logic/ifLength.ts
1719
+ function ifLength(value, length, ifVal, elseVal) {
1720
+ return Array.isArray(value) && value.length === length ? ifVal(value) : elseVal(value);
1721
+ }
1722
+
1723
+ // src/runtime/type-guards/isString.ts
1724
+ function isString(value) {
1725
+ return typeof value === "string";
1726
+ }
1727
+
1728
+ // src/runtime/type-guards/isNumber.ts
1729
+ function isNumber(value) {
1730
+ return typeof value === "number";
1731
+ }
1732
+
1733
+ // src/runtime/type-guards/isSymbol.ts
1734
+ function isSymbol(value) {
1735
+ return typeof value === "symbol";
1736
+ }
1737
+
1738
+ // src/runtime/type-guards/isNull.ts
1739
+ function isNull(value) {
1740
+ return value === null ? true : false;
1741
+ }
1742
+
1743
+ // src/runtime/type-guards/isScalar.ts
1744
+ function isScalar(value) {
1745
+ return isString(value) || isNumber(value) || isSymbol(value) || isNull(value);
1746
+ }
1747
+
1748
+ // src/runtime/boolean-logic/ifScalar.ts
1749
+ function ifScalar(value, ifCallback, notCallback) {
1750
+ const result2 = isScalar(value) ? ifCallback(
1751
+ value
1752
+ ) : notCallback(value);
1753
+ return result2;
1754
+ }
1755
+
1756
+ // src/runtime/boolean-logic/ifNull.ts
1757
+ function ifNull(val, ifVal, elseVal) {
1758
+ return isNull(val) ? ifVal() : elseVal(val);
1759
+ }
1760
+
1761
+ // src/runtime/boolean-logic/ifObject.ts
1762
+ function ifObject(val, ifObj, notObj) {
1763
+ return isObject(val) ? ifObj : notObj;
1764
+ }
1765
+
1766
+ // src/runtime/boolean-logic/ifTrue.ts
1767
+ function ifTrue(val, ifVal, elseVal) {
1768
+ return (
1769
+ //
1770
+ isTrue(val) ? ifVal(val) : elseVal(val)
1771
+ );
1772
+ }
1773
+
1774
+ // src/runtime/boolean-logic/ifFunction.ts
1775
+ function ifFunction(value, isFnCallback, notFnCallback) {
1776
+ return typeof value === "function" ? isFnCallback(value) : notFnCallback(value);
1777
+ }
1778
+
1779
+ // src/runtime/boolean-logic/ifFalse.ts
1780
+ function ifFalse(val, ifVal, elseVal) {
1781
+ return isFalse(val) ? ifVal : elseVal;
1782
+ }
1783
+
1784
+ // src/runtime/boolean-logic/ifChar.ts
1785
+ var def_if = (v) => v;
1786
+ var def_else = () => Never;
1787
+ function ifChar(ch, callback_if_match = def_if, callback_not_match = def_else) {
1788
+ return ch.length === 1 ? callback_if_match(ch) : callback_not_match(ch);
1789
+ }
1790
+
1791
+ // src/runtime/boolean-logic/ifString.ts
1792
+ function ifString(val, ifVal, elseVal) {
1793
+ return typeof val === "string" ? ifVal(val) : elseVal(val);
1794
+ }
1795
+
1796
+ // src/runtime/boolean-logic/ifUndefined.ts
1797
+ function ifUndefined(val, ifUndefined2, ifDefined2) {
1798
+ return isUndefined(val) ? ifUndefined2() : ifDefined2(val);
1799
+ }
1800
+ function ifDefined(val, ifVal, elseVal) {
1801
+ return isDefined(val) ? ifVal : elseVal;
1802
+ }
1803
+
1804
+ // src/runtime/boolean-logic/ifArrayPartial.ts
1805
+ function ifArrayPartial() {
1806
+ return (isAnArray, isNotAnArray) => {
1807
+ return (val) => ifArray(val, isAnArray, isNotAnArray);
1808
+ };
1809
+ }
1810
+
1811
+ // src/runtime/combinators/and.ts
1537
1812
  var and = (...values) => {
1538
1813
  return values.every((i) => i === true);
1539
1814
  };
1540
1815
 
1541
- // dist/runtime/combinators/or.js
1816
+ // src/runtime/combinators/or.ts
1542
1817
  function or(...conditions) {
1543
1818
  const values = conditions.some((v) => v === true ? true : false);
1544
1819
  return values;
1545
1820
  }
1546
1821
 
1547
- // dist/runtime/dictionary/keysOf.js
1548
- function keysOf(container) {
1549
- const keys = Array.isArray(container) ? Object.keys(container).map((i) => Number(i)) : isObject(container) ? isRef(container) ? ["value"] : Object.keys(container) : [];
1550
- return keys;
1551
- }
1552
-
1553
- // dist/runtime/dictionary/entries.js
1822
+ // src/runtime/dictionary/entries.ts
1554
1823
  function entries(obj) {
1555
1824
  const iterable = {
1556
1825
  *[Symbol.iterator]() {
@@ -1562,7 +1831,7 @@ function entries(obj) {
1562
1831
  return iterable;
1563
1832
  }
1564
1833
 
1565
- // dist/runtime/dictionary/get.js
1834
+ // src/runtime/dictionary/get.ts
1566
1835
  function updatedDotPath(value, dotpath, segment) {
1567
1836
  return isRef(value) ? dotpath.replace(segment, `Ref(${segment})`) : dotpath;
1568
1837
  }
@@ -1572,65 +1841,92 @@ function getValue(value, dotPath, defaultValue, handleInvalid, fullDotPath) {
1572
1841
  const hasMoreSegments = pathSegments.length > 1;
1573
1842
  const valueIsIndexable = isContainer(value) && hasIndexOf(value, idx);
1574
1843
  const hasHandler = !isSpecificConstant("not-defined")(handleInvalid);
1575
- const invalidDotPath = createErrorCondition("invalid-dot-path", `The segment "${idx}" in the dotpath "${fullDotPath}" was not indexable and no default value existed on: ${JSON.stringify(value)}`);
1576
- const current = hasMoreSegments ? isContainer(value) && idx in value ? getValue(indexOf(value, idx), pathSegments.join(".").replace(`${idx}.`, ""), defaultValue, handleInvalid, updatedDotPath(value, fullDotPath, idx)) : hasHandler ? handleInvalid : invalidDotPath : valueIsIndexable ? hasDefaultValue(hasDefaultValue) ? indexOf(value, idx) || defaultValue : indexOf(value, idx) : hasHandler ? handleInvalid : invalidDotPath;
1844
+ const invalidDotPath = createErrorCondition(
1845
+ "invalid-dot-path",
1846
+ `The segment "${idx}" in the dotpath "${fullDotPath}" was not indexable and no default value existed on: ${JSON.stringify(value)}`
1847
+ );
1848
+ const current = hasMoreSegments ? isContainer(value) && idx in value ? getValue(
1849
+ indexOf(value, idx),
1850
+ pathSegments.join(".").replace(`${idx}.`, ""),
1851
+ defaultValue,
1852
+ handleInvalid,
1853
+ updatedDotPath(value, fullDotPath, idx)
1854
+ ) : hasHandler ? handleInvalid : invalidDotPath : valueIsIndexable ? hasDefaultValue(hasDefaultValue) ? indexOf(value, idx) || defaultValue : indexOf(value, idx) : hasHandler ? handleInvalid : invalidDotPath;
1577
1855
  return current;
1578
1856
  }
1579
1857
  function get(value, dotPath, options = {
1580
1858
  defaultValue: NO_DEFAULT_VALUE,
1581
1859
  handleInvalidDotpath: NOT_DEFINED
1582
1860
  }) {
1583
- const outcome = dotPath === null || dotPath === "" ? value : getValue(value, dotPath, (options == null ? void 0 : options.defaultValue) || NO_DEFAULT_VALUE, (options == null ? void 0 : options.handleInvalidDotpath) || NOT_DEFINED, String(dotPath));
1861
+ const outcome = dotPath === null || dotPath === "" ? value : getValue(
1862
+ value,
1863
+ dotPath,
1864
+ (options == null ? void 0 : options.defaultValue) || NO_DEFAULT_VALUE,
1865
+ (options == null ? void 0 : options.handleInvalidDotpath) || NOT_DEFINED,
1866
+ String(dotPath)
1867
+ );
1584
1868
  return outcome;
1585
1869
  }
1586
1870
 
1587
- // dist/runtime/dictionary/omit.js
1871
+ // src/runtime/dictionary/keysOf.ts
1872
+ function keysOf(container) {
1873
+ const keys = Array.isArray(container) ? Object.keys(container).map((i) => Number(i)) : isObject(container) ? isRef(container) ? ["value"] : Object.keys(container) : [];
1874
+ return keys;
1875
+ }
1876
+
1877
+ // src/runtime/dictionary/omit.ts
1588
1878
  function omit(obj, ...removeKeys) {
1589
1879
  const keys = Object.keys(obj);
1590
- return keys.reduce((acc, key) => removeKeys.includes(key) ? acc : {
1591
- ...acc,
1592
- [key]: obj[key]
1593
- }, {});
1880
+ return keys.reduce(
1881
+ (acc, key) => removeKeys.includes(key) ? acc : {
1882
+ ...acc,
1883
+ [key]: obj[key]
1884
+ },
1885
+ {}
1886
+ );
1594
1887
  }
1595
1888
 
1596
- // dist/runtime/dictionary/retain.js
1597
- var retain = (dict2, ...keys) => {
1889
+ // src/runtime/dictionary/retain.ts
1890
+ var retain = (dict, ...keys) => {
1598
1891
  let output = {};
1599
1892
  for (const k of keys) {
1600
1893
  output = {
1601
1894
  ...output,
1602
- [k]: dict2[k]
1895
+ [k]: dict[k]
1603
1896
  };
1604
1897
  }
1605
1898
  return output;
1606
1899
  };
1607
1900
 
1608
- // dist/runtime/dictionary/sharedKeys.js
1901
+ // src/runtime/dictionary/sharedKeys.ts
1609
1902
  var sharedKeys = (a, b) => {
1610
1903
  const ka = Object.keys(a);
1611
1904
  const kb = Object.keys(b);
1612
1905
  return ka.filter((k) => kb.includes(k));
1613
1906
  };
1614
1907
 
1615
- // dist/runtime/dictionary/takeProp.js
1908
+ // src/runtime/dictionary/takeProp.ts
1616
1909
  var takeProp = (val, prop, otherwise) => {
1617
1910
  return (isObject(val) || isArray(val)) && prop in val ? val[prop] : otherwise;
1618
1911
  };
1619
1912
 
1620
- // dist/runtime/dictionary/withKeys.js
1621
- var withKeys = (dict2, ...keys) => retain(dict2, ...keys);
1913
+ // src/runtime/dictionary/withKeys.ts
1914
+ var withKeys = (dict, ...keys) => retain(dict, ...keys);
1622
1915
 
1623
- // dist/runtime/dictionary/withoutKeys.js
1624
- var withoutKeys = (dict2, ...exclude) => omit(dict2, ...exclude);
1916
+ // src/runtime/dictionary/withoutKeys.ts
1917
+ var withoutKeys = (dict, ...exclude) => omit(dict, ...exclude);
1625
1918
 
1626
- // dist/runtime/dictionary/withoutValue.js
1919
+ // src/runtime/dictionary/withoutValue.ts
1627
1920
  function withoutValue(val) {
1628
1921
  return (obj) => {
1629
- return Object.keys(obj).reduce((acc, key) => val === obj[key] ? acc : { ...acc, [key]: obj[key] }, {});
1922
+ return Object.keys(obj).reduce(
1923
+ (acc, key) => val === obj[key] ? acc : { ...acc, [key]: obj[key] },
1924
+ {}
1925
+ );
1630
1926
  };
1631
1927
  }
1632
1928
 
1633
- // dist/runtime/dictionary/withDefaults.js
1929
+ // src/runtime/dictionary/withDefaults.ts
1634
1930
  var withDefaults = (with_defaults) => (obj) => {
1635
1931
  const merged = {
1636
1932
  ...with_defaults,
@@ -1639,7 +1935,7 @@ var withDefaults = (with_defaults) => (obj) => {
1639
1935
  return merged;
1640
1936
  };
1641
1937
 
1642
- // dist/runtime/dictionary/valuesOf.js
1938
+ // src/runtime/dictionary/valuesOf.ts
1643
1939
  var valuesOf = (obj) => {
1644
1940
  const values = [];
1645
1941
  for (const k of Object.keys(obj)) {
@@ -1648,7 +1944,7 @@ var valuesOf = (obj) => {
1648
1944
  return values;
1649
1945
  };
1650
1946
 
1651
- // dist/runtime/errors/createErrorCondition.js
1947
+ // src/runtime/errors/createErrorCondition.ts
1652
1948
  var createErrorCondition = (kind, msg = "", utility = "") => {
1653
1949
  return {
1654
1950
  __kind: "ErrorCondition",
@@ -1657,8 +1953,13 @@ var createErrorCondition = (kind, msg = "", utility = "") => {
1657
1953
  utility
1658
1954
  };
1659
1955
  };
1956
+ var errCondition = (kind, msg) => ({
1957
+ __kind: "ErrorCondition",
1958
+ kind,
1959
+ msg
1960
+ });
1660
1961
 
1661
- // dist/runtime/literals/box.js
1962
+ // src/runtime/literals/box.ts
1662
1963
  function box(value) {
1663
1964
  const rtn = {
1664
1965
  __type: "box",
@@ -1672,18 +1973,21 @@ function box(value) {
1672
1973
  function isBox(thing) {
1673
1974
  return typeof thing === "object" && "__type" in thing && thing.__type === "box";
1674
1975
  }
1675
- function boxDictionaryValues(dict2) {
1676
- const keys = Object.keys(dict2);
1677
- return keys.reduce((acc, key) => ({ ...acc, [key]: box(dict2[key]) }), {});
1976
+ function boxDictionaryValues(dict) {
1977
+ const keys = Object.keys(dict);
1978
+ return keys.reduce(
1979
+ (acc, key) => ({ ...acc, [key]: box(dict[key]) }),
1980
+ {}
1981
+ );
1678
1982
  }
1679
1983
  function unbox(val) {
1680
1984
  return isBox(val) ? val.value : val;
1681
1985
  }
1682
1986
 
1683
- // dist/runtime/literals/identity.js
1987
+ // src/runtime/literals/identity.ts
1684
1988
  var identity = (v) => v;
1685
1989
 
1686
- // dist/runtime/literals/literal.js
1990
+ // src/runtime/literals/literal.ts
1687
1991
  function idLiteral(o) {
1688
1992
  return { ...o, id: o.id };
1689
1993
  }
@@ -1700,246 +2004,369 @@ function literal(obj) {
1700
2004
  return obj;
1701
2005
  }
1702
2006
 
1703
- // dist/runtime/literals/stripTrailing.js
1704
- var switchType = (content) => (val) => {
1705
- return typeof content === "number" ? Number(val) : val;
2007
+ // src/runtime/type-guards/isDefined.ts
2008
+ function isDefined(value) {
2009
+ return typeof value === "undefined" ? false : true;
2010
+ }
2011
+
2012
+ // src/runtime/type-guards/isFalsy.ts
2013
+ var isFalsy = (val) => {
2014
+ return FALSY_VALUES.includes(val);
1706
2015
  };
1707
- function stripTrailing(content, strip) {
1708
- var _a;
1709
- const re = new RegExp(`(.*)${strip}$`);
1710
- return ((_a = String(content)) == null ? void 0 : _a.endsWith(String(strip))) ? switchType(content)(String(content).replace(re, "$1")) : switchType(content)(String(content));
2016
+
2017
+ // src/runtime/type-guards/isNotNull.ts
2018
+ function isNotNull(value) {
2019
+ return value === null ? true : false;
1711
2020
  }
1712
2021
 
1713
- // dist/runtime/literals/stripLeading.js
1714
- function stripLeading(content, ...strip) {
1715
- const stripper = strip.find((i) => content.startsWith(i));
1716
- return stripper ? (
1717
- // starts with
1718
- content.slice(stripper.length)
1719
- ) : (
1720
- // does not
1721
- content
1722
- );
2022
+ // src/runtime/type-guards/isTruthy.ts
2023
+ var isTruthy = (val) => {
2024
+ return !FALSY_VALUES.includes(val);
2025
+ };
2026
+
2027
+ // src/runtime/type-guards/isTypeTuple.ts
2028
+ function isTypeTuple(value) {
2029
+ return Array.isArray(value) && value.length === 3 && typeof value[1] === "function";
1723
2030
  }
1724
2031
 
1725
- // dist/runtime/literals/ensureTrailing.js
1726
- function ensureTrailing(content, ensure) {
1727
- return (
1728
- //
1729
- content.endsWith(ensure) ? content : `${content}${ensure}`
1730
- );
2032
+ // src/runtime/type-guards/isUndefined.ts
2033
+ function isUndefined(value) {
2034
+ return typeof value === "undefined" ? true : false;
1731
2035
  }
1732
2036
 
1733
- // dist/runtime/literals/ensureLeading.js
1734
- function ensureLeading(content, ensure) {
1735
- return String(content).startsWith(ensure) ? content : `${ensure}${content}`;
2037
+ // src/runtime/type-guards/isBoolean.ts
2038
+ function isBoolean(value) {
2039
+ return typeof value === "boolean";
1736
2040
  }
1737
2041
 
1738
- // dist/runtime/literals/ensureSurround.js
1739
- function ensureSurround(prefix, postfix) {
1740
- const fn2 = (input) => {
1741
- const result2 = ensureTrailing(ensureLeading(input, prefix), postfix);
1742
- return result2;
1743
- };
1744
- return fn2;
2042
+ // src/runtime/type-guards/isIndexable.ts
2043
+ function isIndexable(value) {
2044
+ return Array.isArray(value) || typeof value === "object" && keysOf(value).length > 0 ? true : false;
1745
2045
  }
1746
2046
 
1747
- // dist/runtime/literals/ifUppercase.js
1748
- function ifUppercaseChar(ch, callbackForMatch, callbackForNoMatch) {
1749
- if (ch.length !== 1) {
1750
- throw new Error(`Invalid string length passed to ifUppercaseChar(ch); this function requires a single character but ${ch.length} were received`);
1751
- }
1752
- return LOWER_ALPHA_CHARS.includes(ch) ? callbackForMatch(ch) : callbackForNoMatch(ch);
2047
+ // src/runtime/type-guards/isObject.ts
2048
+ function isObject(value) {
2049
+ return typeof value === "object" && value !== null && Array.isArray(value) === false;
1753
2050
  }
1754
2051
 
1755
- // dist/runtime/literals/pathJoin.js
1756
- function pathJoin(...segments) {
1757
- const clean_path = segments.map((i) => stripTrailing(stripLeading(i, "/"), "/")).join("/");
1758
- const original_path = segments.join("/");
1759
- const pre = original_path.startsWith("/") ? "/" : "";
1760
- const post = original_path.endsWith("/") ? "/" : "";
1761
- return `${pre}${clean_path}${post}`;
2052
+ // src/runtime/type-guards/isTrue.ts
2053
+ function isTrue(value) {
2054
+ return value === true;
1762
2055
  }
1763
2056
 
1764
- // dist/runtime/literals/narrow.js
1765
- function narrow(...values) {
1766
- return values.length === 1 ? values[0] : values;
2057
+ // src/runtime/type-guards/isArray.ts
2058
+ function isArray(value) {
2059
+ return Array.isArray(value) === true;
1767
2060
  }
1768
2061
 
1769
- // dist/runtime/literals/split.js
1770
- function split(str, sep = "") {
1771
- return str.split(sep);
2062
+ // src/runtime/type-guards/isConstant.ts
2063
+ function isConstant(value) {
2064
+ return isObject(value) && "_type" in value && "kind" in value && value._type === "Constant" ? true : false;
1772
2065
  }
1773
2066
 
1774
- // dist/runtime/literals/tuple.js
1775
- var tuple = (...values) => {
1776
- const arr = values.length === 1 ? values[0] : values;
1777
- return asArray(arr);
2067
+ // src/runtime/type-guards/isNever.ts
2068
+ var isNever = (val) => {
2069
+ return isConstant(val) && val.kind === "never";
1778
2070
  };
1779
2071
 
1780
- // dist/runtime/literals/capitalize.js
1781
- function capitalize(str) {
1782
- return `${str == null ? void 0 : str.slice(0, 1).toUpperCase()}${str == null ? void 0 : str.slice(1)}`;
2072
+ // src/runtime/type-guards/isContainer.ts
2073
+ function isContainer(value) {
2074
+ return Array.isArray(value) || isObject(value) ? true : false;
1783
2075
  }
1784
2076
 
1785
- // dist/runtime/literals/uncapitalize.js
1786
- function uncapitalize(str) {
1787
- return `${str == null ? void 0 : str.slice(0, 1).toLowerCase()}${str == null ? void 0 : str.slice(1)}`;
2077
+ // src/runtime/type-guards/isSpecificConstant.ts
2078
+ function isSpecificConstant(kind) {
2079
+ return (value) => {
2080
+ return isConstant(value) && value.kind === kind ? true : false;
2081
+ };
1788
2082
  }
1789
2083
 
1790
- // dist/runtime/literals/uppercase.js
1791
- function uppercase(str) {
1792
- return str.toUpperCase();
2084
+ // src/runtime/type-guards/isReadonlyArray.ts
2085
+ function isReadonlyArray(value) {
2086
+ return Array.isArray(value) === true;
1793
2087
  }
1794
2088
 
1795
- // dist/runtime/literals/lowercase.js
1796
- function lowercase(str) {
1797
- return str.toLowerCase();
2089
+ // src/runtime/type-guards/hasIndexOf.ts
2090
+ var hasIndexOf = (value, idx) => {
2091
+ const result2 = isObject(value) ? String(idx) in value : Array.isArray(value) ? Number(idx) in value : false;
2092
+ return isErrorCondition(result2, "invalid-index") ? false : result2;
2093
+ };
2094
+
2095
+ // src/runtime/type-guards/isRef.ts
2096
+ function isRef(value) {
2097
+ return isObject(value) && "value" in value && Array.from(Object.keys(value)).includes("_value");
1798
2098
  }
1799
2099
 
1800
- // dist/runtime/literals/widen.js
1801
- function widen(value) {
1802
- return value;
2100
+ // src/runtime/type-guards/isFalse.ts
2101
+ function isFalse(i) {
2102
+ return typeof i === "boolean" && !i;
1803
2103
  }
1804
2104
 
1805
- // dist/runtime/literals/toCamelCase.js
1806
- function toCamelCase(input, preserveWhitespace) {
1807
- const pascal = preserveWhitespace ? toPascalCase(input, preserveWhitespace) : toPascalCase(input);
1808
- const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(pascal);
1809
- const camel = (preserveWhitespace ? preWhite : "") + focus.replace(/^.*?([0-9]*?[a-z|A-Z]{1})/s, (_2, p1) => p1.toLowerCase()) + (preserveWhitespace ? postWhite : "");
1810
- return camel;
2105
+ // src/runtime/type-guards/hasDefaultValue.ts
2106
+ function hasDefaultValue(value) {
2107
+ const noDefault = isSpecificConstant("no-default-value");
2108
+ return noDefault(value) ? false : true;
1811
2109
  }
1812
2110
 
1813
- // dist/runtime/literals/toKebabCase.js
1814
- function toKebabCase(input, _preserveWhitespace) {
1815
- const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(input);
1816
- const replaceWhitespace = (i) => i.replace(/\s/gs, "-");
1817
- const replaceUppercase = (i) => i.replace(/[A-Z]/g, (c) => `-${c[0].toLowerCase()}`);
1818
- const replaceLeadingDash = (i) => i.replace(/^-/s, "");
1819
- const replaceTrailingDash = (i) => i.replace(/-$/s, "");
1820
- const replaceUnderscore = (i) => i.replace(/_/g, "-");
1821
- const removeDupDashes = (i) => i.replace(/-+/g, "-");
1822
- return removeDupDashes(`${preWhite}${replaceUnderscore(replaceTrailingDash(replaceLeadingDash(removeDupDashes(replaceWhitespace(replaceUppercase(focus))))))}${postWhite}`);
2111
+ // src/runtime/literals/split.ts
2112
+ function split(str, sep = "") {
2113
+ return str.split(sep);
1823
2114
  }
1824
2115
 
1825
- // dist/runtime/literals/ifLowercase.js
1826
- function ifLowercaseChar(ch, callbackForMatch, callbackForNoMatch) {
1827
- if (ch.length !== 1) {
1828
- throw new Error(`call to ifUppercaseChar received ${ch.length} characters but is only valid when one character is passed in!`);
1829
- }
1830
- return LOWER_ALPHA_CHARS.includes(ch) ? callbackForMatch(ch) : callbackForNoMatch(ch);
2116
+ // src/runtime/type-guards/isNumericString.ts
2117
+ function isNumericString(value) {
2118
+ const validChars = [...NUMERIC_CHAR, "x", "E"];
2119
+ return typeof value === "string" && split(value).every((i) => validChars.includes(i));
2120
+ }
2121
+ function isNumberLike(value) {
2122
+ const numericChars = [...NUMERIC_CHAR];
2123
+ return typeof value === "string" && split(value).every((i) => numericChars.includes(i));
1831
2124
  }
1832
2125
 
1833
- // dist/runtime/literals/toSnakeCase.js
1834
- function toSnakeCase(input, preserveWhitespace = false) {
1835
- const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(input);
1836
- const convertInteriorSpace = (input2) => input2.replace(/\s+/gs, "_");
1837
- const convertDashes = (input2) => input2.replace(/-/gs, "_");
1838
- const injectUnderscoreBeforeCaps = (input2) => input2.replace(/([A-Z])/gs, "_$1");
1839
- const removeLeadingUnderscore = (input2) => input2.startsWith("_") ? input2.slice(1) : input2;
1840
- return ((preserveWhitespace ? preWhite : "") + removeLeadingUnderscore(injectUnderscoreBeforeCaps(convertDashes(convertInteriorSpace(focus)))).toLowerCase() + (preserveWhitespace ? postWhite : "")).replace(/__/g, "_");
2126
+ // src/runtime/type-guards/isFnWithParams.ts
2127
+ function isFnWithParams(input) {
2128
+ var _a;
2129
+ return typeof input === "function" && ((_a = Object.keys(input)) == null ? void 0 : _a.length) > 0;
1841
2130
  }
1842
2131
 
1843
- // dist/runtime/literals/toString.js
1844
- function toString(val) {
1845
- return String(val);
2132
+ // src/runtime/type-guards/isFunction.ts
2133
+ function isFunction(value) {
2134
+ return typeof value === "function" ? true : false;
1846
2135
  }
1847
2136
 
1848
- // dist/runtime/literals/pluralize.js
1849
- var isException = (word) => Object.keys(PLURAL_EXCEPTIONS).includes(word);
1850
- var endingIn = (word, postfix) => {
1851
- switch (postfix) {
1852
- case "is":
1853
- return word.endsWith(postfix) ? `${word}es` : void 0;
1854
- case "singular-noun":
1855
- return SINGULAR_NOUN_ENDINGS.some((i) => word.endsWith(i)) ? split(word).every((i) => [...ALPHA_CHARS].includes(i)) ? `${word}es` : void 0 : void 0;
1856
- case "f":
1857
- return word.endsWith("f") ? stripTrailing(word, "f") + "ves" : word.endsWith("fe") ? stripTrailing(word, "fe") + "ves" : void 0;
1858
- case "y":
1859
- return word.endsWith("y") ? CONSONANTS.includes(word.slice(-2, 1)) ? stripTrailing(word, "y") + "ies" : void 0 : void 0;
1860
- default:
1861
- throw new Error(`endingIn received "${postfix}" as a postfix but this ending is not known!`);
2137
+ // src/runtime/type-guards/isNothing.ts
2138
+ function isNothing(val) {
2139
+ return val === null || val === void 0 ? true : false;
2140
+ }
2141
+
2142
+ // src/runtime/type-guards/isTypeToken.ts
2143
+ function isTypeToken(val) {
2144
+ if (isString(val) && startsWith("<<")(val) && endsWith(">>")(val)) {
2145
+ return true;
2146
+ } else {
2147
+ return false;
2148
+ }
2149
+ }
2150
+
2151
+ // src/runtime/type-guards/isErrorCondition.ts
2152
+ function isErrorCondition(value, kind = null) {
2153
+ return isObject(value) && "__kind" in value && value.__kind === "ErrorCondition" && "kind" in value ? kind !== null ? value["kind"] === kind : true : false;
2154
+ }
2155
+
2156
+ // src/runtime/type-guards/hasKeys.ts
2157
+ var hasKeys = (...props) => (
2158
+ /**
2159
+ * Type guard which validates whether the configured properties
2160
+ * exist on a given `Record<ObjectKey, unknown` and if they do at
2161
+ * runtime will provide the type support for them.
2162
+ */
2163
+ (val) => {
2164
+ const keys = Array.isArray(props) ? props : Object.keys(props).filter((i) => typeof i === "string");
2165
+ return (isFunction(val) || isObject(val)) && keys.every((k) => k in val) ? true : false;
1862
2166
  }
2167
+ );
2168
+
2169
+ // src/runtime/type-guards/isDoneFn.ts
2170
+ var isDoneFn = (val) => {
2171
+ return hasKeys("done")(val) && typeof val.done === "function";
1863
2172
  };
1864
- var pluralize = (word) => {
1865
- const result2 = isException(word) ? PLURAL_EXCEPTIONS[word] : endingIn(word, "is") || endingIn(word, "singular-noun") || endingIn(word, "f") || endingIn(word, "y") || `${word}s`;
1866
- return result2;
2173
+
2174
+ // src/runtime/type-guards/isUrl.ts
2175
+ var isUri = (val, ...protocols) => {
2176
+ const p = protocols.length === 0 ? valuesOf(NETWORK_PROTOCOL_LOOKUP).flat().filter((i) => i) : protocols;
2177
+ return isString(val) && p.some((i) => val.startsWith(`${i}://`));
2178
+ };
2179
+ var isUrl = (val, ...protocols) => {
2180
+ const p = protocols.length === 0 ? ["http", "https"] : protocols;
2181
+ return isString(val) && p.some((i) => val.startsWith(`${i}://`));
1867
2182
  };
1868
2183
 
1869
- // dist/runtime/literals/retainAfter.js
1870
- function retainAfter(content, find2) {
1871
- const parts = content.split(find2);
1872
- parts.shift();
1873
- return parts.join(find2);
1874
- }
2184
+ // src/runtime/type-guards/isCssAspectRatio.ts
2185
+ var tokens = [
2186
+ "1",
2187
+ "inherit",
2188
+ "initial",
2189
+ "revert",
2190
+ "revert-layer",
2191
+ "unset",
2192
+ "auto"
2193
+ ];
2194
+ var isRatio = (val) => /[0-9]{1,4}\s*\/\s*[0-9]{1,4}/.test(val);
2195
+ var isCssAspectRatio = (val) => {
2196
+ return isString(val) && val.split(/\s+/).every((i) => tokens.includes(i) || isRatio(i));
2197
+ };
1875
2198
 
1876
- // dist/runtime/literals/surround.js
1877
- function surround(prefix, postfix) {
1878
- return (input) => `${prefix}${input}${postfix}`;
1879
- }
2199
+ // src/runtime/type-guards/isInlineSvg.ts
2200
+ var isInlineSvg = (v) => {
2201
+ return isString(v) && v.trim().startsWith(`<svg`) && v.trim().endsWith(`</svg>`);
2202
+ };
1880
2203
 
1881
- // dist/runtime/literals/stripAfter.js
1882
- function stripAfter(content, find2) {
1883
- return content.split(find2).shift();
1884
- }
2204
+ // src/runtime/type-guards/youtube.ts
2205
+ var isYouTubeUrl = (val) => {
2206
+ return isString(val) && (val.startsWith("https://www.youtube.com") || val.startsWith("https://youtube.com") || val.startsWith("https://youtu.be"));
2207
+ };
2208
+ var isYouTubeShareUrl = (val) => {
2209
+ return isString(val) && val.startsWith(`https://youtu.be`);
2210
+ };
2211
+ var isYouTubeVideoUrl = (val) => {
2212
+ return isString(val) && (val.startsWith("https://www.youtube.com") || val.startsWith("https://youtube.com") || val.startsWith("https://youtu.be"));
2213
+ };
2214
+ var isYouTubePlaylistUrl = (val) => {
2215
+ return isString(val) && (val === `https://www.youtube.com/feed/playlists` || val === `https://youtube.com/feed/playlists` || val === `https://www.youtube.com/channel/playlists` || val === `https://youtube.com/channel/playlists` || val.startsWith(`https://www.youtube.com/@`) && val.endsWith(`/playlists`) || val.startsWith(`https://youtube.com/@`) && val.endsWith(`/playlists`));
2216
+ };
2217
+ var feed_map = (type) => {
2218
+ return isUndefined(type) ? `/feed` : type === "liked" ? `/playlist?list=LL` : ["history", "playlists", "trending", "subscriptions"].includes(type) ? `/feed/${type}` : `/feed/`;
2219
+ };
2220
+ var isYouTubeFeedUrl = (val, type = void 0) => {
2221
+ return isString(val) && (val.startsWith(`https://www.youtube.com${feed_map(type)}`) || val.startsWith(`https://youtube.com${feed_map(type)}`));
2222
+ };
2223
+ var isYouTubeCreatorUrl = (url) => {
2224
+ return isString(url) && (url.startsWith(`https://www.youtube.com/@`) || url.startsWith(`https://youtube.com/@`) || url.startsWith(`https://www.youtube.com/channel/`));
2225
+ };
2226
+ var isYouTubeVideosInPlaylist = (val) => {
2227
+ return isString(val) && (val.startsWith(`https://www.youtube.com/playlist?`) || val.startsWith(`https://youtube.com/playlist?`)) && hasUrlQueryParameter(val, "list");
2228
+ };
1885
2229
 
1886
- // dist/runtime/literals/stripBefore.js
1887
- function stripBefore(content, find2) {
1888
- return content.split(find2).slice(1).join(find2);
1889
- }
2230
+ // src/runtime/type-guards/repos.ts
2231
+ var isRepoSource = (v) => {
2232
+ return isString(v) && REPO_SOURCES.includes(v);
2233
+ };
2234
+ var isSemanticVersion = (v, allowPrefix = false) => {
2235
+ return isString(v) && v.split(".").length === 3 && !Number.isNaN(Number(v.split(".")[1])) && !Number.isNaN(Number(v.split(".")[2])) && (!Number.isNaN(Number(v.split(".")[0])) || allowPrefix && !Number.isNaN(Number(stripLeading(v.split(".")[0], "v").trim())));
2236
+ };
2237
+ var isRepoUrl = (val) => {
2238
+ const baseUrls = valuesOf(REPO_SOURCE_LOOKUP).flat();
2239
+ return isString(val) && baseUrls.every(
2240
+ (u) => val === u || val.startsWith(`${u}/`)
2241
+ );
2242
+ };
2243
+ var isGithubUrl = (val) => {
2244
+ const baseUrls = REPO_SOURCE_LOOKUP["github"];
2245
+ return isString(val) && baseUrls.every(
2246
+ (u) => val === u || val.startsWith(`${u}/`)
2247
+ );
2248
+ };
2249
+ var isGithubRepoUrl = (val) => {
2250
+ const baseUrls = [""];
2251
+ return isString(val) && baseUrls.every(
2252
+ (u) => val === u || val.startsWith(`${u}/`)
2253
+ );
2254
+ };
2255
+ var isBitbucketUrl = (val) => {
2256
+ const baseUrls = REPO_SOURCE_LOOKUP["bitbucket"];
2257
+ return isString(val) && baseUrls.every(
2258
+ (u) => val === u || val.startsWith(`${u}/`)
2259
+ );
2260
+ };
2261
+ var isCodeCommitUrl = (val) => {
2262
+ const baseUrls = REPO_SOURCE_LOOKUP["codecommit"];
2263
+ return isString(val) && baseUrls.every(
2264
+ (u) => val === u || val.startsWith(`${u}/`)
2265
+ );
2266
+ };
2267
+
2268
+ // src/runtime/type-guards/network-tg.ts
2269
+ var isIp4Address = (val) => {
2270
+ return isString(val) && val.split(".").length === 4 && val.split(".").every((i) => isNumberLike(i)) && val.split(".").every((i) => Number(i) >= 0 && Number(i) <= 255);
2271
+ };
2272
+ var isIp6Address = (val) => {
2273
+ const expanded = isString(val) ? ip6GroupExpansion(val) : "";
2274
+ return isString(val) && isString(expanded) && expanded.split(":").every((i) => asChars(i).length >= 1 && asChars(i).length <= 4) && expanded.split(":").every((i) => isHexadecimal(i));
2275
+ };
2276
+ var isIpAddress = (val) => {
2277
+ return isIp4Address(val) || isIp6Address(val);
2278
+ };
2279
+ var hasUrlPort = (val) => {
2280
+ return isString(val) && asChars(removeUrlProtocol(val)).some((i) => i === ":");
2281
+ };
2282
+ var isUrlPath = (val) => {
2283
+ return isString(val) && (val === "" || val.startsWith("/")) && asChars(val).every(
2284
+ (c) => isAlpha(c) || isNumberLike(c) || c === "_" || c === "@" || c === "." || c === "-"
2285
+ );
2286
+ };
2287
+ var isDomainName = (val) => {
2288
+ return isString(val) && val.split(".").filter((i) => i).length > 1 && isString(val.split(".").filter((i) => i).pop()) && asChars(val.split(".").filter((i) => i).pop()).length > 1 && val.split(".").filter((i) => i).every(
2289
+ (i) => isAlpha(i) || isNumberLike(i) || i === "-" || i === "_"
2290
+ );
2291
+ };
2292
+ var isUrlSource = (val) => {
2293
+ return isDomainName(val) || isIpAddress(val);
2294
+ };
2295
+ var hasUrlQueryParameter = (val, prop) => {
2296
+ return isString(getUrlQueryParams(val, prop));
2297
+ };
2298
+
2299
+ // src/runtime/type-conversion/asChars.ts
2300
+ var asChars = (str) => {
2301
+ return str.split("");
2302
+ };
2303
+
2304
+ // src/runtime/type-guards/isHexadecimal.ts
2305
+ var isHexadecimal = (val) => {
2306
+ return isString(val) && asChars(val).every((i) => isNumericString(i) || ["a", "b", "c", "d", "e", "f"].includes(i.toLowerCase()));
2307
+ };
2308
+
2309
+ // src/runtime/type-guards/isTrimmable.ts
2310
+ var isTrimable = (val) => {
2311
+ return isString(val) && val !== val.trim();
2312
+ };
1890
2313
 
1891
- // dist/runtime/type-conversion/mergeObjects.js
2314
+ // src/runtime/type-conversion/mergeObjects.ts
1892
2315
  function mergeObjects(defVal, override) {
1893
2316
  const intersectingKeys = sharedKeys(defVal, override);
1894
2317
  const defUnique = withoutKeys(defVal, ...intersectingKeys);
1895
2318
  const overrideUnique = withoutKeys(defVal, ...intersectingKeys);
1896
2319
  const merged = {
1897
- ...intersectingKeys.reduce((acc, key) => typeof override[key] === "undefined" ? { ...acc, [key]: defVal[key] } : { ...acc, [key]: override[key] }, {}),
2320
+ ...intersectingKeys.reduce(
2321
+ (acc, key) => typeof override[key] === "undefined" ? { ...acc, [key]: defVal[key] } : { ...acc, [key]: override[key] },
2322
+ {}
2323
+ ),
1898
2324
  ...defUnique,
1899
2325
  ...overrideUnique
1900
2326
  };
1901
2327
  return merged;
1902
2328
  }
1903
2329
 
1904
- // dist/runtime/type-conversion/optional.js
1905
- function optional(...values) {
1906
- return values.length === 1 ? values[0] : values;
2330
+ // src/runtime/type-conversion/optional.ts
2331
+ function optional(value) {
2332
+ return value;
1907
2333
  }
1908
-
1909
- // dist/runtime/type-guards/isUndefined.js
1910
- function isUndefined(value) {
1911
- return typeof value === "undefined" ? true : false;
2334
+ function orNull(value) {
2335
+ return value;
2336
+ }
2337
+ function optionalOrNull(value) {
2338
+ return value;
1912
2339
  }
1913
2340
 
1914
- // dist/runtime/type-conversion/mergeScalars.js
2341
+ // src/runtime/type-conversion/mergeScalars.ts
1915
2342
  function mergeScalars(a, b) {
1916
2343
  return isUndefined(b) ? a : b;
1917
2344
  }
1918
2345
 
1919
- // dist/runtime/type-conversion/mergeTuples.js
2346
+ // src/runtime/type-conversion/mergeTuples.ts
1920
2347
  function mergeTuples(a, b) {
1921
2348
  return b.length > a.length ? b.map((v, idx) => v !== void 0 ? v : a[idx]) : [...b, ...a.slice(b.length)].map((v, idx) => v !== void 0 ? v : a[idx]);
1922
2349
  }
1923
2350
 
1924
- // dist/runtime/type-conversion/unionize.js
2351
+ // src/runtime/type-conversion/unionize.ts
1925
2352
  function unionize(value, inUnionWith) {
1926
2353
  return value;
1927
2354
  }
1928
2355
 
1929
- // dist/runtime/type-conversion/intersect.js
2356
+ // src/runtime/type-conversion/intersect.ts
1930
2357
  function intersect(value, intersectedWith) {
1931
2358
  return value;
1932
2359
  }
1933
2360
 
1934
- // dist/runtime/type-conversion/never.js
2361
+ // src/runtime/type-conversion/never.ts
1935
2362
  function never(val) {
1936
2363
  return val;
1937
2364
  }
1938
2365
 
1939
- // dist/runtime/type-conversion/union.js
2366
+ // src/runtime/type-conversion/union.ts
1940
2367
  var union = (...options) => (value) => value;
1941
2368
 
1942
- // dist/runtime/type-conversion/toNumber.js
2369
+ // src/runtime/type-conversion/toNumber.ts
1943
2370
  var convertScalar = (val) => {
1944
2371
  switch (typeof val) {
1945
2372
  case "number":
@@ -1957,1004 +2384,1232 @@ function toNumber(value) {
1957
2384
  return Array.isArray(value) ? convertList(value) : convertScalar(value);
1958
2385
  }
1959
2386
 
1960
- // dist/runtime/type-conversion/asRecord.js
2387
+ // src/runtime/type-conversion/asRecord.ts
1961
2388
  var asRecord = (obj) => {
1962
2389
  return obj;
1963
2390
  };
1964
2391
 
1965
- // dist/runtime/type-conversion/asString.js
2392
+ // src/runtime/type-conversion/asString.ts
1966
2393
  var asString = (value) => {
1967
- return isString(value) ? value : isNumber(value) ? `${value}` : isBoolean(value) ? `${value}` : String(value);
1968
- };
1969
-
1970
- // dist/runtime/type-conversion/asChars.js
1971
- var asChars = (str) => {
1972
- return str.split("");
2394
+ return isString(value) ? value : isNumber(value) ? `${value}` : isBoolean(value) ? `${value}` : isArray(value) ? value.join("") : String(value);
1973
2395
  };
1974
2396
 
1975
- // dist/runtime/type-conversion/ip6GroupExpansion.js
2397
+ // src/runtime/type-conversion/ip6GroupExpansion.ts
1976
2398
  var ip6GroupExpansion = (ip) => {
1977
2399
  return stripTrailing(ip.replaceAll("::", ":0000:"), ":");
1978
2400
  };
1979
2401
 
1980
- // dist/runtime/literals/stripUntil.js
1981
- var stripUntil = (content, ...until) => {
1982
- const stopIdx = asChars(content).findIndex((c) => until.includes(c));
1983
- return content.slice(stopIdx);
2402
+ // src/runtime/type-conversion/csv.ts
2403
+ var csv = (csv2, format = `string-numeric-tuple`) => {
2404
+ const tuple3 = [];
2405
+ csv2.split(/,\s{0,1}/).forEach((v) => {
2406
+ tuple3.push(
2407
+ format === "string-numeric-tuple" ? isNumberLike(v) ? Number(v) : v : format === "json-tuple" ? isNumberLike(v) ? Number(v) : v === "true" ? true : v === "false" ? false : `"${v}"` : format === "string-tuple" ? `${v}` : Never
2408
+ );
2409
+ });
2410
+ return tuple3;
1984
2411
  };
1985
2412
 
1986
- // dist/runtime/literals/trim.js
1987
- function trim(input) {
1988
- return input.trim();
1989
- }
1990
- function trimLeft(input) {
1991
- return input.trimStart();
1992
- }
1993
- function trimStart(input) {
1994
- return input.trimStart();
1995
- }
1996
- function trimRight(input) {
1997
- return input.trimEnd();
1998
- }
1999
- function trimEnd(input) {
2000
- return input.trimEnd();
2001
- }
2413
+ // src/runtime/type-conversion/json.ts
2414
+ var jsonValue = (val) => {
2415
+ return isNumberLike(val) ? Number(val) : val === "true" ? true : val === "false" ? false : `"${val}"`;
2416
+ };
2417
+ var jsonValues = (...val) => {
2418
+ return val.map((i) => jsonValue(i));
2419
+ };
2002
2420
 
2003
- // dist/runtime/literals/toPascalCase.js
2004
- function toPascalCase(input, preserveWhitespace = void 0) {
2005
- const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(input);
2006
- const convertInteriorToCap = (i) => i.replace(/[ |_|-]+([0-9]*?[a-z|A-Z]{1})/gs, (_2, p1) => p1.toUpperCase());
2007
- const startingToCap = (i) => i.replace(/^[_|-]*?([0-9]*?[a-z]{1})/gs, (_2, p1) => p1.toUpperCase());
2008
- const replaceLeadingTrash = (i) => i.replace(/^[-_]/s, "");
2009
- const replaceTrailingTrash = (i) => i.replace(/[-_]$/s, "");
2010
- const pascal = `${preserveWhitespace ? preWhite : ""}${capitalize(replaceTrailingTrash(replaceLeadingTrash(convertInteriorToCap(startingToCap(focus)))))}${preserveWhitespace ? postWhite : ""}`;
2011
- return pascal;
2012
- }
2421
+ // src/runtime/type-guards/hasWhitespace.ts
2422
+ var hasWhiteSpace = (val) => {
2423
+ return isString(val) && asChars(val).some((c) => WHITESPACE_CHARS.includes(c));
2424
+ };
2013
2425
 
2014
- // dist/runtime/literals/toUppercase.js
2015
- function toUppercase(str) {
2016
- return str.split("").map((i) => ifLowercaseChar(i, (v) => capitalize(v), (v) => v)).join("");
2017
- }
2426
+ // src/runtime/type-guards/isEmail.ts
2427
+ var isEmail = (val) => {
2428
+ if (!isString(val)) {
2429
+ return false;
2430
+ }
2431
+ const parts = val.split("@");
2432
+ const domain = parts[1].split(".");
2433
+ const tld = domain.pop();
2434
+ return isString(val) && (parts.length === 2 && domain.length >= 1 && tld.length >= 2);
2435
+ };
2018
2436
 
2019
- // dist/runtime/literals/toNumericArray.js
2020
- var toNumericArray = (arr) => {
2021
- return arr.map((i) => Number(i));
2437
+ // src/runtime/type-guards/isPhoneNumber.ts
2438
+ var isPhoneNumber = (val) => {
2439
+ let svelte = String(val).trim();
2440
+ let chars = svelte.split("");
2441
+ let numeric = retainChars(svelte, ...NUMERIC_CHAR);
2442
+ let valid = ["+", "(", ...NUMERIC_CHAR];
2443
+ let nothing = stripChars(svelte, ...[
2444
+ ...NUMERIC_CHAR,
2445
+ ...WHITESPACE_CHARS,
2446
+ "(",
2447
+ ")",
2448
+ "+",
2449
+ ".",
2450
+ "-"
2451
+ ]);
2452
+ return chars.every((i) => valid.includes(i)) && svelte.startsWith(`+`) ? numeric.length >= 8 : svelte.startsWith(`00`) ? numeric.length >= 10 : numeric.length >= 7 && nothing === "";
2453
+ };
2454
+
2455
+ // src/runtime/type-guards/isUnset.ts
2456
+ var isUnset = (val) => {
2457
+ return isObject(val) && val.kind === "Unset";
2458
+ };
2459
+ var isSet = (val) => {
2460
+ return isObject(val) ? val.kind !== "Unset" ? true : false : true;
2022
2461
  };
2023
2462
 
2024
- // dist/runtime/literals/truncate.js
2025
- var truncate = (content, maxLength, ellipsis = false) => {
2026
- const overLimit = content.length > maxLength;
2027
- return overLimit ? ellipsis ? `${content.slice(0, maxLength)}${typeof ellipsis === "string" ? ellipsis : "..."}` : content.slice(0, maxLength) : content;
2463
+ // src/runtime/type-guards/api-tg.ts
2464
+ var isEscapeFunction = (val) => {
2465
+ return isFunction(val) && "escape" in val && val.escape === true;
2466
+ };
2467
+ var isOptionalParamFunction = (val) => {
2468
+ return isFunction(val) && "optionalParams" in val && val.optionalParams === true;
2469
+ };
2470
+ var isApi = (api) => {
2471
+ return isObject(api) && "surface" in api && "_kind" in api && api._kind === "api";
2472
+ };
2473
+ var isApiSurface = (val) => {
2474
+ return isObject(val) && Object.keys(val).some((k) => isEscapeFunction(val[k]));
2028
2475
  };
2029
2476
 
2030
- // dist/runtime/literals/takeNumericCharacters.js
2031
- var takeNumericCharacters = (content) => {
2032
- let nonNumericIdx = asChars(content).findIndex((i) => !NUMERIC_CHAR.includes(i));
2033
- return content.slice(0, nonNumericIdx);
2477
+ // src/runtime/type-guards/isBooleanLike.ts
2478
+ var isBooleanLike = (val) => {
2479
+ return isBoolean(val) || isString(val) && ["true", "false", "boolean"].includes(val);
2034
2480
  };
2035
2481
 
2036
- // dist/runtime/literals/retainChars.js
2037
- var retainChars = (content, ...retain2) => {
2038
- return asChars(content).filter((c) => retain2.includes(c)).join("");
2482
+ // src/runtime/type-guards/isRegExp.ts
2483
+ var isRegExp = (val) => {
2484
+ return val instanceof RegExp;
2485
+ };
2486
+ var isLikeRegExp = (val) => {
2487
+ if (isRegExp(val)) {
2488
+ return true;
2489
+ }
2490
+ if (isString(val)) {
2491
+ try {
2492
+ const _re = new RegExp(val);
2493
+ return true;
2494
+ } catch {
2495
+ return false;
2496
+ }
2497
+ }
2498
+ return false;
2039
2499
  };
2040
2500
 
2041
- // dist/runtime/literals/stripChars.js
2042
- var stripChars = (content, ...strip) => {
2043
- return asChars(content).filter((c) => !strip.includes(c)).join("");
2501
+ // src/runtime/type-guards/isAlpha.ts
2502
+ var isAlpha = (value) => {
2503
+ return isString(value) && split(value).every((v) => ALPHA_CHARS.includes(v));
2044
2504
  };
2045
2505
 
2046
- // dist/runtime/literals/retainWhile.js
2047
- var retainWhile = (content, ...retain2) => {
2048
- const stopIdx = asChars(content).findIndex((c) => !retain2.includes(c));
2049
- return content.slice(0, stopIdx);
2506
+ // src/runtime/type-guards/tokens/isAtomicToken.ts
2507
+ var isAtomicToken = (val) => {
2508
+ return isString(val) && TT_Atomics.some((v) => val === `<<${v}>>`);
2050
2509
  };
2051
2510
 
2052
- // dist/runtime/literals/asPhoneNumber.js
2053
- var getPhoneCountryCode = (phone) => {
2054
- return phone.trim().startsWith("+") || phone.trim().startsWith("00") ? retainWhile(stripLeading(stripLeading(phone.trim(), "+"), "00"), ...NUMERIC_CHAR) : "";
2511
+ // src/runtime/type-guards/tokens/isContainerToken.ts
2512
+ var isObjectToken = (val) => {
2513
+ return isString(val) && val.startsWith("<<obj::");
2055
2514
  };
2056
- var removePhoneCountryCode = (phone) => {
2057
- const countryCode = getPhoneCountryCode(phone);
2058
- return countryCode !== "" ? stripLeading(stripLeading(phone.trim(), "+", "00"), countryCode).trim() : phone.trim();
2059
- };
2060
- var convert = (countryCode, phone, delimiter, para) => {
2061
- const parts = stripChars(phone, "(", ")").trim().split(/[-. ]/);
2062
- const isRegional = parts.length === 2 ? true : false;
2063
- const isCountry = parts.length === 3 ? true : false;
2064
- const isShortCode = parts.length === 1 && asChars(phone).length < 7 ? true : false;
2065
- const replacement = isShortCode ? phone : isRegional ? parts.join(delimiter) : isCountry && para ? `(${parts[0]}) ${parts.slice(1).join(delimiter)}` : isCountry ? parts.join(delimiter) : void 0;
2066
- if (!replacement) {
2067
- throw new Error(`invalid phone number: ${phone}. Unable to parse!`);
2068
- }
2069
- return countryCode === "" ? replacement : `+${countryCode} ${replacement}`;
2515
+ var isRecordToken = (val) => {
2516
+ return isString(val) && val.startsWith("<<rec::") && val.endsWith(">>");
2070
2517
  };
2071
- var asPhoneNumber = (phone, format = "Dotted (e.g., 456.555.1212)") => {
2072
- if (!isPhoneNumber(phone)) {
2073
- throw new Error(`Invalid phone number presented to asPhoneNumber(phone,format)!`);
2074
- }
2075
- const countryCode = getPhoneCountryCode(phone);
2076
- const remaining = removePhoneCountryCode(phone);
2077
- let result2;
2078
- switch (format) {
2079
- case "Dashed (e.g., 456-555-1212)":
2080
- result2 = convert(countryCode, remaining, "-", false);
2081
- break;
2082
- case "Dotted (e.g., 456.555.1212)":
2083
- result2 = convert(countryCode, remaining, ".", false);
2084
- break;
2085
- case "ParaDashed (e.g., (456) 555-1212)":
2086
- result2 = convert(countryCode, remaining, "-", true);
2087
- break;
2088
- case "ParaSpaced (e.g., (456) 555 1212)":
2089
- result2 = convert(countryCode, remaining, " ", true);
2090
- break;
2091
- }
2092
- return result2;
2518
+ var isTupleToken = (val) => {
2519
+ return isString(val) && val.startsWith("<<tuple::");
2093
2520
  };
2094
-
2095
- // dist/runtime/errors/kindedError.js
2096
- var kindError = (kind, _defineContext) => (msg, context) => {
2097
- const err = new Error(msg);
2098
- err.name = toPascalCase(kind);
2099
- err.kind = toKebabCase(kind);
2100
- err.__kind = "KindError";
2101
- err.context = context;
2102
- return err;
2521
+ var isArrayToken = (val) => {
2522
+ return isString(val) && val.startsWith("<<arr::");
2523
+ };
2524
+ var isMapToken = (val) => {
2525
+ return isString(val) && val.startsWith("<<map::");
2526
+ };
2527
+ var isSetToken = (val) => {
2528
+ return isString(val) && val.startsWith("<<set::");
2529
+ };
2530
+ var isWeakMapToken = (val) => {
2531
+ return isString(val) && val.startsWith("<<weak::");
2532
+ };
2533
+ var isUnionToken = (val) => {
2534
+ return isString(val) && val.startsWith("<<union::[ ");
2535
+ };
2536
+ var isUnionSetToken = (val) => {
2537
+ return isString(val) && val.startsWith("<<union-set::");
2538
+ };
2539
+ var isContainerToken = (val) => {
2540
+ return isString(val) && (isObjectToken(val) || isRecordToken(val) || isTupleToken(val) || isArrayToken(val) || isMapToken(val) || isSetToken(val) || isWeakMapToken(val) || isUnionSetToken(val) || isUnionToken(val));
2103
2541
  };
2104
2542
 
2105
- // dist/runtime/functional/result.js
2106
- var result = "NOT READY";
2107
-
2108
- // dist/runtime/functions/fnMeta.js
2109
- var fnMeta = (func) => {
2110
- const fn2 = (...args) => func(...args);
2111
- const props = Object.keys(fn2).reduce((acc, key) => ({ ...acc, [key]: fn2[key] }), {});
2112
- return {
2113
- fn: fn2,
2114
- props
2115
- };
2543
+ // src/runtime/type-guards/tokens/isFunctionToken.ts
2544
+ var isFnToken = (val) => {
2545
+ return isString(val) && val.startsWith("<<fn::");
2546
+ };
2547
+ var isGeneratorToken = (val) => {
2548
+ return isString(val) && val.startsWith("<<gen::");
2116
2549
  };
2117
2550
 
2118
- // dist/runtime/functions/wrapFn.js
2119
- var wrapFn = "NOT IMPLEMENTED";
2551
+ // src/runtime/type-guards/tokens/isSingletonToken.ts
2552
+ var isSingletonToken = (val) => {
2553
+ return isString(val) && TT_Atomics.some((v) => val === `<<${v}>>`);
2554
+ };
2120
2555
 
2121
- // dist/runtime/initializers/addFnToProps.js
2122
- var addPropsToFn = (fn2, clone_fn) => {
2123
- const localFn = clone_fn ? (...args) => fn2(args) : fn2;
2124
- return (obj) => {
2125
- for (const k in obj) {
2126
- localFn[k] = obj[k];
2127
- }
2128
- return localFn;
2129
- };
2556
+ // src/runtime/type-guards/tokens/isSimpleToken.ts
2557
+ var split_tokens = SIMPLE_TOKENS.map((i) => i.split("TOKEN"));
2558
+ var scalar_split_tokens = SIMPLE_SCALAR_TOKENS.map((i) => i.split("TOKEN"));
2559
+ var isSimpleToken = (val) => {
2560
+ return isString(val) && split_tokens.some(
2561
+ (i) => i.length === 1 && val === i[0] || val.startsWith(i[0]) && val.endsWith(i.slice(-1)[0]) && i.every((p) => val.includes(p))
2562
+ );
2563
+ };
2564
+ var isSimpleScalarToken = (val) => {
2565
+ return isString(val) && scalar_split_tokens.some(
2566
+ (i) => i.length === 1 && val === i[0] || val.startsWith(i[0]) && val.endsWith(i.slice(-1)[0]) && i.every((p) => val.includes(p))
2567
+ );
2568
+ };
2569
+ var isSimpleContainerToken = (val) => {
2570
+ return isString(val) && scalar_split_tokens.some(
2571
+ (i) => i.length === 1 && val === i[0] || val.startsWith(i[0]) && val.endsWith(i.slice(-1)[0]) && i.every((p) => val.includes(p))
2572
+ );
2573
+ };
2574
+ var isSimpleTokenTuple = (val) => {
2575
+ return isArray(val) && val.length !== 0 && val.every(isSimpleToken);
2576
+ };
2577
+ var isSimpleScalarTokenTuple = (val) => {
2578
+ return isArray(val) && val.length !== 0 && val.every(isSimpleScalarToken);
2579
+ };
2580
+ var isSimpleContainerTokenTuple = (val) => {
2581
+ return isArray(val) && val.length !== 0 && val.every(isSimpleContainerToken);
2130
2582
  };
2131
2583
 
2132
- // dist/runtime/initializers/addPropsToFn.js
2133
- var addFnToProps = (props, _clone_fn) => (fn2) => {
2134
- const localFn = (...args) => fn2(args);
2135
- for (const k in props) {
2136
- localFn[k] = props[k];
2137
- }
2138
- return localFn;
2584
+ // src/runtime/type-guards/higher-order/endsWith.ts
2585
+ var endsWith = (endingIn2) => (val) => {
2586
+ return isString(val) ? val.endsWith(endingIn2) ? true : false : isNumber(val) ? String(val).endsWith(endingIn2) ? true : false : false;
2139
2587
  };
2140
2588
 
2141
- // dist/runtime/initializers/createFnWithProps.js
2142
- var createFnWithProps = (fn2, props, narrowing = false) => {
2143
- const fnWithProps = fn2;
2144
- for (const prop of keysOf(props)) {
2145
- fnWithProps[prop] = props[prop];
2146
- }
2147
- return isTrue(narrowing) ? fnWithProps : fnWithProps;
2589
+ // src/runtime/type-guards/higher-order/startsWith.ts
2590
+ var startsWith = (startingWith) => (val) => {
2591
+ return isString(val) ? val.startsWith(startingWith) ? true : false : isNumber(val) ? String(val).startsWith(startingWith) ? true : false : false;
2148
2592
  };
2149
2593
 
2150
- // dist/runtime/initializers/defineObj.js
2151
- function defineObj(literal2 = {}) {
2152
- return (wide2 = {}) => {
2153
- const obj = literal2 ? { ...literal2, ...wide2 } : wide2;
2154
- return obj;
2155
- };
2594
+ // src/runtime/type-guards/higher-order/isEqual.ts
2595
+ var isEqual = (base) => (value) => isSameTypeOf(base)(value) ? value === base ? true : false : false;
2596
+
2597
+ // src/runtime/type-guards/higher-order/isLength.ts
2598
+ function isLength(value, len) {
2599
+ return isArray(value) ? isEqual(value.length)(len) ? true : false : isString(value) ? isEqual(value.length)(len) ? true : false : isObject(value) ? isEqual(keysOf(value))(len) ? true : false : false;
2156
2600
  }
2157
2601
 
2158
- // dist/runtime/initializers/defineTuple.js
2159
- var defineTuple = (...values) => {
2160
- return values.map((i) => isFunction(i) ? handleDoneFn(i(ShapeApiImplementation)) : i);
2602
+ // src/runtime/type-guards/higher-order/isTypeOf.ts
2603
+ var isTypeOf = (type) => (value) => {
2604
+ return typeof value === type;
2161
2605
  };
2162
2606
 
2163
- // dist/runtime/lists/asArray.js
2164
- var asArray = (thing) => {
2165
- return Array.isArray(thing) === true ? (
2166
- // proxy thing back as it's already an array
2167
- thing
2168
- ) : typeof thing === "undefined" ? [] : [thing];
2607
+ // src/runtime/type-guards/higher-order/isSameTypeOf.ts
2608
+ var isSameTypeOf = (base) => (compare) => {
2609
+ return typeof base === typeof compare;
2169
2610
  };
2170
2611
 
2171
- // dist/runtime/lists/getEach.js
2172
- function getEach(list2, dotPath) {
2173
- const result2 = list2.map((i) => isNull(dotPath) ? i : isContainer(i) ? get(i, dotPath) : Never).filter((i) => !isErrorCondition(i));
2174
- return result2;
2175
- }
2612
+ // src/runtime/type-guards/higher-order/isTuple.ts
2613
+ var isTuple = (...tuple3) => {
2614
+ const results = tuple3.map((i) => i(ShapeApiImplementation)).map((i) => isDoneFn(i) ? i.done() : i);
2615
+ return (v) => {
2616
+ return isArray(v) && v.length === results.length && results.every(isShape) && v.every((item, idx) => isSameTypeOf(results[idx])(item));
2617
+ };
2618
+ };
2176
2619
 
2177
- // dist/runtime/lists/indexOf.js
2178
- function indexOf(val, index) {
2179
- const isNegative = isNumber(index) && index < 0;
2180
- if (isNegative && !Array.isArray(val)) {
2181
- throw new Error(`The indexOf(val,idx) utility received a negative index value [${index}] but the value being de-references is not an array [${typeof val}]!`);
2620
+ // src/runtime/literals/stripTrailing.ts
2621
+ function stripTrailing(content, ...strip) {
2622
+ let output = String(content);
2623
+ for (const s of strip) {
2624
+ if (output.endsWith(String(s))) {
2625
+ output = output.slice(0, -1 * String(s).length);
2626
+ }
2182
2627
  }
2183
- if (isNegative && Array.isArray(val) && val.length < Math.abs(index)) {
2184
- throw new Error(`The indexOf(val,idx) utility received a negative index of ${index} but the length of the array passed in is only ${val.length}! This is not allowed.`);
2628
+ return isNumber(content) ? Number(output) : output;
2629
+ }
2630
+
2631
+ // src/runtime/literals/stripLeading.ts
2632
+ function stripLeading(content, ...strip) {
2633
+ let output = String(content);
2634
+ for (const s of strip) {
2635
+ if (output.startsWith(String(s))) {
2636
+ output = output.slice(String(s).length);
2637
+ }
2185
2638
  }
2186
- const idx = isNegative && Array.isArray(val) ? val.length + 1 - Math.abs(index) : index;
2187
- return index === null ? val : isNull(idx) ? val : isArray(val) ? Number(idx) in val ? val[Number(idx)] : Never : isObject(val) ? String(idx) in val ? val[String(idx)] : Never : Never;
2639
+ return isNumber(content) ? Number(output) : output;
2188
2640
  }
2189
2641
 
2190
- // dist/runtime/boolean-logic/ifNotNull.js
2191
- function ifNotNull(val, ifVal, elseVal) {
2192
- return isNull(val) ? elseVal() : ifVal(val);
2642
+ // src/runtime/literals/ensureTrailing.ts
2643
+ function ensureTrailing(content, ensure) {
2644
+ return (
2645
+ //
2646
+ content.endsWith(ensure) ? content : `${content}${ensure}`
2647
+ );
2193
2648
  }
2194
2649
 
2195
- // dist/runtime/lists/intersection.js
2196
- function intersectWithOffset(a, b, deref) {
2197
- const aIndexable = a.every((i) => isIndexable(i));
2198
- const bIndexable = b.every((i) => isIndexable(i));
2199
- if (!aIndexable || !bIndexable) {
2200
- if (!aIndexable) {
2201
- throw new Error(`The "a" array passed into intersect(a,b) was not fully composed of indexable properties: ${a.map((i) => typeof i).join(", ")}`);
2202
- } else {
2203
- throw new Error(`The "b" array passed into intersect(a,b) was not fully composed of indexable properties: ${b.map((i) => typeof i).join(", ")}`);
2204
- }
2205
- }
2206
- const aMatches = getEach(a, deref);
2207
- const bMatches = getEach(b, deref);
2208
- const sharedKeys2 = ifNotNull(deref, (v) => [
2209
- a.filter((i) => Array.from(bMatches).includes(get(i, v))),
2210
- b.filter((i) => Array.from(aMatches).includes(get(i, v)))
2211
- ], () => a.filter((k) => b.includes(k)));
2212
- return sharedKeys2;
2650
+ // src/runtime/literals/ensureLeading.ts
2651
+ function ensureLeading(content, ensure) {
2652
+ let output = String(content);
2653
+ return output.startsWith(String(ensure)) ? content : isString(content) ? `${ensure}${content}` : Number(`${ensure}${content}`);
2213
2654
  }
2214
- function intersectNoOffset(a, b) {
2215
- return a.length < b.length ? a.filter((val) => b.includes(val)) : b.filter((val) => a.includes(val));
2655
+
2656
+ // src/runtime/literals/ensureSurround.ts
2657
+ function ensureSurround(prefix, postfix) {
2658
+ const fn2 = (input) => {
2659
+ let result2 = input;
2660
+ result2 = ensureLeading(result2, prefix);
2661
+ result2 = ensureTrailing(result2, postfix);
2662
+ return result2;
2663
+ };
2664
+ return fn2;
2216
2665
  }
2217
- var intersection = (a, b, deref = null) => {
2218
- return deref === null ? intersectNoOffset(a, b) : intersectWithOffset(a, b, deref);
2219
- };
2220
2666
 
2221
- // dist/runtime/lists/unique.js
2222
- var unique = (...values) => {
2223
- const u = [];
2224
- for (const i of values.flat()) {
2225
- if (!u.includes(i)) {
2226
- u.push(i);
2227
- }
2667
+ // src/runtime/literals/ifUppercase.ts
2668
+ function ifUppercaseChar(ch, callbackForMatch, callbackForNoMatch) {
2669
+ if (ch.length !== 1) {
2670
+ throw new Error(`Invalid string length passed to ifUppercaseChar(ch); this function requires a single character but ${ch.length} were received`);
2228
2671
  }
2229
- return u;
2230
- };
2672
+ return LOWER_ALPHA_CHARS.includes(ch) ? callbackForMatch(ch) : callbackForNoMatch(ch);
2673
+ }
2231
2674
 
2232
- // dist/runtime/lists/logicalReturns.js
2233
- function logicalReturns(conditions) {
2234
- return conditions.map((c) => isBoolean(c) ? c : isFunction(c) ? c() : Never);
2675
+ // src/runtime/literals/pathJoin.ts
2676
+ function pathJoin(...segments) {
2677
+ const clean_path = segments.map((i) => stripTrailing(stripLeading(i, "/"), "/")).join("/");
2678
+ const original_path = segments.join("/");
2679
+ const pre = original_path.startsWith("/") ? "/" : "";
2680
+ const post = original_path.endsWith("/") ? "/" : "";
2681
+ return `${pre}${clean_path}${post}`;
2235
2682
  }
2236
2683
 
2237
- // dist/runtime/lists/find.js
2238
- var find = (list2, deref = null) => (comparator) => {
2239
- return list2.find((i) => {
2240
- const val = deref ? isContainer(i) ? deref in i ? i[deref] : void 0 : i : i;
2241
- return val === comparator;
2242
- });
2243
- };
2684
+ // src/runtime/literals/narrow.ts
2685
+ function narrow(...values) {
2686
+ return values.length === 1 ? values[0] : values;
2687
+ }
2244
2688
 
2245
- // dist/runtime/lists/filter.js
2246
- var FILTER = "NOT READY";
2689
+ // src/runtime/literals/tuple.ts
2690
+ var tuple = (...values) => {
2691
+ const arr = values.length === 1 ? values[0] : values;
2692
+ return asArray(arr);
2693
+ };
2247
2694
 
2248
- // dist/runtime/lists/createConverter.js
2249
- function createConverter(mapper) {
2250
- return (input) => {
2251
- let result2;
2252
- if (isNothing(input)) {
2253
- result2 = mapper.nothing ? mapper.nothing(input) : Never;
2254
- } else if (isObject(input)) {
2255
- result2 = mapper.object ? mapper.object(input) : Never;
2256
- } else {
2257
- switch (typeof input) {
2258
- case "string":
2259
- result2 = mapper.string ? mapper.string(input) : Never;
2260
- break;
2261
- case "number":
2262
- case "bigint":
2263
- result2 = mapper.number ? mapper.number(input) : Never;
2264
- break;
2265
- case "boolean":
2266
- result2 = mapper.boolean ? mapper.boolean(input) : Never;
2267
- break;
2268
- default:
2269
- throw new Error(`Unhandled type: ${typeof input}`);
2270
- }
2271
- }
2272
- return result2;
2273
- };
2695
+ // src/runtime/literals/capitalize.ts
2696
+ function capitalize(str) {
2697
+ return `${str == null ? void 0 : str.slice(0, 1).toUpperCase()}${str == null ? void 0 : str.slice(1)}`;
2274
2698
  }
2275
2699
 
2276
- // dist/runtime/lists/slice.js
2277
- var slice = (list2, start, end) => {
2278
- return list2.slice(start, end);
2279
- };
2700
+ // src/runtime/literals/uncapitalize.ts
2701
+ function uncapitalize(str) {
2702
+ return `${str == null ? void 0 : str.slice(0, 1).toLowerCase()}${str == null ? void 0 : str.slice(1)}`;
2703
+ }
2280
2704
 
2281
- // dist/runtime/lists/last.js
2282
- var last = (list2) => {
2283
- return [...list2].pop();
2284
- };
2705
+ // src/runtime/literals/uppercase.ts
2706
+ function uppercase(str) {
2707
+ return str.toUpperCase();
2708
+ }
2285
2709
 
2286
- // dist/runtime/lists/reverse.js
2287
- var reverse = (list2) => {
2288
- return [...list2].reverse();
2289
- };
2710
+ // src/runtime/literals/lowercase.ts
2711
+ function lowercase(str) {
2712
+ return str.toLowerCase();
2713
+ }
2290
2714
 
2291
- // dist/runtime/lists/pop.js
2292
- var pop = (list2) => {
2293
- return list2.length > 0 ? [last(list2), slice(list2, 0, -1)] : void 0;
2294
- };
2715
+ // src/runtime/literals/widen.ts
2716
+ function widen(value) {
2717
+ return value;
2718
+ }
2295
2719
 
2296
- // dist/runtime/lists/join.js
2297
- function join(joinWith) {
2298
- return (...tuple3) => {
2299
- return tuple3.join(joinWith);
2300
- };
2720
+ // src/runtime/literals/toCamelCase.ts
2721
+ function toCamelCase(input, preserveWhitespace) {
2722
+ const pascal = preserveWhitespace ? toPascalCase(input, preserveWhitespace) : toPascalCase(input);
2723
+ const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(
2724
+ pascal
2725
+ );
2726
+ const camel = (preserveWhitespace ? preWhite : "") + focus.replace(/^.*?([0-9]*?[a-z|A-Z]{1})/s, (_2, p1) => p1.toLowerCase()) + (preserveWhitespace ? postWhite : "");
2727
+ return camel;
2301
2728
  }
2302
2729
 
2303
- // dist/runtime/lists/shift.js
2304
- var shift = (list2) => {
2305
- return list2.length > 0 ? [list2[0], list2.slice(1)] : void 0;
2306
- };
2730
+ // src/runtime/literals/toKebabCase.ts
2731
+ function toKebabCase(input, _preserveWhitespace) {
2732
+ const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(input);
2733
+ const replaceWhitespace = (i) => i.replace(/\s/gs, "-");
2734
+ const replaceUppercase = (i) => i.replace(/[A-Z]/g, (c) => `-${c[0].toLowerCase()}`);
2735
+ const replaceLeadingDash = (i) => i.replace(/^-/s, "");
2736
+ const replaceTrailingDash = (i) => i.replace(/-$/s, "");
2737
+ const replaceUnderscore = (i) => i.replace(/_/g, "-");
2738
+ const removeDupDashes = (i) => i.replace(/-+/g, "-");
2739
+ return removeDupDashes(`${preWhite}${replaceUnderscore(
2740
+ replaceTrailingDash(
2741
+ replaceLeadingDash(removeDupDashes(replaceWhitespace(replaceUppercase(focus))))
2742
+ )
2743
+ )}${postWhite}`);
2744
+ }
2307
2745
 
2308
- // dist/runtime/meta/youtube-meta.js
2309
- var getYouTubePageType = (url) => {
2310
- return isYouTubeUrl(url) ? isYouTubeVideoUrl(url) && (hasUrlQueryParameter(url, "v") || isYouTubeShareUrl(url)) ? hasUrlQueryParameter(url, "list") ? isYouTubeShareUrl(url) ? hasUrlQueryParameter(url, "t") ? `play::video::in-list::share-link::with-timestamp` : `play::video::in-list::share-link` : `play::video::in-list` : isYouTubeShareUrl(url) ? hasUrlQueryParameter(url, "t") ? `play::video::solo::share-link::with-timestamp` : `play::video::solo::share-link` : `play::video::solo` : isYouTubeCreatorUrl(url) ? getUrlPath(url).includes("/videos") ? "creator::videos" : getUrlPath(url).includes("/playlists") ? "creator::playlists" : last(getUrlPath(url).split("/")).startsWith("@") || getUrlPath(url).includes("/featured") ? "creator::featured" : "creator::other" : isYouTubeFeedUrl(url) ? isYouTubeFeedUrl(url, "history") ? "feed::history" : isYouTubeFeedUrl(url, "playlists") ? "feed::playlists" : isYouTubeFeedUrl(url, "liked") ? "feed::liked" : isYouTubeFeedUrl(url, "subscriptions") ? "feed::subscriptions" : isYouTubeFeedUrl(url, "trending") ? "feed::trending" : "feed::other" : isYouTubeVideosInPlaylist(url) ? "playlist::show" : "other" : Never;
2311
- };
2312
- var youtubeEmbed = (url) => {
2313
- if (hasUrlQueryParameter(url, "v")) {
2314
- const id = getUrlQueryParams(url, "v");
2315
- return `https://www.youtube.com/embed/${id}`;
2316
- } else if (isYouTubeShareUrl(url)) {
2317
- const id = url.split("/").pop();
2318
- if (id) {
2319
- return `https://www.youtube.com/embed/${id}`;
2320
- } else {
2321
- throw new Error(`Unexpected problem parsing share URL -- "${url}" -- into a YouTube embed URL`);
2322
- }
2323
- } else {
2324
- throw new Error(`Unexpected URL structure; unable to convert "${url}" to a YouTube embed URL`);
2746
+ // src/runtime/literals/ifLowercase.ts
2747
+ function ifLowercaseChar(ch, callbackForMatch, callbackForNoMatch) {
2748
+ if (ch.length !== 1) {
2749
+ throw new Error(`call to ifUppercaseChar received ${ch.length} characters but is only valid when one character is passed in!`);
2325
2750
  }
2326
- };
2327
- var youtubeMeta = (url) => {
2328
- return isYouTubeUrl(url) ? {
2329
- url,
2330
- isYouTubeUrl: true,
2331
- isShareUrl: isYouTubeShareUrl(url),
2332
- pageType: getYouTubePageType(url)
2333
- } : {
2334
- url,
2335
- isYouTubeUrl: false
2336
- };
2337
- };
2751
+ return LOWER_ALPHA_CHARS.includes(ch) ? callbackForMatch(ch) : callbackForNoMatch(ch);
2752
+ }
2338
2753
 
2339
- // dist/runtime/meta/urlMeta.js
2340
- var PROTOCOLS = Object.values(NETWORK_PROTOCOL_LOOKUP).flat().filter((i) => i !== "");
2341
- var getUrlProtocol = (url) => {
2342
- const proto = PROTOCOLS.find((p) => url.startsWith(`${p}://`));
2343
- return proto;
2344
- };
2345
- var removeUrlProtocol = (url) => {
2346
- return stripBefore(url, "://");
2347
- };
2348
- var ensurePath = (val) => val === "" ? "" : stripTrailing(ensureLeading(val, "/"), "/");
2349
- var getUrlPath = (url) => {
2350
- return isUrl(url) ? ensurePath(stripAfter(stripBefore(removeUrlProtocol(url), "/"), "?")) : Never;
2351
- };
2352
- var getUrlQueryParams = (url, specific = void 0) => {
2353
- const qp = stripBefore(url, "?");
2354
- if (specific) {
2355
- return qp.includes(`${specific}=`) ? decodeURIComponent(stripAfter(stripBefore(qp, `${specific}=`), "&").replace(/\+/g, "%20")) : void 0;
2754
+ // src/runtime/literals/toSnakeCase.ts
2755
+ function toSnakeCase(input, preserveWhitespace = false) {
2756
+ const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(input);
2757
+ const convertInteriorSpace = (input2) => input2.replace(/\s+/gs, "_");
2758
+ const convertDashes = (input2) => input2.replace(/-/gs, "_");
2759
+ const injectUnderscoreBeforeCaps = (input2) => input2.replace(/([A-Z])/gs, "_$1");
2760
+ const removeLeadingUnderscore = (input2) => input2.startsWith("_") ? input2.slice(1) : input2;
2761
+ return ((preserveWhitespace ? preWhite : "") + removeLeadingUnderscore(
2762
+ injectUnderscoreBeforeCaps(convertDashes(convertInteriorSpace(focus)))
2763
+ ).toLowerCase() + (preserveWhitespace ? postWhite : "")).replace(/__/g, "_");
2764
+ }
2765
+
2766
+ // src/runtime/literals/toString.ts
2767
+ function toString(val) {
2768
+ return String(val);
2769
+ }
2770
+
2771
+ // src/runtime/literals/pluralize.ts
2772
+ var isException = (word) => Object.keys(PLURAL_EXCEPTIONS).includes(word);
2773
+ var endingIn = (word, postfix) => {
2774
+ switch (postfix) {
2775
+ case "is":
2776
+ return word.endsWith(postfix) ? `${word}es` : void 0;
2777
+ case "singular-noun":
2778
+ return SINGULAR_NOUN_ENDINGS.some((i) => word.endsWith(i)) ? split(word).every((i) => [...ALPHA_CHARS].includes(i)) ? `${word}es` : void 0 : void 0;
2779
+ case "f":
2780
+ return word.endsWith("f") ? stripTrailing(word, "f") + "ves" : word.endsWith("fe") ? stripTrailing(word, "fe") + "ves" : void 0;
2781
+ case "y":
2782
+ return word.endsWith("y") ? CONSONANTS.includes(word.slice(-2, 1)) ? stripTrailing(word, "y") + "ies" : void 0 : void 0;
2783
+ default:
2784
+ throw new Error(`endingIn received "${postfix}" as a postfix but this ending is not known!`);
2356
2785
  }
2357
- return qp === "" ? qp : `?${qp}`;
2358
- };
2359
- var getUrlPort = (url) => {
2360
- const candidate = takeNumericCharacters(stripBefore(removeUrlProtocol(url), ":"));
2361
- return candidate === "" ? "default" : Number(candidate);
2362
2786
  };
2363
- var getUrlSource = (url) => {
2364
- const candidate = stripAfter(stripAfter(stripAfter(removeUrlProtocol(url), "/"), "?"), ":");
2365
- return isIpAddress(candidate) || isDomainName(candidate) ? candidate : Never;
2366
- };
2367
- var urlMeta = (url) => {
2368
- return {
2369
- url,
2370
- isUrl: isUrl(url),
2371
- protocol: getUrlProtocol(url),
2372
- path: getUrlPath(url),
2373
- queryParameters: getUrlQueryParams(url),
2374
- port: getUrlPort(url),
2375
- source: getUrlSource(url),
2376
- isIpAddress: isIpAddress(getUrlSource(url)),
2377
- isIp4Address: isIp4Address(getUrlSource(url)),
2378
- isIp6Address: isIp6Address(getUrlSource(url))
2379
- };
2787
+ var pluralize = (word) => {
2788
+ const result2 = isException(word) ? PLURAL_EXCEPTIONS[word] : endingIn(word, "is") || endingIn(word, "singular-noun") || endingIn(word, "f") || endingIn(word, "y") || `${word}s`;
2789
+ return result2;
2380
2790
  };
2381
2791
 
2382
- // dist/runtime/runtime-types/shape-helpers/addToken.js
2383
- var addToken = (token, ...params) => `<<${token}${params.length > 0 ? `::${params.join("::")}` : ""}>>`;
2792
+ // src/runtime/literals/retainAfter.ts
2793
+ function retainAfter(content, find2) {
2794
+ const parts = content.split(find2);
2795
+ parts.shift();
2796
+ return parts.join(find2);
2797
+ }
2384
2798
 
2385
- // dist/runtime/runtime-types/shape-helpers/atomics.js
2386
- var boolean = (literal2) => isDefined(literal2) ? isTrue(literal2) ? addToken("true") : isFalse(literal2) ? addToken("false") : addToken("boolean") : addToken("boolean");
2387
- var unknown = () => "<<unknown>>";
2388
- var undefinedType = () => "<<undefined>>";
2389
- var nullType = () => "<<null>>";
2799
+ // src/runtime/literals/surround.ts
2800
+ function surround(prefix, postfix) {
2801
+ return (input) => `${prefix}${input}${postfix}`;
2802
+ }
2390
2803
 
2391
- // dist/runtime/runtime-types/shape-helpers/singletons.js
2392
- var addSingleton = (token, api) => (...literals) => {
2393
- return literals.length === 0 ? api ? api : addToken(token) : literals.length === 1 ? addToken(token, literals[0]) : addToken("union", literals.map((l) => addToken(token, `${l}`)).join(","));
2394
- };
2395
- var stringApi = {
2396
- zip: () => addToken("string-set", "Zip5"),
2397
- zipPlus4: () => addToken("string-set", "Zip5_4"),
2398
- zipCode: () => addToken("string-set", "ZipCode"),
2399
- militaryTime: (resolution) => {
2400
- return addToken("string-set", "militaryTime", resolution || "HH:MM");
2401
- },
2402
- civilianTime: (resolution) => {
2403
- return addToken("string-set", "militaryTime", resolution || "HH:MM");
2404
- },
2405
- numericString: () => addToken("string-set", "numeric"),
2406
- ipv4Address: () => addToken("string-set", "ipv4Address"),
2407
- ipv6Address: () => addToken("string-set", "ipv6Address"),
2408
- done: () => addToken("string")
2409
- };
2410
- var string = addSingleton("string", stringApi);
2411
- var number = addSingleton("number");
2804
+ // src/runtime/literals/stripAfter.ts
2805
+ function stripAfter(content, find2) {
2806
+ return content.split(find2).shift();
2807
+ }
2412
2808
 
2413
- // dist/runtime/runtime-types/shape-helpers/functions.js
2414
- var fn = (..._args) => ({
2415
- returns: (_rtn) => ({
2416
- addProperties: (_kv) => {
2417
- return null;
2418
- },
2419
- done: () => {
2420
- return null;
2421
- }
2422
- }),
2423
- done: () => {
2424
- const result2 = null;
2425
- return result2;
2426
- }
2427
- });
2809
+ // src/runtime/literals/stripBefore.ts
2810
+ function stripBefore(content, find2) {
2811
+ return content.split(find2).slice(1).join(find2);
2812
+ }
2428
2813
 
2429
- // dist/runtime/runtime-types/shape-helpers/literal-containers.js
2430
- var dictionary = (_obj) => {
2431
- return null;
2432
- };
2433
- var tuple2 = (..._elements) => {
2434
- return null;
2814
+ // src/runtime/literals/stripSurround.ts
2815
+ var stripSurround = (...chars) => {
2816
+ return (input) => {
2817
+ let output = String(input);
2818
+ for (const s of chars) {
2819
+ if (output.startsWith(String(s))) {
2820
+ output = output.slice(String(s).length);
2821
+ }
2822
+ if (output.endsWith(String(s))) {
2823
+ output = output.slice(0, -1 * String(s).length);
2824
+ }
2825
+ }
2826
+ return isNumber(input) ? Number(output) : output;
2827
+ };
2435
2828
  };
2436
2829
 
2437
- // dist/runtime/runtime-types/shape-helpers/wide-containers.js
2438
- var record = (_key, _value) => {
2439
- return null;
2440
- };
2441
- var array = (_type) => {
2442
- return null;
2443
- };
2444
- var set = (_type) => {
2445
- return null;
2446
- };
2447
- var map = (_key, _value) => {
2448
- return null;
2449
- };
2450
- var weakMap = (_key, _value) => {
2451
- return null;
2830
+ // src/runtime/literals/stripUntil.ts
2831
+ var stripUntil = (content, ...until) => {
2832
+ const stopIdx = asChars(content).findIndex((c) => until.includes(c));
2833
+ return content.slice(stopIdx);
2452
2834
  };
2453
2835
 
2454
- // dist/runtime/runtime-types/shape-helpers/union.js
2455
- var union2 = (...elements) => {
2456
- const result2 = elements.map((_el) => {
2457
- });
2458
- return result2;
2459
- };
2836
+ // src/runtime/literals/trim.ts
2837
+ function trim(input) {
2838
+ return input.trim();
2839
+ }
2840
+ function trimLeft(input) {
2841
+ return input.trimStart();
2842
+ }
2843
+ function trimStart(input) {
2844
+ return input.trimStart();
2845
+ }
2846
+ function trimRight(input) {
2847
+ return input.trimEnd();
2848
+ }
2849
+ function trimEnd(input) {
2850
+ return input.trimEnd();
2851
+ }
2460
2852
 
2461
- // dist/runtime/runtime-types/shape.js
2462
- var isAddOrDone = (val) => {
2463
- return isObject(val) && hasKeys("add", "done") && typeof val.done === "function" && typeof val.add === "function";
2464
- };
2465
- var ShapeApiImplementation = {
2466
- string,
2467
- number,
2468
- boolean,
2469
- unknown,
2470
- undefined: undefinedType,
2471
- null: nullType,
2472
- union: union2,
2473
- fn,
2474
- record,
2475
- array,
2476
- set,
2477
- map,
2478
- weakMap,
2479
- dictionary,
2480
- tuple: tuple2
2481
- };
2482
- var shape = (cb2) => {
2483
- const rtn = cb2(ShapeApiImplementation);
2484
- return handleDoneFn(isAddOrDone(rtn) ? rtn.done() : rtn);
2485
- };
2486
- var isShape = (v) => {
2487
- return isString(v) && v.startsWith("<<") && v.endsWith(">>") && SHAPE_PREFIXES.some((i) => v.startsWith(`<<${i}`)) ? true : false;
2488
- };
2853
+ // src/runtime/literals/toPascalCase.ts
2854
+ function toPascalCase(input, preserveWhitespace = void 0) {
2855
+ const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(
2856
+ input
2857
+ );
2858
+ const convertInteriorToCap = (i) => i.replace(/[ |_|-]+([0-9]*?[a-z|A-Z]{1})/gs, (_2, p1) => p1.toUpperCase());
2859
+ const startingToCap = (i) => i.replace(/^[_|-]*?([0-9]*?[a-z]{1})/gs, (_2, p1) => p1.toUpperCase());
2860
+ const replaceLeadingTrash = (i) => i.replace(/^[-_]/s, "");
2861
+ const replaceTrailingTrash = (i) => i.replace(/[-_]$/s, "");
2862
+ const pascal = `${preserveWhitespace ? preWhite : ""}${capitalize(
2863
+ replaceTrailingTrash(replaceLeadingTrash(convertInteriorToCap(startingToCap(focus))))
2864
+ )}${preserveWhitespace ? postWhite : ""}`;
2865
+ return pascal;
2866
+ }
2489
2867
 
2490
- // dist/runtime/runtime-types/choices.js
2491
- var choices = "NOT READY";
2868
+ // src/runtime/literals/toUppercase.ts
2869
+ function toUppercase(str) {
2870
+ return str.split("").map((i) => ifLowercaseChar(i, (v) => capitalize(v), (v) => v)).join("");
2871
+ }
2492
2872
 
2493
- // dist/runtime/runtime-types/list.js
2494
- var createProxy = (...initialize) => {
2495
- const state = initialize;
2496
- state.id = null;
2497
- const proxy = new Proxy(state, {});
2498
- Object.defineProperty(proxy, "id", {
2499
- enumerable: false
2500
- });
2501
- return proxy;
2502
- };
2503
- var list = (...init) => {
2504
- return init.length === 1 && isArray(init[0]) ? createProxy(...init[0]) : createProxy(...init);
2873
+ // src/runtime/literals/toNumericArray.ts
2874
+ var toNumericArray = (arr) => {
2875
+ return arr.map((i) => Number(i));
2505
2876
  };
2506
2877
 
2507
- // dist/runtime/runtime-types/dict.js
2508
- var process = (obj, _narrow, _opt) => {
2509
- return Object.defineProperty(obj, "__id", { enumerable: false });
2878
+ // src/runtime/literals/truncate.ts
2879
+ var truncate = (content, maxLength, ellipsis = false) => {
2880
+ const overLimit = content.length > maxLength;
2881
+ return overLimit ? ellipsis ? `${content.slice(0, maxLength)}${typeof ellipsis === "string" ? ellipsis : "..."}` : content.slice(0, maxLength) : content;
2510
2882
  };
2511
- var dict = (obj, ...props) => process(obj, (props || []).filter((i) => !i.startsWith("opt:")), (props || []).filter((i) => i.startsWith("opt:")));
2512
2883
 
2513
- // dist/runtime/runtime-types/ip6Prefix.js
2514
- var ip6Prefix = (...groups) => {
2515
- const empty = addToken("string");
2516
- let count = 4 - groups.length;
2517
- let fillIn = [];
2518
- for (let index = 0; index < count; index++) {
2519
- fillIn.push(empty);
2520
- }
2521
- return [
2522
- "<<string::",
2523
- [
2524
- groups.join(":"),
2525
- fillIn.join(":")
2526
- ].join(":"),
2527
- ">>"
2528
- ].join("");
2884
+ // src/runtime/literals/takeNumericCharacters.ts
2885
+ var takeNumericCharacters = (content) => {
2886
+ let nonNumericIdx = asChars(content).findIndex((i) => !NUMERIC_CHAR.includes(i));
2887
+ return content.slice(0, nonNumericIdx);
2529
2888
  };
2530
2889
 
2531
- // dist/runtime/runtime-types/shape-helpers/getTokenName.js
2532
- var getTokenName = (token) => {
2533
- const [name, ..._rest] = stripLeading(token, "<<").split("::");
2534
- return name;
2890
+ // src/runtime/literals/retainChars.ts
2891
+ var retainChars = (content, ...retain2) => {
2892
+ let chars = asChars(content);
2893
+ return chars.filter((c) => retain2.includes(c)).join("");
2535
2894
  };
2536
2895
 
2537
- // dist/runtime/runtime-types/shape-helpers/getTokenData.js
2538
- var getTokenData = (token) => {
2539
- const [_name, ...rest] = stripTrailing(token, ">>").split("::");
2540
- return rest;
2896
+ // src/runtime/literals/stripChars.ts
2897
+ var stripChars = (content, ...strip) => {
2898
+ let chars = asChars(content);
2899
+ return chars.filter((c) => !strip.includes(c)).join("");
2541
2900
  };
2542
2901
 
2543
- // dist/runtime/runtime-types/parse.js
2544
- var handleTypeToken = (token) => () => {
2545
- return {
2546
- isToken: true,
2547
- type: null,
2548
- token,
2549
- tokenName: getTokenName(token),
2550
- tokenData: getTokenData(token)
2551
- };
2552
- };
2553
- var parse = (value) => {
2554
- return isShape(value) ? handleTypeToken(value)() : {
2555
- isToken: false,
2556
- type: value
2557
- };
2902
+ // src/runtime/literals/retainWhile.ts
2903
+ var retainWhile = (content, ...retain2) => {
2904
+ const stopIdx = asChars(content).findIndex((c) => !retain2.includes(c));
2905
+ return content.slice(0, stopIdx);
2558
2906
  };
2559
2907
 
2560
- // dist/runtime/type-guards/isArray.js
2561
- function isArray(value) {
2562
- return Array.isArray(value) === true;
2563
- }
2564
-
2565
- // dist/runtime/sets/uniqueKeys.js
2566
- var uniqueKeys = (left, right) => {
2567
- const isNumeric = isArray(left) && isArray(right) ? true : false;
2568
- if (isArray(left) && !isArray(right) || isArray(right) && !isArray(left)) {
2569
- throw new Error("uniqueKeys(l,r) given invalid comparison; both left and right values should be an object or an array but not one of each!");
2570
- }
2571
- const l = isNumeric ? Object.keys(left).map((i) => Number(i)) : Object.keys(left);
2572
- const r = isNumeric ? Object.keys(right).map((i) => Number(i)) : Object.keys(right);
2573
- if (isNumeric) {
2574
- throw new Error("uniqueKeys does not yet work with tuples");
2575
- }
2576
- const leftKeys = l.filter((i) => !r.includes(i));
2577
- const rightKeys = r.filter((i) => !l.includes(i));
2578
- return [
2579
- "LeftRight",
2580
- leftKeys,
2581
- rightKeys
2582
- ];
2908
+ // src/runtime/literals/phone/getPhoneCountryCode.ts
2909
+ var getPhoneCountryCode = (phone) => {
2910
+ return phone.trim().startsWith("+") || phone.trim().startsWith("00") ? retainWhile(
2911
+ stripLeading(stripLeading(phone.trim(), "+"), "00"),
2912
+ ...NUMERIC_CHAR
2913
+ ) : "";
2583
2914
  };
2584
2915
 
2585
- // dist/runtime/type-guards/isDefined.js
2586
- function isDefined(value) {
2587
- return typeof value === "undefined" ? false : true;
2588
- }
2589
-
2590
- // dist/runtime/type-guards/isFalsy.js
2591
- var isFalsy = (val) => {
2592
- return FALSY_VALUES.includes(val);
2916
+ // src/runtime/literals/phone/removePhoneCountryCode.ts
2917
+ var removePhoneCountryCode = (phone) => {
2918
+ const countryCode = getPhoneCountryCode(phone);
2919
+ return countryCode !== "" ? stripLeading(stripLeading(
2920
+ phone.trim(),
2921
+ "+",
2922
+ "00"
2923
+ ), countryCode).trim() : phone.trim();
2593
2924
  };
2594
2925
 
2595
- // dist/runtime/type-guards/isNull.js
2596
- function isNull(value) {
2597
- return value === null ? true : false;
2598
- }
2926
+ // src/runtime/literals/phone/asPhoneNumber.ts
2927
+ var asPhoneFormat = () => `NOT IMPLEMENTED`;
2599
2928
 
2600
- // dist/runtime/type-guards/isNotNull.js
2601
- function isNotNull(value) {
2602
- return value === null ? true : false;
2603
- }
2604
-
2605
- // dist/runtime/type-guards/isTruthy.js
2606
- var isTruthy = (val) => {
2607
- return !FALSY_VALUES.includes(val);
2929
+ // src/runtime/errors/kindedError.ts
2930
+ var kindError = (kind, _defineContext) => (msg, context) => {
2931
+ const err = new Error(msg);
2932
+ err.name = toPascalCase(kind);
2933
+ err.kind = toKebabCase(kind);
2934
+ err.__kind = "KindError";
2935
+ err.context = context;
2936
+ return err;
2608
2937
  };
2609
2938
 
2610
- // dist/runtime/type-guards/isTypeTuple.js
2611
- function isTypeTuple(value) {
2612
- return Array.isArray(value) && value.length === 3 && typeof value[1] === "function";
2613
- }
2614
-
2615
- // dist/runtime/type-guards/isBoolean.js
2616
- function isBoolean(value) {
2617
- return typeof value === "boolean";
2618
- }
2619
-
2620
- // dist/runtime/type-guards/isString.js
2621
- function isString(value) {
2622
- return typeof value === "string";
2623
- }
2624
-
2625
- // dist/runtime/type-guards/isIndexable.js
2626
- function isIndexable(value) {
2627
- return Array.isArray(value) || typeof value === "object" && keysOf(value).length > 0 ? true : false;
2628
- }
2939
+ // src/runtime/functional/result.ts
2940
+ var result = "NOT READY";
2629
2941
 
2630
- // dist/runtime/type-guards/isObject.js
2631
- function isObject(value) {
2632
- return typeof value === "object" && value !== null && Array.isArray(value) === false;
2633
- }
2942
+ // src/runtime/functions/fnMeta.ts
2943
+ var fnMeta = (func) => {
2944
+ const fn2 = (...args) => func(...args);
2945
+ const props = Object.keys(fn2).reduce(
2946
+ (acc, key) => ({ ...acc, [key]: fn2[key] }),
2947
+ {}
2948
+ );
2949
+ return {
2950
+ fn: fn2,
2951
+ props
2952
+ };
2953
+ };
2634
2954
 
2635
- // dist/runtime/type-guards/isTrue.js
2636
- function isTrue(value) {
2637
- return value === true;
2638
- }
2955
+ // src/runtime/functions/wrapFn.ts
2956
+ var wrapFn = "NOT IMPLEMENTED";
2639
2957
 
2640
- // dist/runtime/type-guards/isConstant.js
2641
- function isConstant(value) {
2642
- return isObject(value) && "_type" in value && "kind" in value && value._type === "Constant" ? true : false;
2643
- }
2958
+ // src/runtime/initializers/addFnToProps.ts
2959
+ var addPropsToFn = (fn2, clone_fn) => {
2960
+ const localFn = clone_fn ? (...args) => fn2(args) : fn2;
2961
+ return (obj) => {
2962
+ for (const k in obj) {
2963
+ localFn[k] = obj[k];
2964
+ }
2965
+ return localFn;
2966
+ };
2967
+ };
2644
2968
 
2645
- // dist/runtime/type-guards/isNever.js
2646
- var isNever = (val) => {
2647
- return isConstant(val) && val.kind === "never";
2969
+ // src/runtime/initializers/addPropsToFn.ts
2970
+ var addFnToProps = (props, _clone_fn) => (fn2) => {
2971
+ const localFn = (...args) => fn2(args);
2972
+ for (const k in props) {
2973
+ localFn[k] = props[k];
2974
+ }
2975
+ return localFn;
2648
2976
  };
2649
2977
 
2650
- // dist/runtime/type-guards/isContainer.js
2651
- function isContainer(value) {
2652
- return Array.isArray(value) || isObject(value) ? true : false;
2653
- }
2978
+ // src/runtime/initializers/createFnWithProps.ts
2979
+ var createFnWithProps = (fn2, props, narrowing = false) => {
2980
+ const fnWithProps = fn2;
2981
+ for (const prop of keysOf(props)) {
2982
+ fnWithProps[prop] = props[prop];
2983
+ }
2984
+ return isTrue(narrowing) ? fnWithProps : fnWithProps;
2985
+ };
2654
2986
 
2655
- // dist/runtime/type-guards/isSpecificConstant.js
2656
- function isSpecificConstant(kind) {
2657
- return (value) => {
2658
- return isConstant(value) && value.kind === kind ? true : false;
2987
+ // src/runtime/initializers/defineObj.ts
2988
+ function defineObj(literal2 = {}) {
2989
+ return (wide2 = {}) => {
2990
+ const obj = literal2 ? { ...literal2, ...wide2 } : wide2;
2991
+ return obj;
2659
2992
  };
2660
2993
  }
2661
2994
 
2662
- // dist/runtime/type-guards/isReadonlyArray.js
2663
- function isReadonlyArray(value) {
2664
- return Array.isArray(value) === true;
2665
- }
2995
+ // src/runtime/initializers/defineTuple.ts
2996
+ var defineTuple = (...values) => {
2997
+ return values.map(
2998
+ (i) => isFunction(i) ? handleDoneFn(i(ShapeApiImplementation)) : i
2999
+ );
3000
+ };
2666
3001
 
2667
- // dist/runtime/type-guards/hasIndexOf.js
2668
- var hasIndexOf = (value, idx) => {
2669
- const result2 = isObject(value) ? String(idx) in value : Array.isArray(value) ? Number(idx) in value : false;
2670
- return isErrorCondition(result2, "invalid-index") ? false : result2;
3002
+ // src/runtime/lists/asArray.ts
3003
+ var asArray = (thing) => {
3004
+ return Array.isArray(thing) === true ? (
3005
+ // proxy thing back as it's already an array
3006
+ thing
3007
+ ) : typeof thing === "undefined" ? [] : [thing];
2671
3008
  };
2672
3009
 
2673
- // dist/runtime/type-guards/isRef.js
2674
- function isRef(value) {
2675
- return isObject(value) && "value" in value && Array.from(Object.keys(value)).includes("_value");
3010
+ // src/runtime/lists/getEach.ts
3011
+ function getEach(list2, dotPath) {
3012
+ const result2 = list2.map(
3013
+ (i) => isNull(dotPath) ? i : isContainer(i) ? get(i, dotPath) : Never
3014
+ ).filter((i) => !isErrorCondition(i));
3015
+ return result2;
2676
3016
  }
2677
3017
 
2678
- // dist/runtime/type-guards/isFalse.js
2679
- function isFalse(i) {
2680
- return typeof i === "boolean" && !i;
3018
+ // src/runtime/lists/indexOf.ts
3019
+ function indexOf(val, index) {
3020
+ const isNegative = isNumber(index) && index < 0;
3021
+ if (isNegative && !Array.isArray(val)) {
3022
+ throw new Error(`The indexOf(val,idx) utility received a negative index value [${index}] but the value being de-references is not an array [${typeof val}]!`);
3023
+ }
3024
+ if (isNegative && Array.isArray(val) && val.length < Math.abs(index)) {
3025
+ throw new Error(`The indexOf(val,idx) utility received a negative index of ${index} but the length of the array passed in is only ${val.length}! This is not allowed.`);
3026
+ }
3027
+ const idx = isNegative && Array.isArray(val) ? val.length + 1 - Math.abs(index) : index;
3028
+ return index === null ? val : isNull(idx) ? val : isArray(val) ? Number(idx) in val ? val[Number(idx)] : errCondition("invalid-index", `attempt to index a numeric array with an invalid index: ${Number(idx)}`) : isObject(val) ? String(idx) in val ? val[String(idx)] : errCondition("invalid-index", `attempt to index a dictionary object with an invalid index: ${String(idx)}`) : errCondition("invalid-container-type", `Attempt to use indexOf() on an invalid container type: ${typeof val}`);
2681
3029
  }
2682
3030
 
2683
- // dist/runtime/type-guards/hasDefaultValue.js
2684
- function hasDefaultValue(value) {
2685
- const noDefault = isSpecificConstant("no-default-value");
2686
- return noDefault(value) ? false : true;
3031
+ // src/runtime/lists/intersection.ts
3032
+ function intersectWithOffset(a, b, deref) {
3033
+ const aIndexable = a.every((i) => isIndexable(i));
3034
+ const bIndexable = b.every((i) => isIndexable(i));
3035
+ if (!aIndexable || !bIndexable) {
3036
+ if (!aIndexable) {
3037
+ throw new Error(`The "a" array passed into intersect(a,b) was not fully composed of indexable properties: ${a.map((i) => typeof i).join(", ")}`);
3038
+ } else {
3039
+ throw new Error(`The "b" array passed into intersect(a,b) was not fully composed of indexable properties: ${b.map((i) => typeof i).join(", ")}`);
3040
+ }
3041
+ }
3042
+ const aMatches = getEach(a, deref);
3043
+ const bMatches = getEach(b, deref);
3044
+ const sharedKeys2 = ifNotNull(
3045
+ deref,
3046
+ (v) => [
3047
+ a.filter((i) => Array.from(bMatches).includes(get(i, v))),
3048
+ b.filter((i) => Array.from(aMatches).includes(get(i, v)))
3049
+ ],
3050
+ () => a.filter((k) => b.includes(k))
3051
+ );
3052
+ return sharedKeys2;
2687
3053
  }
2688
-
2689
- // dist/runtime/type-guards/isNumericString.js
2690
- function isNumericString(value) {
2691
- const validChars = [...NUMERIC_CHAR, "x", "E"];
2692
- return typeof value === "string" && split(value).every((i) => validChars.includes(i));
3054
+ function intersectNoOffset(a, b) {
3055
+ return a.length < b.length ? a.filter((val) => b.includes(val)) : b.filter((val) => a.includes(val));
2693
3056
  }
3057
+ var intersection = (a, b, deref = null) => {
3058
+ return deref === null ? intersectNoOffset(a, b) : intersectWithOffset(a, b, deref);
3059
+ };
2694
3060
 
2695
- // dist/runtime/type-guards/isFnWithParams.js
2696
- function isFnWithParams(input) {
2697
- var _a;
2698
- return typeof input === "function" && ((_a = Object.keys(input)) == null ? void 0 : _a.length) > 0;
2699
- }
3061
+ // src/runtime/lists/unique.ts
3062
+ var unique = (...values) => {
3063
+ const u = [];
3064
+ for (const i of values.flat()) {
3065
+ if (!u.includes(i)) {
3066
+ u.push(i);
3067
+ }
3068
+ }
3069
+ return u;
3070
+ };
2700
3071
 
2701
- // dist/runtime/type-guards/isFunction.js
2702
- function isFunction(value) {
2703
- return typeof value === "function" ? true : false;
3072
+ // src/runtime/lists/logicalReturns.ts
3073
+ function logicalReturns(conditions) {
3074
+ return conditions.map(
3075
+ (c) => isBoolean(c) ? c : isFunction(c) ? c() : Never
3076
+ );
2704
3077
  }
2705
3078
 
2706
- // dist/runtime/type-guards/isNumber.js
2707
- function isNumber(value) {
2708
- return typeof value === "number";
2709
- }
3079
+ // src/runtime/lists/find.ts
3080
+ var find = (list2, deref = null) => (comparator) => {
3081
+ return list2.find((i) => {
3082
+ const val = deref ? isContainer(i) ? deref in i ? i[deref] : void 0 : i : i;
3083
+ return val === comparator;
3084
+ });
3085
+ };
2710
3086
 
2711
- // dist/runtime/type-guards/isNothing.js
2712
- function isNothing(val) {
2713
- return val === null || val === void 0 ? true : false;
2714
- }
3087
+ // src/runtime/lists/filter.ts
3088
+ var filter = "NOT READY";
2715
3089
 
2716
- // dist/runtime/type-guards/isSymbol.js
2717
- function isSymbol(value) {
2718
- return typeof value === "symbol";
3090
+ // src/runtime/lists/createConverter.ts
3091
+ function createConverter(mapper) {
3092
+ return (input) => {
3093
+ let result2;
3094
+ if (isNothing(input)) {
3095
+ result2 = mapper.nothing ? mapper.nothing(input) : Never;
3096
+ } else if (isObject(input)) {
3097
+ result2 = mapper.object ? mapper.object(input) : Never;
3098
+ } else {
3099
+ switch (typeof input) {
3100
+ case "string":
3101
+ result2 = mapper.string ? mapper.string(input) : Never;
3102
+ break;
3103
+ case "number":
3104
+ case "bigint":
3105
+ result2 = mapper.number ? mapper.number(input) : Never;
3106
+ break;
3107
+ case "boolean":
3108
+ result2 = mapper.boolean ? mapper.boolean(input) : Never;
3109
+ break;
3110
+ default:
3111
+ throw new Error(`Unhandled type: ${typeof input}`);
3112
+ }
3113
+ }
3114
+ return result2;
3115
+ };
2719
3116
  }
2720
3117
 
2721
- // dist/runtime/type-guards/isScalar.js
2722
- function isScalar(value) {
2723
- return isString(value) || isNumber(value) || isSymbol(value) || isNull(value);
2724
- }
3118
+ // src/runtime/lists/slice.ts
3119
+ var slice = (list2, start, end) => {
3120
+ return list2.slice(start, end);
3121
+ };
2725
3122
 
2726
- // dist/runtime/type-guards/isTypeToken.js
2727
- function isTypeToken(val) {
2728
- if (isString(val) && startsWith("<<")(val) && endsWith(">>")(val)) {
2729
- return true;
2730
- } else {
2731
- return false;
2732
- }
2733
- }
3123
+ // src/runtime/lists/last.ts
3124
+ var last = (list2) => {
3125
+ return [...list2].pop();
3126
+ };
2734
3127
 
2735
- // dist/runtime/type-guards/isErrorCondition.js
2736
- function isErrorCondition(value, kind = null) {
2737
- return isObject(value) && "__kind" in value && value.__kind === "ErrorCondition" && "kind" in value ? kind !== null ? value["kind"] === kind : true : false;
3128
+ // src/runtime/lists/reverse.ts
3129
+ var reverse = (list2) => {
3130
+ return [...list2].reverse();
3131
+ };
3132
+
3133
+ // src/runtime/lists/join.ts
3134
+ function joinWith(joinWith2) {
3135
+ return (...tuple3) => {
3136
+ const tup = tuple3;
3137
+ return tup.join(joinWith2);
3138
+ };
2738
3139
  }
2739
3140
 
2740
- // dist/runtime/type-guards/hasKeys.js
2741
- var hasKeys = (...props) => (
2742
- /**
2743
- * Type guard which validates whether the configured properties
2744
- * exist on a given `Record<ObjectKey, unknown` and if they do at
2745
- * runtime will provide the type support for them.
2746
- */
2747
- (val) => {
2748
- const keys = Array.isArray(props) ? props : Object.keys(props).filter((i) => typeof i === "string");
2749
- return (isFunction(val) || isObject(val)) && keys.every((k) => k in val) ? true : false;
3141
+ // src/runtime/lists/shift.ts
3142
+ var shift = (list2) => {
3143
+ let rtn;
3144
+ if (isDefined(list2)) {
3145
+ rtn = list2.length === 0 ? void 0 : list2[0];
3146
+ try {
3147
+ list2 = list2.slice(1);
3148
+ } catch {
3149
+ }
3150
+ } else {
3151
+ rtn = void 0;
2750
3152
  }
2751
- );
2752
-
2753
- // dist/runtime/type-guards/isDoneFn.js
2754
- var isDoneFn = (val) => {
2755
- return hasKeys("done")(val) && typeof val.done === "function";
3153
+ return rtn;
2756
3154
  };
2757
3155
 
2758
- // dist/runtime/type-guards/isUrl.js
2759
- var isUri = (val, ...protocols) => {
2760
- const p = protocols.length === 0 ? valuesOf(NETWORK_PROTOCOL_LOOKUP).flat().filter((i) => i) : protocols;
2761
- return isString(val) && p.some((i) => val.startsWith(`${i}://`));
3156
+ // src/runtime/meta/youtube-meta.ts
3157
+ var getYouTubePageType = (url) => {
3158
+ return isYouTubeUrl(url) ? isYouTubeVideoUrl(url) && (hasUrlQueryParameter(url, "v") || isYouTubeShareUrl(url)) ? hasUrlQueryParameter(url, "list") ? isYouTubeShareUrl(url) ? hasUrlQueryParameter(url, "t") ? `play::video::in-list::share-link::with-timestamp` : `play::video::in-list::share-link` : `play::video::in-list` : isYouTubeShareUrl(url) ? hasUrlQueryParameter(url, "t") ? `play::video::solo::share-link::with-timestamp` : `play::video::solo::share-link` : `play::video::solo` : isYouTubeCreatorUrl(url) ? getUrlPath(url).includes("/videos") ? "creator::videos" : getUrlPath(url).includes("/playlists") ? "creator::playlists" : last(getUrlPath(url).split("/")).startsWith("@") || getUrlPath(url).includes("/featured") ? "creator::featured" : "creator::other" : isYouTubeFeedUrl(url) ? isYouTubeFeedUrl(url, "history") ? "feed::history" : isYouTubeFeedUrl(url, "playlists") ? "feed::playlists" : isYouTubeFeedUrl(url, "liked") ? "feed::liked" : isYouTubeFeedUrl(url, "subscriptions") ? "feed::subscriptions" : isYouTubeFeedUrl(url, "trending") ? "feed::trending" : "feed::other" : isYouTubeVideosInPlaylist(url) ? "playlist::show" : "other" : Never;
2762
3159
  };
2763
- var isUrl = (val, ...protocols) => {
2764
- const p = protocols.length === 0 ? ["http", "https"] : protocols;
2765
- return isString(val) && p.some((i) => val.startsWith(`${i}://`));
3160
+ var youtubeEmbed = (url) => {
3161
+ if (hasUrlQueryParameter(url, "v")) {
3162
+ const id = getUrlQueryParams(url, "v");
3163
+ return `https://www.youtube.com/embed/${id}`;
3164
+ } else if (isYouTubeShareUrl(url)) {
3165
+ const id = url.split("/").pop();
3166
+ if (id) {
3167
+ return `https://www.youtube.com/embed/${id}`;
3168
+ } else {
3169
+ throw new Error(`Unexpected problem parsing share URL -- "${url}" -- into a YouTube embed URL`);
3170
+ }
3171
+ } else {
3172
+ throw new Error(`Unexpected URL structure; unable to convert "${url}" to a YouTube embed URL`);
3173
+ }
3174
+ };
3175
+ var youtubeMeta = (url) => {
3176
+ return isYouTubeUrl(url) ? {
3177
+ url,
3178
+ isYouTubeUrl: true,
3179
+ isShareUrl: isYouTubeShareUrl(url),
3180
+ pageType: getYouTubePageType(url)
3181
+ } : {
3182
+ url,
3183
+ isYouTubeUrl: false
3184
+ };
2766
3185
  };
2767
3186
 
2768
- // dist/runtime/type-guards/isCssAspectRatio.js
2769
- var tokens = [
2770
- "1",
2771
- "inherit",
2772
- "initial",
2773
- "revert",
2774
- "revert-layer",
2775
- "unset",
2776
- "auto"
2777
- ];
2778
- var isRatio = (val) => /[0-9]{1,4}\s*\/\s*[0-9]{1,4}/.test(val);
2779
- var isCssAspectRatio = (val) => {
2780
- return isString(val) && val.split(/\s+/).every((i) => tokens.includes(i) || isRatio(i));
3187
+ // src/runtime/meta/urlMeta.ts
3188
+ var PROTOCOLS = Object.values(NETWORK_PROTOCOL_LOOKUP).flat().filter((i) => i !== "");
3189
+ var getUrlProtocol = (url) => {
3190
+ const proto = PROTOCOLS.find((p) => url.startsWith(`${p}://`));
3191
+ return proto;
3192
+ };
3193
+ var removeUrlProtocol = (url) => {
3194
+ return stripBefore(url, "://");
3195
+ };
3196
+ var ensurePath = (val) => {
3197
+ const val2 = ensureLeading(val, "/");
3198
+ return val === "" ? "" : stripTrailing(val2, "/");
3199
+ };
3200
+ var getUrlPath = (url) => {
3201
+ return isUrl(url) ? ensurePath(
3202
+ stripAfter(stripBefore(removeUrlProtocol(url), "/"), "?")
3203
+ ) : Never;
3204
+ };
3205
+ var getUrlQueryParams = (url, specific = void 0) => {
3206
+ const qp = stripBefore(url, "?");
3207
+ if (specific) {
3208
+ return qp.includes(`${specific}=`) ? decodeURIComponent(
3209
+ stripAfter(
3210
+ stripBefore(qp, `${specific}=`),
3211
+ "&"
3212
+ ).replace(/\+/g, "%20")
3213
+ ) : void 0;
3214
+ }
3215
+ return qp === "" ? qp : `?${qp}`;
3216
+ };
3217
+ var getUrlPort = (url) => {
3218
+ const candidate = takeNumericCharacters(
3219
+ stripBefore(removeUrlProtocol(url), ":")
3220
+ );
3221
+ return candidate === "" ? "default" : Number(candidate);
3222
+ };
3223
+ var getUrlSource = (url) => {
3224
+ const candidate = stripAfter(stripAfter(stripAfter(removeUrlProtocol(url), "/"), "?"), ":");
3225
+ return isIpAddress(candidate) || isDomainName(candidate) ? candidate : Never;
3226
+ };
3227
+ var urlMeta = (url) => {
3228
+ return {
3229
+ url,
3230
+ isUrl: isUrl(url),
3231
+ protocol: getUrlProtocol(url),
3232
+ path: getUrlPath(url),
3233
+ queryParameters: getUrlQueryParams(url),
3234
+ port: getUrlPort(url),
3235
+ source: getUrlSource(url),
3236
+ isIpAddress: isIpAddress(getUrlSource(url)),
3237
+ isIp4Address: isIp4Address(getUrlSource(url)),
3238
+ isIp6Address: isIp6Address(getUrlSource(url))
3239
+ };
2781
3240
  };
2782
3241
 
2783
- // dist/runtime/type-guards/isInlineSvg.js
2784
- var isInlineSvg = (v) => {
2785
- return isString(v) && v.trim().startsWith(`<svg`) && v.trim().endsWith(`</svg>`);
3242
+ // src/runtime/queues/fifo.ts
3243
+ var queue = (state) => ({
3244
+ queue: state,
3245
+ size: state.length,
3246
+ isEmpty() {
3247
+ return state.length === 0;
3248
+ },
3249
+ clear() {
3250
+ state.slice(0, 0);
3251
+ },
3252
+ drain() {
3253
+ const old_state = [...state];
3254
+ state.slice(0, 0);
3255
+ return old_state;
3256
+ },
3257
+ push(...add) {
3258
+ state.push(...add);
3259
+ },
3260
+ drop(quantity) {
3261
+ if (quantity && quantity > state.length) {
3262
+ throw new Error("Cannot drop more elements than present in the queue");
3263
+ }
3264
+ state.splice(0, quantity || 1);
3265
+ },
3266
+ take(quantity) {
3267
+ if (quantity && quantity > state.length) {
3268
+ throw new Error("Cannot take more elements than present in the queue");
3269
+ }
3270
+ const result2 = state.slice(0, quantity || 1);
3271
+ state.splice(0, quantity || 1);
3272
+ return result2;
3273
+ },
3274
+ [Symbol.iterator]: function* () {
3275
+ for (let i = 0; i < state.length; i++) {
3276
+ yield state[i];
3277
+ }
3278
+ }
3279
+ });
3280
+ var createFifoQueue = (...list2) => {
3281
+ return queue([...list2]);
2786
3282
  };
2787
3283
 
2788
- // dist/runtime/type-guards/isAlpha.js
2789
- var isAlpha = (value) => {
2790
- return isString(value) && split(value).every((v) => ALPHA_CHARS.includes(v));
3284
+ // src/runtime/queues/lifo.ts
3285
+ var queue2 = (state) => ({
3286
+ queue: state,
3287
+ size: state.length,
3288
+ isEmpty() {
3289
+ return state.length === 0;
3290
+ },
3291
+ push(...add) {
3292
+ state.push(...add);
3293
+ },
3294
+ drop(quantity) {
3295
+ state.splice(-quantity);
3296
+ },
3297
+ clear() {
3298
+ state.slice(0, 0);
3299
+ },
3300
+ drain() {
3301
+ const old_state = [...state];
3302
+ state.slice(0, 0);
3303
+ return old_state;
3304
+ },
3305
+ take(quantity) {
3306
+ const result2 = state.slice(-quantity);
3307
+ state.splice(-quantity);
3308
+ return result2;
3309
+ },
3310
+ [Symbol.iterator]: function* () {
3311
+ for (let i = state.length - 1; i >= 0; i--) {
3312
+ yield state[i];
3313
+ }
3314
+ }
3315
+ });
3316
+ var createLifoQueue = (...list2) => {
3317
+ return queue2([...list2]);
2791
3318
  };
2792
3319
 
2793
- // dist/runtime/type-guards/isHexadecimal.js
2794
- var isHexadecimal = (val) => {
2795
- return isString(val) && asChars(val).every((i) => isNumericString(i) || ["a", "b", "c", "d", "e", "f"].includes(i.toLowerCase()));
3320
+ // src/runtime/runtime-types/shape-helpers/addToken.ts
3321
+ var addToken = (token, ...params) => `<<${token}${params.length > 0 ? `::${params.join("::")}` : ""}>>`;
3322
+
3323
+ // src/runtime/runtime-types/shape-helpers/atomics.ts
3324
+ var boolean = (literal2) => isDefined(literal2) ? isTrue(literal2) ? addToken("true") : isFalse(literal2) ? addToken("false") : addToken("boolean") : addToken("boolean");
3325
+ var unknown = () => "<<unknown>>";
3326
+ var undefinedType = () => "<<undefined>>";
3327
+ var nullType = () => "<<null>>";
3328
+
3329
+ // src/runtime/runtime-types/shape-helpers/regexToken.ts
3330
+ var regexToken = (re, ...rep) => {
3331
+ let exp = "";
3332
+ if (isString(re)) {
3333
+ try {
3334
+ const test = new RegExp(re);
3335
+ if (!isRegExp(test)) {
3336
+ const err = Error(`Invalid RegEx passed into regexToken(${re}, ${JSON.stringify(rep)})!`);
3337
+ err.name = "InvalidRegEx";
3338
+ throw err;
3339
+ } else {
3340
+ exp = re;
3341
+ }
3342
+ } catch (_e) {
3343
+ const err = Error(`Invalid RegEx passed into regexToken(${re}, ${JSON.stringify(rep)})!`);
3344
+ err.name = "InvalidRegEx";
3345
+ throw err;
3346
+ }
3347
+ } else if (isRegExp(re)) {
3348
+ exp = re.toString();
3349
+ }
3350
+ const token = `<<string-set::regexp::${encodeURIComponent(exp)}>>`;
3351
+ return token;
2796
3352
  };
2797
3353
 
2798
- // dist/runtime/type-guards/network-tg.js
2799
- var isIp4Address = (val) => {
2800
- return isString(val) && val.split(".").length === 4 && val.split(".").every((i) => isNumericString(i)) && val.split(".").every((i) => Number(i) >= 0 && Number(i) <= 255);
3354
+ // src/runtime/runtime-types/shape-helpers/singletons.ts
3355
+ var addSingleton = (token, api) => (...literals) => {
3356
+ return literals.length === 0 ? api ? api : addToken(token) : literals.length === 1 ? addToken(token, literals[0]) : addToken(
3357
+ "union",
3358
+ literals.map((l) => addToken(token, `${l}`)).join(",")
3359
+ );
2801
3360
  };
2802
- var isIp6Address = (val) => {
2803
- const expanded = isString(val) ? ip6GroupExpansion(val) : "";
2804
- return isString(val) && isString(expanded) && expanded.split(":").every((i) => asChars(i).length >= 1 && asChars(i).length <= 4) && expanded.split(":").every((i) => isHexadecimal(i));
3361
+ var stringApi = {
3362
+ zip: () => addToken("string-set", "Zip5"),
3363
+ zipPlus4: () => addToken("string-set", "Zip5_4"),
3364
+ zipCode: () => addToken("string-set", "ZipCode"),
3365
+ militaryTime: (resolution) => {
3366
+ return addToken(
3367
+ "string-set",
3368
+ "militaryTime",
3369
+ resolution || "HH:MM"
3370
+ );
3371
+ },
3372
+ civilianTime: (resolution) => {
3373
+ return addToken(
3374
+ "string-set",
3375
+ "militaryTime",
3376
+ resolution || "HH:MM"
3377
+ );
3378
+ },
3379
+ numericString: () => addToken("string-set", "numeric"),
3380
+ ipv4Address: () => addToken("string-set", "ipv4Address"),
3381
+ ipv6Address: () => addToken("string-set", "ipv6Address"),
3382
+ regex: (exp, ...literalRepresentation) => {
3383
+ const token = regexToken(exp, ...literalRepresentation);
3384
+ return token;
3385
+ },
3386
+ done: () => addToken("string")
2805
3387
  };
2806
- var isIpAddress = (val) => {
2807
- return isIp4Address(val) || isIp6Address(val);
3388
+ var string = addSingleton("string", stringApi);
3389
+ var number = addSingleton("number");
3390
+
3391
+ // src/runtime/runtime-types/shape-helpers/functions.ts
3392
+ var fn = (..._args) => ({
3393
+ returns: (_rtn) => ({
3394
+ addProperties: (_kv) => {
3395
+ return null;
3396
+ },
3397
+ done: () => {
3398
+ return null;
3399
+ }
3400
+ }),
3401
+ done: () => {
3402
+ const result2 = null;
3403
+ return result2;
3404
+ }
3405
+ });
3406
+
3407
+ // src/runtime/runtime-types/shape-helpers/literal-containers.ts
3408
+ var dictionary = (_obj) => {
3409
+ return null;
2808
3410
  };
2809
- var hasUrlPort = (val) => {
2810
- return isString(val) && asChars(removeUrlProtocol(val)).some((i) => i === ":");
3411
+ var tuple2 = (..._elements) => {
3412
+ return null;
2811
3413
  };
2812
- var isUrlPath = (val) => {
2813
- return isString(val) && (val === "" || val.startsWith("/")) && asChars(val).every((c) => isAlpha(c) || isNumericString(c) || c === "_" || c === "@" || c === "." || c === "-");
3414
+
3415
+ // src/runtime/runtime-types/shape-helpers/wide-containers.ts
3416
+ var record = (_key, _value) => {
3417
+ return null;
2814
3418
  };
2815
- var isDomainName = (val) => {
2816
- return isString(val) && val.split(".").filter((i) => i).length > 1 && isString(val.split(".").filter((i) => i).pop()) && asChars(val.split(".").filter((i) => i).pop()).length > 1 && val.split(".").filter((i) => i).every((i) => isAlpha(i) || isNumericString(i) || i === "-" || i === "_");
3419
+ var array = (_type) => {
3420
+ return null;
2817
3421
  };
2818
- var isUrlSource = (val) => {
2819
- return isDomainName(val) || isIpAddress(val);
3422
+ var set = (_type) => {
3423
+ return null;
2820
3424
  };
2821
- var hasUrlQueryParameter = (val, prop) => {
2822
- return isString(getUrlQueryParams(val, prop));
3425
+ var map = (_key, _value) => {
3426
+ return null;
3427
+ };
3428
+ var weakMap = (_key, _value) => {
3429
+ return null;
2823
3430
  };
2824
3431
 
2825
- // dist/runtime/type-guards/youtube.js
2826
- var isYouTubeUrl = (val) => {
2827
- return isString(val) && (val.startsWith("https://www.youtube.com") || val.startsWith("https://youtube.com") || val.startsWith("https://youtu.be"));
3432
+ // src/runtime/runtime-types/shape-helpers/union.ts
3433
+ var union2 = (...elements) => {
3434
+ const result2 = elements.map((_el) => {
3435
+ });
3436
+ return result2;
2828
3437
  };
2829
- var isYouTubeShareUrl = (val) => {
2830
- return isString(val) && val.startsWith(`https://youtu.be`);
3438
+
3439
+ // src/runtime/runtime-types/shape.ts
3440
+ var isAddOrDone = (val) => {
3441
+ return isObject(val) && hasKeys("add", "done") && typeof val.done === "function" && typeof val.add === "function";
2831
3442
  };
2832
- var isYouTubeVideoUrl = (val) => {
2833
- return isString(val) && (val.startsWith("https://www.youtube.com") || val.startsWith("https://youtube.com") || val.startsWith("https://youtu.be"));
3443
+ var ShapeApiImplementation = {
3444
+ string,
3445
+ number,
3446
+ boolean,
3447
+ unknown,
3448
+ undefined: undefinedType,
3449
+ null: nullType,
3450
+ union: union2,
3451
+ fn,
3452
+ record,
3453
+ array,
3454
+ set,
3455
+ map,
3456
+ weakMap,
3457
+ dictionary,
3458
+ tuple: tuple2
2834
3459
  };
2835
- var isYouTubePlaylistUrl = (val) => {
2836
- return isString(val) && (val === `https://www.youtube.com/feed/playlists` || val === `https://youtube.com/feed/playlists` || val === `https://www.youtube.com/channel/playlists` || val === `https://youtube.com/channel/playlists` || val.startsWith(`https://www.youtube.com/@`) && val.endsWith(`/playlists`) || val.startsWith(`https://youtube.com/@`) && val.endsWith(`/playlists`));
3460
+ var shape = (cb) => {
3461
+ const rtn = cb(ShapeApiImplementation);
3462
+ return handleDoneFn(
3463
+ isAddOrDone(rtn) ? rtn.done() : rtn
3464
+ );
2837
3465
  };
2838
- var feed_map = (type) => {
2839
- return isUndefined(type) ? `/feed` : type === "liked" ? `/playlist?list=LL` : ["history", "playlists", "trending", "subscriptions"].includes(type) ? `/feed/${type}` : `/feed/`;
3466
+ var isShape = (v) => {
3467
+ return isString(v) && v.startsWith("<<") && v.endsWith(">>") && SHAPE_PREFIXES.some((i) => v.startsWith(`<<${i}`)) ? true : false;
2840
3468
  };
2841
- var isYouTubeFeedUrl = (val, type = void 0) => {
2842
- return isString(val) && (val.startsWith(`https://www.youtube.com${feed_map(type)}`) || val.startsWith(`https://youtube.com${feed_map(type)}`));
3469
+
3470
+ // src/runtime/runtime-types/choices.ts
3471
+ var choices = "NOT READY";
3472
+
3473
+ // src/runtime/runtime-types/list.ts
3474
+ var createProxy = (...initialize) => {
3475
+ const state = initialize;
3476
+ state.id = null;
3477
+ const proxy = new Proxy(state, {});
3478
+ Object.defineProperty(proxy, "id", {
3479
+ enumerable: false
3480
+ });
3481
+ return proxy;
2843
3482
  };
2844
- var isYouTubeCreatorUrl = (url) => {
2845
- return isString(url) && (url.startsWith(`https://www.youtube.com/@`) || url.startsWith(`https://youtube.com/@`) || url.startsWith(`https://www.youtube.com/channel/`));
3483
+ var list = (...init) => {
3484
+ return init.length === 1 && isArray(init[0]) ? createProxy(...init[0]) : createProxy(...init);
2846
3485
  };
2847
- var isYouTubeVideosInPlaylist = (val) => {
2848
- return isString(val) && (val.startsWith(`https://www.youtube.com/playlist?`) || val.startsWith(`https://youtube.com/playlist?`)) && hasUrlQueryParameter(val, "list");
3486
+
3487
+ // src/runtime/runtime-types/ip6Prefix.ts
3488
+ var ip6Prefix = (...groups) => {
3489
+ const empty = addToken("string");
3490
+ let count = 4 - groups.length;
3491
+ let fillIn = [];
3492
+ for (let index = 0; index < count; index++) {
3493
+ fillIn.push(empty);
3494
+ }
3495
+ return [
3496
+ "<<string::",
3497
+ [
3498
+ groups.join(":"),
3499
+ fillIn.join(":")
3500
+ ].join(":"),
3501
+ ">>"
3502
+ ].join("");
2849
3503
  };
2850
3504
 
2851
- // dist/runtime/type-guards/repos.js
2852
- var isRepoSource = (v) => {
2853
- return isString(v) && REPO_SOURCES.includes(v);
3505
+ // src/runtime/runtime-types/asType.ts
3506
+ var asType = (val) => {
3507
+ return val;
2854
3508
  };
2855
- var isSemanticVersion = (v, allowPrefix = false) => {
2856
- return isString(v) && v.split(".").length === 3 && !Number.isNaN(Number(v.split(".")[1])) && !Number.isNaN(Number(v.split(".")[2])) && (!Number.isNaN(Number(v.split(".")[0])) || allowPrefix && !Number.isNaN(Number(stripLeading(v.split(".")[0], "v").trim())));
3509
+ var asStringLiteral = (...values) => {
3510
+ return values.map((i) => i);
2857
3511
  };
2858
- var isRepoUrl = (val) => {
2859
- const baseUrls = valuesOf(REPO_SOURCE_LOOKUP).flat();
2860
- return isString(val) && baseUrls.every((u) => val === u || val.startsWith(`${u}/`));
3512
+
3513
+ // src/runtime/runtime-types/asToken.ts
3514
+ var asSimpleToken = (_val) => {
3515
+ return "not ready";
2861
3516
  };
2862
- var isGithubUrl = (val) => {
2863
- const baseUrls = REPO_SOURCE_LOOKUP["github"];
2864
- return isString(val) && baseUrls.every((u) => val === u || val.startsWith(`${u}/`));
3517
+ var scalarToToken = {
3518
+ string: "<<string>>",
3519
+ number: "<<number>>",
3520
+ boolean: "<<boolean>>",
3521
+ true: "<<true>>",
3522
+ false: "<<false>>",
3523
+ null: "<<null>>",
3524
+ undefined: "<<undefined>>",
3525
+ unknown: "<<unknown>>",
3526
+ any: "<<any>>",
3527
+ never: "<<never>>"
2865
3528
  };
2866
- var isGithubRepoUrl = (val) => {
2867
- const baseUrls = [""];
2868
- return isString(val) && baseUrls.every((u) => val === u || val.startsWith(`${u}/`));
3529
+ var unionToToken = {
3530
+ "opt(string)": "<<union::[ <<string>>, <<undefined>> ]>>",
3531
+ "opt(number)": "<<union::[ <<number>>, <<undefined>> ]>>",
3532
+ "opt(unknown)": "<<union::[ <<unknown>>, <<undefined>> ]>>",
3533
+ "opt(boolean)": "<<union::[ <<boolean>>, <<undefined>> ]>>"
2869
3534
  };
2870
- var isBitbucketUrl = (val) => {
2871
- const baseUrls = REPO_SOURCE_LOOKUP["bitbucket"];
2872
- return isString(val) && baseUrls.every((u) => val === u || val.startsWith(`${u}/`));
3535
+ var stringLiteral = (str) => {
3536
+ return stripAfter(stripBefore(str, "string("), ")");
2873
3537
  };
2874
- var isCodeCommitUrl = (val) => {
2875
- const baseUrls = REPO_SOURCE_LOOKUP["codecommit"];
2876
- return isString(val) && baseUrls.every((u) => val === u || val.startsWith(`${u}/`));
3538
+ var numericLiteral = (str) => {
3539
+ return stripAfter(stripBefore(str, "number("), ")");
2877
3540
  };
2878
-
2879
- // dist/runtime/type-guards/isTrimmable.js
2880
- var isTrimable = (val) => {
2881
- return isString(val) && val !== val.trim();
3541
+ var simpleScalarTokenToTypeToken = (val) => {
3542
+ return val in scalarToToken ? scalarToToken[val] : val.startsWith("string(") ? stringLiteral(val).includes(",") ? `<<union::[ ${stringLiteral(val).split(/,\s{0,1}/).map((i) => `"${i}"`).join(", ")} ]>>` : `<<string::${stringLiteral(val)}>>` : val.startsWith("number(") ? numericLiteral(val).includes(",") ? `<<union::[ ${numericLiteral(val).split(/,\s{0,1}/).join(", ")} ]>>` : `<<number::${numericLiteral(val)}>>` : `<<never>>`;
2882
3543
  };
2883
-
2884
- // dist/runtime/type-guards/hasWhitespace.js
2885
- var hasWhiteSpace = (val) => {
2886
- return isString(val) && asChars(val).some((c) => WHITESPACE_CHARS.includes(c));
3544
+ var unionNode = (node) => {
3545
+ return isNumberLike(node) ? `<<number::${node}>>` : isBooleanLike(node) ? `<<${node}>>` : isSimpleContainerToken(node) ? simpleContainerTokenToTypeToken(node) : isSimpleScalarToken(node) ? simpleScalarToken(node) : `<<string::${node}>>`;
2887
3546
  };
2888
-
2889
- // dist/runtime/type-guards/isEmail.js
2890
- var isEmail = (val) => {
2891
- return isString(val) && (val.split("@").length === 2 && val.split("@")[1].split(".").length > 1 && asChars(last(val.split("@")[1].split("."))).length > 1);
3547
+ var union3 = (nodes) => {
3548
+ return Array.isArray(nodes) ? nodes.map((n) => unionNode(n)) : nodes.includes(",") ? nodes.split(/,\s{0,1}/).map((n) => unionNode(n)).join(", ") : unionNode(nodes);
2892
3549
  };
2893
-
2894
- // dist/runtime/type-guards/isPhoneNumber.js
2895
- var isPhoneNumber = (val) => {
2896
- return isString(val) && ["+", "(", ...NUMERIC_CHAR].includes(asChars(val.trim())[0]) && [...NUMERIC_CHAR].includes([...asChars(val.trim())].pop()) && (val.trim().startsWith(`+`) ? asChars(retainChars(val, ...NUMERIC_CHAR)).length >= 8 : val.trim().startsWith("00") ? asChars(retainChars(val, ...NUMERIC_CHAR)).length >= 10 : asChars(retainChars(val, ...NUMERIC_CHAR)).length >= 7) && stripChars(val, ...NUMERIC_CHAR, ...WHITESPACE_CHARS, "(", ")", "+", ".", "-") === "";
3550
+ var stripOpt = stripSurround("opt(", ")");
3551
+ var stripUnion = stripSurround("Union(", ")");
3552
+ var simpleUnionTokenToTypeToken = (val) => {
3553
+ return val in unionToToken ? unionToToken[val] : val.startsWith(`Union(`) && val.endsWith(`)`) ? `<<union::[ ${union3(stripUnion(val))} ]>>` : val.startsWith(`opt(`) && val.endsWith(`)`) ? `<<union::[ ${union3(stripOpt(val))}, <<undefined>> ]>>` : `<<never>>`;
2897
3554
  };
2898
-
2899
- // dist/runtime/type-guards/isUnset.js
2900
- var isUnset = (val) => {
2901
- return isObject(val) && val.kind === "Unset";
3555
+ var simpleContainerTokenToTypeToken = (_val) => {
2902
3556
  };
2903
- var isSet = (val) => {
2904
- return isObject(val) ? val.kind !== "Unset" ? true : false : true;
3557
+ var asTypeToken = (_val) => {
3558
+ return "not ready";
2905
3559
  };
2906
3560
 
2907
- // dist/runtime/type-guards/api-tg.js
2908
- var isEscapeFunction = (val) => {
2909
- return isFunction(val) && "escape" in val && val.escape === true;
2910
- };
2911
- var isOptionalParamFunction = (val) => {
2912
- return isFunction(val) && "optionalParams" in val && val.optionalParams === true;
2913
- };
2914
- var isApi = (api) => {
2915
- return isObject(api) && "surface" in api && "_kind" in api && api._kind === "api";
3561
+ // src/runtime/runtime-types/tokens/simpleToken.ts
3562
+ var simpleToken = (token) => token;
3563
+ var simpleScalarToken = (token) => token;
3564
+ var simpleContainerToken = (token) => token;
3565
+ var simpleScalarType = (token) => {
3566
+ const value = simpleScalarToken(token);
3567
+ return value;
2916
3568
  };
2917
- var isApiSurface = (val) => {
2918
- return isObject(val) && Object.keys(val).some((k) => isEscapeFunction(val[k]));
3569
+ var simpleContainerType = (token) => {
3570
+ const value = simpleContainerToken(token);
3571
+ return value;
2919
3572
  };
2920
-
2921
- // dist/runtime/type-guards/higher-order/endsWith.js
2922
- var endsWith = (endingIn2) => (val) => {
2923
- return isString(val) ? val.endsWith(endingIn2) ? true : false : isNumber(val) ? String(val).endsWith(endingIn2) ? true : false : false;
3573
+ var simpleType = (token) => {
3574
+ const value = isSimpleScalarToken(token) ? simpleScalarType(token) : isSimpleContainerToken(token) ? simpleContainerToken(token) : Never;
3575
+ return value;
2924
3576
  };
2925
3577
 
2926
- // dist/runtime/type-guards/higher-order/startsWith.js
2927
- var startsWith = (startingWith) => (val) => {
2928
- return isString(val) ? val.startsWith(startingWith) ? true : false : isNumber(val) ? String(val).startsWith(startingWith) ? true : false : false;
3578
+ // src/runtime/runtime-types/tokens/createTypeToken.ts
3579
+ var unionToken = (...els) => {
3580
+ return `<<union::[${jsonValues(els)}]>>`;
2929
3581
  };
2930
-
2931
- // dist/runtime/type-guards/higher-order/isSameTypeOf.js
2932
- var isSameTypeOf = (base) => (compare) => {
2933
- return typeof base === typeof compare;
3582
+ var singleton = (base) => {
3583
+ const handler = (...lits) => {
3584
+ return lits.length === 0 ? base === "string" ? `<<string>>` : `<<number>>` : lits.length === 1 ? base === "string" ? `<<string::${lits[0]}>>` : `<<number::${lits[0]}>>` : base === "string" ? `<<string::${unionToken(...lits)}>>` : `<<number::${unionToken(...lits)}>>`;
3585
+ };
3586
+ return handler;
2934
3587
  };
2935
-
2936
- // dist/runtime/type-guards/higher-order/isEqual.js
2937
- var isEqual = (base) => (value) => isSameTypeOf(base)(value) ? value === base ? true : false : false;
2938
-
2939
- // dist/runtime/type-guards/higher-order/isLength.js
2940
- function isLength(value, len) {
2941
- return isArray(value) ? isEqual(value.length)(len) ? true : false : isString(value) ? isEqual(value.length)(len) ? true : false : isObject(value) ? isEqual(keysOf(value))(len) ? true : false : false;
2942
- }
2943
-
2944
- // dist/runtime/type-guards/higher-order/isTypeOf.js
2945
- var isTypeOf = (type) => (value) => {
2946
- return typeof value === type;
3588
+ var createTypeToken = (base) => {
3589
+ return isAtomicToken(base) ? `<<${base}>>` : isSingletonToken(base) ? singleton(base) : "";
2947
3590
  };
2948
3591
 
2949
- // dist/runtime/type-guards/higher-order/isTuple.js
2950
- var isTuple = (...tuple3) => {
2951
- const results = tuple3.map((i) => i(ShapeApiImplementation)).map((i) => isDoneFn(i) ? i.done() : i);
2952
- return (v) => {
2953
- return isArray(v) && v.length === results.length && results.every(isShape) && v.every((item, idx) => isSameTypeOf(results[idx])(item));
2954
- };
3592
+ // src/runtime/sets/uniqueKeys.ts
3593
+ var uniqueKeys = (left, right) => {
3594
+ const isNumeric = isArray(left) && isArray(right) ? true : false;
3595
+ if (isArray(left) && !isArray(right) || isArray(right) && !isArray(left)) {
3596
+ throw new Error("uniqueKeys(l,r) given invalid comparison; both left and right values should be an object or an array but not one of each!");
3597
+ }
3598
+ const l = isNumeric ? Object.keys(left).map((i) => Number(i)) : Object.keys(left);
3599
+ const r = isNumeric ? Object.keys(right).map((i) => Number(i)) : Object.keys(right);
3600
+ if (isNumeric) {
3601
+ throw new Error("uniqueKeys does not yet work with tuples");
3602
+ }
3603
+ const leftKeys = l.filter((i) => !r.includes(i));
3604
+ const rightKeys = r.filter((i) => !l.includes(i));
3605
+ return [
3606
+ "LeftRight",
3607
+ leftKeys,
3608
+ rightKeys
3609
+ ];
2955
3610
  };
2956
3611
 
2957
- // dist/runtime/vuejs/asVueRef.js
3612
+ // src/runtime/vuejs/asVueRef.ts
2958
3613
  var asVueRef = (value) => ({
2959
3614
  value,
2960
3615
  _value: null
@@ -2970,7 +3625,6 @@ var asVueRef = (value) => ({
2970
3625
  DEFAULT_ONE_TO_ONE_MAPPING,
2971
3626
  FALSY_TYPE_KINDS,
2972
3627
  FALSY_VALUES,
2973
- FILTER,
2974
3628
  GITHUB_INSIGHT_CATEGORY_LOOKUP,
2975
3629
  HASH_TABLE_ALPHA_LOWER,
2976
3630
  HASH_TABLE_ALPHA_UPPER,
@@ -3008,6 +3662,14 @@ var asVueRef = (value) => ({
3008
3662
  RESULT,
3009
3663
  SHAPE_DELIMITER,
3010
3664
  SHAPE_PREFIXES,
3665
+ SIMPLE_CONTAINER_TOKENS,
3666
+ SIMPLE_DICT_VALUES,
3667
+ SIMPLE_MAP_KEYS,
3668
+ SIMPLE_MAP_VALUES,
3669
+ SIMPLE_SCALAR_TOKENS,
3670
+ SIMPLE_SET_TYPES,
3671
+ SIMPLE_TOKENS,
3672
+ SIMPLE_UNION_TOKENS,
3011
3673
  SINGULAR_NOUN_ENDINGS,
3012
3674
  ShapeApiImplementation,
3013
3675
  TOP_LEVEL_DOMAINS,
@@ -3043,16 +3705,17 @@ var asVueRef = (value) => ({
3043
3705
  addPropsToFn,
3044
3706
  and,
3045
3707
  asApi,
3046
- asApiCallback,
3047
3708
  asArray,
3048
- asCallbackProp,
3049
3709
  asChars,
3050
3710
  asEscapeFunction,
3051
- asHandledApiCallback,
3052
3711
  asOptionalParamFunction,
3053
- asPhoneNumber,
3712
+ asPhoneFormat,
3054
3713
  asRecord,
3714
+ asSimpleToken,
3055
3715
  asString,
3716
+ asStringLiteral,
3717
+ asType,
3718
+ asTypeToken,
3056
3719
  asVueRef,
3057
3720
  box,
3058
3721
  boxDictionaryValues,
@@ -3061,20 +3724,24 @@ var asVueRef = (value) => ({
3061
3724
  createConstant,
3062
3725
  createConverter,
3063
3726
  createErrorCondition,
3727
+ createFifoQueue,
3064
3728
  createFnWithProps,
3729
+ createLifoQueue,
3730
+ createTypeToken,
3731
+ csv,
3065
3732
  defineObj,
3066
3733
  defineTuple,
3067
- dict,
3068
3734
  endsWith,
3069
3735
  ensureLeading,
3070
3736
  ensureSurround,
3071
3737
  ensureTrailing,
3072
3738
  entries,
3739
+ errCondition,
3740
+ filter,
3073
3741
  find,
3074
3742
  fnMeta,
3075
3743
  get,
3076
3744
  getEach,
3077
- getEscapeFunction,
3078
3745
  getPhoneCountryCode,
3079
3746
  getUrlPath,
3080
3747
  getUrlPort,
@@ -3092,22 +3759,46 @@ var asVueRef = (value) => ({
3092
3759
  idLiteral,
3093
3760
  idTypeGuard,
3094
3761
  identity,
3762
+ ifArray,
3763
+ ifArrayPartial,
3764
+ ifBoolean,
3765
+ ifChar,
3766
+ ifContainer,
3767
+ ifDefined,
3768
+ ifFalse,
3769
+ ifFunction,
3770
+ ifHasKey,
3771
+ ifLength,
3095
3772
  ifLowercaseChar,
3773
+ ifNotNull,
3774
+ ifNull,
3775
+ ifNumber,
3776
+ ifObject,
3777
+ ifSameType,
3778
+ ifScalar,
3779
+ ifString,
3780
+ ifTrue,
3781
+ ifUndefined,
3096
3782
  ifUppercaseChar,
3097
3783
  indexOf,
3098
3784
  intersect,
3099
3785
  intersection,
3100
3786
  ip6GroupExpansion,
3101
3787
  ip6Prefix,
3788
+ isAlpha,
3102
3789
  isApi,
3103
3790
  isApiSurface,
3104
3791
  isArray,
3792
+ isArrayToken,
3793
+ isAtomicToken,
3105
3794
  isBitbucketUrl,
3106
3795
  isBoolean,
3796
+ isBooleanLike,
3107
3797
  isBox,
3108
3798
  isCodeCommitUrl,
3109
3799
  isConstant,
3110
3800
  isContainer,
3801
+ isContainerToken,
3111
3802
  isCssAspectRatio,
3112
3803
  isDefined,
3113
3804
  isDomainName,
@@ -3118,8 +3809,10 @@ var asVueRef = (value) => ({
3118
3809
  isEscapeFunction,
3119
3810
  isFalse,
3120
3811
  isFalsy,
3812
+ isFnToken,
3121
3813
  isFnWithParams,
3122
3814
  isFunction,
3815
+ isGeneratorToken,
3123
3816
  isGithubRepoUrl,
3124
3817
  isGithubUrl,
3125
3818
  isHexadecimal,
@@ -3129,24 +3822,38 @@ var asVueRef = (value) => ({
3129
3822
  isIp6Address,
3130
3823
  isIpAddress,
3131
3824
  isLength,
3825
+ isLikeRegExp,
3826
+ isMapToken,
3132
3827
  isNever,
3133
3828
  isNotNull,
3134
3829
  isNothing,
3135
3830
  isNull,
3136
3831
  isNumber,
3832
+ isNumberLike,
3137
3833
  isNumericString,
3138
3834
  isObject,
3835
+ isObjectToken,
3139
3836
  isOptionalParamFunction,
3140
3837
  isPhoneNumber,
3141
3838
  isReadonlyArray,
3839
+ isRecordToken,
3142
3840
  isRef,
3841
+ isRegExp,
3143
3842
  isRepoSource,
3144
3843
  isRepoUrl,
3145
3844
  isSameTypeOf,
3146
3845
  isScalar,
3147
3846
  isSemanticVersion,
3148
3847
  isSet,
3848
+ isSetToken,
3149
3849
  isShape,
3850
+ isSimpleContainerToken,
3851
+ isSimpleContainerTokenTuple,
3852
+ isSimpleScalarToken,
3853
+ isSimpleScalarTokenTuple,
3854
+ isSimpleToken,
3855
+ isSimpleTokenTuple,
3856
+ isSingletonToken,
3150
3857
  isSpecificConstant,
3151
3858
  isString,
3152
3859
  isSymbol,
@@ -3154,15 +3861,19 @@ var asVueRef = (value) => ({
3154
3861
  isTrue,
3155
3862
  isTruthy,
3156
3863
  isTuple,
3864
+ isTupleToken,
3157
3865
  isTypeOf,
3158
3866
  isTypeToken,
3159
3867
  isTypeTuple,
3160
3868
  isUndefined,
3869
+ isUnionSetToken,
3870
+ isUnionToken,
3161
3871
  isUnset,
3162
3872
  isUri,
3163
3873
  isUrl,
3164
3874
  isUrlPath,
3165
3875
  isUrlSource,
3876
+ isWeakMapToken,
3166
3877
  isYouTubeCreatorUrl,
3167
3878
  isYouTubeFeedUrl,
3168
3879
  isYouTubePlaylistUrl,
@@ -3170,7 +3881,9 @@ var asVueRef = (value) => ({
3170
3881
  isYouTubeUrl,
3171
3882
  isYouTubeVideoUrl,
3172
3883
  isYouTubeVideosInPlaylist,
3173
- join,
3884
+ joinWith,
3885
+ jsonValue,
3886
+ jsonValues,
3174
3887
  keysOf,
3175
3888
  kindError,
3176
3889
  kindLiteral,
@@ -3187,11 +3900,11 @@ var asVueRef = (value) => ({
3187
3900
  never,
3188
3901
  omit,
3189
3902
  optional,
3903
+ optionalOrNull,
3190
3904
  or,
3191
- parse,
3905
+ orNull,
3192
3906
  pathJoin,
3193
3907
  pluralize,
3194
- pop,
3195
3908
  removePhoneCountryCode,
3196
3909
  removeUrlProtocol,
3197
3910
  result,
@@ -3203,6 +3916,15 @@ var asVueRef = (value) => ({
3203
3916
  shape,
3204
3917
  sharedKeys,
3205
3918
  shift,
3919
+ simpleContainerToken,
3920
+ simpleContainerTokenToTypeToken,
3921
+ simpleContainerType,
3922
+ simpleScalarToken,
3923
+ simpleScalarTokenToTypeToken,
3924
+ simpleScalarType,
3925
+ simpleToken,
3926
+ simpleType,
3927
+ simpleUnionTokenToTypeToken,
3206
3928
  slice,
3207
3929
  split,
3208
3930
  startsWith,
@@ -3210,6 +3932,7 @@ var asVueRef = (value) => ({
3210
3932
  stripBefore,
3211
3933
  stripChars,
3212
3934
  stripLeading,
3935
+ stripSurround,
3213
3936
  stripTrailing,
3214
3937
  stripUntil,
3215
3938
  surround,