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