inferred-types 0.45.3 → 0.46.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants/tsconfig.tsbuildinfo +1 -1
- package/dist/inferred-types/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/boolean-logic/ifFunction.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/ifFunction.js +1 -2
- package/dist/runtime/boolean-logic/ifString.js +1 -2
- package/dist/runtime/boolean-logic/index.d.ts +2 -2
- package/dist/runtime/boolean-logic/index.d.ts.map +1 -1
- package/dist/runtime/boolean-logic/index.js +2 -2
- package/dist/runtime/literals/index.d.ts +1 -0
- package/dist/runtime/literals/index.d.ts.map +1 -1
- package/dist/runtime/literals/index.js +1 -0
- package/dist/runtime/meta/urlMeta.d.ts +11 -2
- package/dist/runtime/meta/urlMeta.d.ts.map +1 -1
- package/dist/runtime/meta/urlMeta.js +15 -1
- package/dist/runtime/meta/youtube-meta.d.ts +8 -1
- package/dist/runtime/meta/youtube-meta.d.ts.map +1 -1
- package/dist/runtime/meta/youtube-meta.js +25 -1
- package/dist/runtime/runtime-types/ip6Prefix.d.ts +1 -1
- package/dist/runtime/runtime-types/ip6Prefix.d.ts.map +1 -1
- package/dist/runtime/runtime-types/parse.d.ts +1 -10
- package/dist/runtime/runtime-types/parse.d.ts.map +1 -1
- package/dist/runtime/tsconfig.tsbuildinfo +1 -1
- package/dist/runtime/type-guards/higher-order/endsWith.d.ts.map +1 -1
- package/dist/runtime/type-guards/higher-order/endsWith.js +6 -3
- package/dist/runtime/type-guards/index.d.ts +0 -1
- package/dist/runtime/type-guards/index.d.ts.map +1 -1
- package/dist/runtime/type-guards/index.js +0 -1
- package/dist/runtime/type-guards/isPhoneNumber.d.ts.map +1 -1
- package/dist/runtime/type-guards/isPhoneNumber.js +1 -2
- package/dist/runtime/type-guards/network-tg.d.ts +1 -1
- package/dist/runtime/type-guards/network-tg.d.ts.map +1 -1
- package/dist/runtime/type-guards/network-tg.js +1 -2
- package/dist/runtime/type-guards/repos.d.ts +6 -0
- package/dist/runtime/type-guards/repos.d.ts.map +1 -1
- package/dist/runtime/type-guards/repos.js +6 -0
- package/dist/types/errors/KindError.d.ts +1 -1
- package/dist/types/errors/KindError.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/Url.d.ts +3 -3
- package/dist/types/string-literals/character-sets/Url.d.ts.map +1 -1
- package/dist/types/string-literals/character-sets/YouTube.d.ts +5 -4
- package/dist/types/string-literals/character-sets/YouTube.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -17
- package/dist/inferred-types/index.cjs +0 -3233
|
@@ -1,3233 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// dist/inferred-types/index.js
|
|
20
|
-
var inferred_types_exports = {};
|
|
21
|
-
__export(inferred_types_exports, {
|
|
22
|
-
ALPHA_CHARS: () => ALPHA_CHARS,
|
|
23
|
-
COMMA: () => COMMA,
|
|
24
|
-
COMMON_OBJ_PROPS: () => COMMON_OBJ_PROPS,
|
|
25
|
-
CONSONANTS: () => CONSONANTS,
|
|
26
|
-
DEFAULT_MANY_TO_ONE_MAPPING: () => DEFAULT_MANY_TO_ONE_MAPPING,
|
|
27
|
-
DEFAULT_ONE_TO_MANY_MAPPING: () => DEFAULT_ONE_TO_MANY_MAPPING,
|
|
28
|
-
DEFAULT_ONE_TO_ONE_MAPPING: () => DEFAULT_ONE_TO_ONE_MAPPING,
|
|
29
|
-
FALSY_TYPE_KINDS: () => FALSY_TYPE_KINDS,
|
|
30
|
-
FALSY_VALUES: () => FALSY_VALUES,
|
|
31
|
-
FILTER: () => FILTER,
|
|
32
|
-
GITHUB_INSIGHT_CATEGORY_LOOKUP: () => GITHUB_INSIGHT_CATEGORY_LOOKUP,
|
|
33
|
-
HASH_TABLE_ALPHA_LOWER: () => HASH_TABLE_ALPHA_LOWER,
|
|
34
|
-
HASH_TABLE_ALPHA_UPPER: () => HASH_TABLE_ALPHA_UPPER,
|
|
35
|
-
HASH_TABLE_CHAR: () => HASH_TABLE_CHAR,
|
|
36
|
-
HASH_TABLE_DIGIT: () => HASH_TABLE_DIGIT,
|
|
37
|
-
HASH_TABLE_OTHER: () => HASH_TABLE_OTHER,
|
|
38
|
-
HASH_TABLE_SPECIAL: () => HASH_TABLE_SPECIAL,
|
|
39
|
-
HASH_TABLE_WIDE: () => HASH_TABLE_WIDE,
|
|
40
|
-
IPv4: () => IPv4,
|
|
41
|
-
IPv6: () => IPv6,
|
|
42
|
-
LITERAL_TYPE_KINDS: () => LITERAL_TYPE_KINDS,
|
|
43
|
-
LOWER_ALPHA_CHARS: () => LOWER_ALPHA_CHARS,
|
|
44
|
-
MARKED: () => MARKED,
|
|
45
|
-
MONTH_ABBR: () => MONTH_ABBR,
|
|
46
|
-
MONTH_NAME: () => MONTH_NAME,
|
|
47
|
-
MapCardinality: () => MapCardinality,
|
|
48
|
-
NARROW_CONTAINER_TYPE_KINDS: () => NARROW_CONTAINER_TYPE_KINDS,
|
|
49
|
-
NETWORK_PROTOCOL_LOOKUP: () => NETWORK_PROTOCOL_LOOKUP,
|
|
50
|
-
NON_ZERO_NUMERIC_CHAR: () => NON_ZERO_NUMERIC_CHAR,
|
|
51
|
-
NOT_APPLICABLE: () => NOT_APPLICABLE,
|
|
52
|
-
NOT_DEFINED: () => NOT_DEFINED,
|
|
53
|
-
NO_DEFAULT_VALUE: () => NO_DEFAULT_VALUE,
|
|
54
|
-
NUMERIC_CHAR: () => NUMERIC_CHAR,
|
|
55
|
-
NUMERIC_DIGIT: () => NUMERIC_DIGIT,
|
|
56
|
-
Never: () => Never,
|
|
57
|
-
OPTION: () => OPTION,
|
|
58
|
-
PHONE_COUNTRY_CODES: () => PHONE_COUNTRY_CODES,
|
|
59
|
-
PHONE_FORMAT: () => PHONE_FORMAT,
|
|
60
|
-
PLURAL_EXCEPTIONS: () => PLURAL_EXCEPTIONS,
|
|
61
|
-
PLURAL_EXCEPTIONS_OLD: () => PLURAL_EXCEPTIONS_OLD,
|
|
62
|
-
PROXMOX_CT_STATE: () => PROXMOX_CT_STATE,
|
|
63
|
-
REPO_PAGE_TYPES: () => REPO_PAGE_TYPES,
|
|
64
|
-
REPO_SOURCES: () => REPO_SOURCES,
|
|
65
|
-
REPO_SOURCE_LOOKUP: () => REPO_SOURCE_LOOKUP,
|
|
66
|
-
RESULT: () => RESULT,
|
|
67
|
-
SHAPE_DELIMITER: () => SHAPE_DELIMITER,
|
|
68
|
-
SHAPE_PREFIXES: () => SHAPE_PREFIXES,
|
|
69
|
-
SINGULAR_NOUN_ENDINGS: () => SINGULAR_NOUN_ENDINGS,
|
|
70
|
-
ShapeApiImplementation: () => ShapeApiImplementation,
|
|
71
|
-
TOP_LEVEL_DOMAINS: () => TOP_LEVEL_DOMAINS,
|
|
72
|
-
TT_Atomics: () => TT_Atomics,
|
|
73
|
-
TT_Containers: () => TT_Containers,
|
|
74
|
-
TT_Functions: () => TT_Functions,
|
|
75
|
-
TT_SEP: () => TT_SEP,
|
|
76
|
-
TT_START: () => TT_START,
|
|
77
|
-
TT_STOP: () => TT_STOP,
|
|
78
|
-
TT_Sets: () => TT_Sets,
|
|
79
|
-
TT_Singletons: () => TT_Singletons,
|
|
80
|
-
TYPE_COMPARISONS: () => TYPE_COMPARISONS,
|
|
81
|
-
TYPE_KINDS: () => TYPE_KINDS,
|
|
82
|
-
TYPE_OF: () => TYPE_OF,
|
|
83
|
-
TYPE_TOKEN_ALL: () => TYPE_TOKEN_ALL,
|
|
84
|
-
TYPE_TOKEN_IDENTITIES: () => TYPE_TOKEN_IDENTITIES,
|
|
85
|
-
TYPE_TOKEN_PARAM_CSV: () => TYPE_TOKEN_PARAM_CSV,
|
|
86
|
-
TYPE_TOKEN_PARAM_DATE: () => TYPE_TOKEN_PARAM_DATE,
|
|
87
|
-
TYPE_TOKEN_PARAM_DATETIME: () => TYPE_TOKEN_PARAM_DATETIME,
|
|
88
|
-
TYPE_TOKEN_PARAM_STR: () => TYPE_TOKEN_PARAM_STR,
|
|
89
|
-
TYPE_TOKEN_PARAM_TIME: () => TYPE_TOKEN_PARAM_TIME,
|
|
90
|
-
TYPE_TRANSFORMS: () => TYPE_TRANSFORMS,
|
|
91
|
-
UPPER_ALPHA_CHARS: () => UPPER_ALPHA_CHARS,
|
|
92
|
-
US_STATE_LOOKUP: () => US_STATE_LOOKUP,
|
|
93
|
-
US_STATE_LOOKUP_PROVINCES: () => US_STATE_LOOKUP_PROVINCES,
|
|
94
|
-
US_STATE_LOOKUP_STRICT: () => US_STATE_LOOKUP_STRICT,
|
|
95
|
-
WHITESPACE_CHARS: () => WHITESPACE_CHARS,
|
|
96
|
-
WIDE_CONTAINER_TYPE_KINDS: () => WIDE_CONTAINER_TYPE_KINDS,
|
|
97
|
-
WIDE_TYPE_KINDS: () => WIDE_TYPE_KINDS,
|
|
98
|
-
WideAssignment: () => WideAssignment,
|
|
99
|
-
ZIP_TO_STATE: () => ZIP_TO_STATE,
|
|
100
|
-
addFnToProps: () => addFnToProps,
|
|
101
|
-
addPropsToFn: () => addPropsToFn,
|
|
102
|
-
and: () => and,
|
|
103
|
-
asApi: () => asApi,
|
|
104
|
-
asApiCallback: () => asApiCallback,
|
|
105
|
-
asArray: () => asArray,
|
|
106
|
-
asCallbackProp: () => asCallbackProp,
|
|
107
|
-
asChars: () => asChars,
|
|
108
|
-
asEscapeFunction: () => asEscapeFunction,
|
|
109
|
-
asHandledApiCallback: () => asHandledApiCallback,
|
|
110
|
-
asOptionalParamFunction: () => asOptionalParamFunction,
|
|
111
|
-
asPhoneNumber: () => asPhoneNumber,
|
|
112
|
-
asRecord: () => asRecord,
|
|
113
|
-
asString: () => asString,
|
|
114
|
-
asVueRef: () => asVueRef,
|
|
115
|
-
box: () => box,
|
|
116
|
-
boxDictionaryValues: () => boxDictionaryValues,
|
|
117
|
-
capitalize: () => capitalize,
|
|
118
|
-
choices: () => choices,
|
|
119
|
-
createConstant: () => createConstant,
|
|
120
|
-
createConverter: () => createConverter,
|
|
121
|
-
createErrorCondition: () => createErrorCondition,
|
|
122
|
-
createFnWithProps: () => createFnWithProps,
|
|
123
|
-
defineObj: () => defineObj,
|
|
124
|
-
defineTuple: () => defineTuple,
|
|
125
|
-
dict: () => dict,
|
|
126
|
-
endsWith: () => endsWith,
|
|
127
|
-
ensureLeading: () => ensureLeading,
|
|
128
|
-
ensureSurround: () => ensureSurround,
|
|
129
|
-
ensureTrailing: () => ensureTrailing,
|
|
130
|
-
entries: () => entries,
|
|
131
|
-
find: () => find,
|
|
132
|
-
fnMeta: () => fnMeta,
|
|
133
|
-
get: () => get,
|
|
134
|
-
getEach: () => getEach,
|
|
135
|
-
getEscapeFunction: () => getEscapeFunction,
|
|
136
|
-
getPhoneCountryCode: () => getPhoneCountryCode,
|
|
137
|
-
getUrlPath: () => getUrlPath,
|
|
138
|
-
getUrlPort: () => getUrlPort,
|
|
139
|
-
getUrlProtocol: () => getUrlProtocol,
|
|
140
|
-
getUrlQueryParams: () => getUrlQueryParams,
|
|
141
|
-
getUrlSource: () => getUrlSource,
|
|
142
|
-
getYouTubePageType: () => getYouTubePageType,
|
|
143
|
-
handleDoneFn: () => handleDoneFn,
|
|
144
|
-
hasDefaultValue: () => hasDefaultValue,
|
|
145
|
-
hasIndexOf: () => hasIndexOf,
|
|
146
|
-
hasKeys: () => hasKeys,
|
|
147
|
-
hasUrlPort: () => hasUrlPort,
|
|
148
|
-
hasUrlQueryParameter: () => hasUrlQueryParameter,
|
|
149
|
-
hasWhiteSpace: () => hasWhiteSpace,
|
|
150
|
-
idLiteral: () => idLiteral,
|
|
151
|
-
idTypeGuard: () => idTypeGuard,
|
|
152
|
-
identity: () => identity,
|
|
153
|
-
ifLowercaseChar: () => ifLowercaseChar,
|
|
154
|
-
ifUppercaseChar: () => ifUppercaseChar,
|
|
155
|
-
indexOf: () => indexOf,
|
|
156
|
-
intersect: () => intersect,
|
|
157
|
-
intersection: () => intersection,
|
|
158
|
-
ip6GroupExpansion: () => ip6GroupExpansion,
|
|
159
|
-
ip6Prefix: () => ip6Prefix,
|
|
160
|
-
isApi: () => isApi,
|
|
161
|
-
isApiSurface: () => isApiSurface,
|
|
162
|
-
isArray: () => isArray,
|
|
163
|
-
isBitbucketUrl: () => isBitbucketUrl,
|
|
164
|
-
isBoolean: () => isBoolean,
|
|
165
|
-
isBox: () => isBox,
|
|
166
|
-
isCodeCommitUrl: () => isCodeCommitUrl,
|
|
167
|
-
isConstant: () => isConstant,
|
|
168
|
-
isContainer: () => isContainer,
|
|
169
|
-
isCssAspectRatio: () => isCssAspectRatio,
|
|
170
|
-
isDefined: () => isDefined,
|
|
171
|
-
isDomainName: () => isDomainName,
|
|
172
|
-
isDoneFn: () => isDoneFn,
|
|
173
|
-
isEmail: () => isEmail,
|
|
174
|
-
isEqual: () => isEqual,
|
|
175
|
-
isErrorCondition: () => isErrorCondition,
|
|
176
|
-
isEscapeFunction: () => isEscapeFunction,
|
|
177
|
-
isFalse: () => isFalse,
|
|
178
|
-
isFalsy: () => isFalsy,
|
|
179
|
-
isFnWithParams: () => isFnWithParams,
|
|
180
|
-
isFunction: () => isFunction,
|
|
181
|
-
isGithubRepoUrl: () => isGithubRepoUrl,
|
|
182
|
-
isGithubUrl: () => isGithubUrl,
|
|
183
|
-
isHexadecimal: () => isHexadecimal,
|
|
184
|
-
isIndexable: () => isIndexable,
|
|
185
|
-
isInlineSvg: () => isInlineSvg,
|
|
186
|
-
isIp4Address: () => isIp4Address,
|
|
187
|
-
isIp6Address: () => isIp6Address,
|
|
188
|
-
isIpAddress: () => isIpAddress,
|
|
189
|
-
isLength: () => isLength,
|
|
190
|
-
isNever: () => isNever,
|
|
191
|
-
isNotNull: () => isNotNull,
|
|
192
|
-
isNothing: () => isNothing,
|
|
193
|
-
isNull: () => isNull,
|
|
194
|
-
isNumber: () => isNumber,
|
|
195
|
-
isNumericString: () => isNumericString,
|
|
196
|
-
isObject: () => isObject,
|
|
197
|
-
isOptionalParamFunction: () => isOptionalParamFunction,
|
|
198
|
-
isPhoneNumber: () => isPhoneNumber,
|
|
199
|
-
isReadonlyArray: () => isReadonlyArray,
|
|
200
|
-
isRef: () => isRef,
|
|
201
|
-
isRepoSource: () => isRepoSource,
|
|
202
|
-
isRepoUrl: () => isRepoUrl,
|
|
203
|
-
isSameTypeOf: () => isSameTypeOf,
|
|
204
|
-
isScalar: () => isScalar,
|
|
205
|
-
isSemanticVersion: () => isSemanticVersion,
|
|
206
|
-
isSet: () => isSet,
|
|
207
|
-
isShape: () => isShape,
|
|
208
|
-
isSpecificConstant: () => isSpecificConstant,
|
|
209
|
-
isString: () => isString,
|
|
210
|
-
isSymbol: () => isSymbol,
|
|
211
|
-
isTrimable: () => isTrimable,
|
|
212
|
-
isTrue: () => isTrue,
|
|
213
|
-
isTruthy: () => isTruthy,
|
|
214
|
-
isTuple: () => isTuple,
|
|
215
|
-
isTypeOf: () => isTypeOf,
|
|
216
|
-
isTypeToken: () => isTypeToken,
|
|
217
|
-
isTypeTuple: () => isTypeTuple,
|
|
218
|
-
isUndefined: () => isUndefined,
|
|
219
|
-
isUnset: () => isUnset,
|
|
220
|
-
isUri: () => isUri,
|
|
221
|
-
isUrl: () => isUrl,
|
|
222
|
-
isUrlPath: () => isUrlPath,
|
|
223
|
-
isUrlSource: () => isUrlSource,
|
|
224
|
-
isYouTubeCreatorUrl: () => isYouTubeCreatorUrl,
|
|
225
|
-
isYouTubeFeedUrl: () => isYouTubeFeedUrl,
|
|
226
|
-
isYouTubePlaylistUrl: () => isYouTubePlaylistUrl,
|
|
227
|
-
isYouTubeShareUrl: () => isYouTubeShareUrl,
|
|
228
|
-
isYouTubeUrl: () => isYouTubeUrl,
|
|
229
|
-
isYouTubeVideoUrl: () => isYouTubeVideoUrl,
|
|
230
|
-
isYouTubeVideosInPlaylist: () => isYouTubeVideosInPlaylist,
|
|
231
|
-
join: () => join,
|
|
232
|
-
keysOf: () => keysOf,
|
|
233
|
-
kindError: () => kindError,
|
|
234
|
-
kindLiteral: () => kindLiteral,
|
|
235
|
-
last: () => last,
|
|
236
|
-
list: () => list,
|
|
237
|
-
literal: () => literal,
|
|
238
|
-
logicalReturns: () => logicalReturns,
|
|
239
|
-
lowercase: () => lowercase,
|
|
240
|
-
mergeObjects: () => mergeObjects,
|
|
241
|
-
mergeScalars: () => mergeScalars,
|
|
242
|
-
mergeTuples: () => mergeTuples,
|
|
243
|
-
nameLiteral: () => nameLiteral,
|
|
244
|
-
narrow: () => narrow,
|
|
245
|
-
never: () => never,
|
|
246
|
-
omit: () => omit,
|
|
247
|
-
optional: () => optional,
|
|
248
|
-
or: () => or,
|
|
249
|
-
parse: () => parse,
|
|
250
|
-
pathJoin: () => pathJoin,
|
|
251
|
-
pluralize: () => pluralize,
|
|
252
|
-
pop: () => pop,
|
|
253
|
-
removePhoneCountryCode: () => removePhoneCountryCode,
|
|
254
|
-
removeUrlProtocol: () => removeUrlProtocol,
|
|
255
|
-
result: () => result,
|
|
256
|
-
retain: () => retain,
|
|
257
|
-
retainAfter: () => retainAfter,
|
|
258
|
-
retainChars: () => retainChars,
|
|
259
|
-
retainWhile: () => retainWhile,
|
|
260
|
-
reverse: () => reverse,
|
|
261
|
-
shape: () => shape,
|
|
262
|
-
sharedKeys: () => sharedKeys,
|
|
263
|
-
shift: () => shift,
|
|
264
|
-
slice: () => slice,
|
|
265
|
-
split: () => split,
|
|
266
|
-
startsWith: () => startsWith,
|
|
267
|
-
stripAfter: () => stripAfter,
|
|
268
|
-
stripBefore: () => stripBefore,
|
|
269
|
-
stripChars: () => stripChars,
|
|
270
|
-
stripLeading: () => stripLeading,
|
|
271
|
-
stripTrailing: () => stripTrailing,
|
|
272
|
-
surround: () => surround,
|
|
273
|
-
takeNumericCharacters: () => takeNumericCharacters,
|
|
274
|
-
takeProp: () => takeProp,
|
|
275
|
-
toCamelCase: () => toCamelCase,
|
|
276
|
-
toKebabCase: () => toKebabCase,
|
|
277
|
-
toNumber: () => toNumber,
|
|
278
|
-
toNumericArray: () => toNumericArray,
|
|
279
|
-
toPascalCase: () => toPascalCase,
|
|
280
|
-
toSnakeCase: () => toSnakeCase,
|
|
281
|
-
toString: () => toString,
|
|
282
|
-
toUppercase: () => toUppercase,
|
|
283
|
-
trim: () => trim,
|
|
284
|
-
trimEnd: () => trimEnd,
|
|
285
|
-
trimLeft: () => trimLeft,
|
|
286
|
-
trimRight: () => trimRight,
|
|
287
|
-
trimStart: () => trimStart,
|
|
288
|
-
truncate: () => truncate,
|
|
289
|
-
tuple: () => tuple,
|
|
290
|
-
unbox: () => unbox,
|
|
291
|
-
uncapitalize: () => uncapitalize,
|
|
292
|
-
union: () => union,
|
|
293
|
-
unionize: () => unionize,
|
|
294
|
-
unique: () => unique,
|
|
295
|
-
uniqueKeys: () => uniqueKeys,
|
|
296
|
-
uppercase: () => uppercase,
|
|
297
|
-
urlMeta: () => urlMeta,
|
|
298
|
-
valuesOf: () => valuesOf,
|
|
299
|
-
widen: () => widen,
|
|
300
|
-
withDefaults: () => withDefaults,
|
|
301
|
-
withKeys: () => withKeys,
|
|
302
|
-
withoutKeys: () => withoutKeys,
|
|
303
|
-
withoutValue: () => withoutValue,
|
|
304
|
-
wrapFn: () => wrapFn,
|
|
305
|
-
youtubeMeta: () => youtubeMeta
|
|
306
|
-
});
|
|
307
|
-
module.exports = __toCommonJS(inferred_types_exports);
|
|
308
|
-
|
|
309
|
-
// dist/constants/createConstant.js
|
|
310
|
-
function createConstant(kind) {
|
|
311
|
-
return {
|
|
312
|
-
_type: "Constant",
|
|
313
|
-
kind
|
|
314
|
-
};
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
// dist/constants/NoDefaultValue.js
|
|
318
|
-
var NO_DEFAULT_VALUE = createConstant("no-default-value");
|
|
319
|
-
|
|
320
|
-
// dist/constants/NotApplicable.js
|
|
321
|
-
var NOT_APPLICABLE = Symbol("not applicable");
|
|
322
|
-
|
|
323
|
-
// dist/constants/DateTime.js
|
|
324
|
-
var MONTH_NAME = [
|
|
325
|
-
"January",
|
|
326
|
-
"February",
|
|
327
|
-
"March",
|
|
328
|
-
"April",
|
|
329
|
-
"May",
|
|
330
|
-
"June",
|
|
331
|
-
"July",
|
|
332
|
-
"August",
|
|
333
|
-
"September",
|
|
334
|
-
"October",
|
|
335
|
-
"November",
|
|
336
|
-
"December"
|
|
337
|
-
];
|
|
338
|
-
var MONTH_ABBR = [
|
|
339
|
-
"Jan",
|
|
340
|
-
"Feb",
|
|
341
|
-
"Mar",
|
|
342
|
-
"Apr",
|
|
343
|
-
"May",
|
|
344
|
-
"Jun",
|
|
345
|
-
"Jul",
|
|
346
|
-
"Aug",
|
|
347
|
-
"Sep",
|
|
348
|
-
"Oct",
|
|
349
|
-
"Nov",
|
|
350
|
-
"Dec"
|
|
351
|
-
];
|
|
352
|
-
|
|
353
|
-
// dist/constants/Types.js
|
|
354
|
-
var FALSY_TYPE_KINDS = [
|
|
355
|
-
"undefined",
|
|
356
|
-
"null"
|
|
357
|
-
];
|
|
358
|
-
var LITERAL_TYPE_KINDS = [
|
|
359
|
-
"true",
|
|
360
|
-
"false",
|
|
361
|
-
"stringLiteral",
|
|
362
|
-
"numericLiteral"
|
|
363
|
-
];
|
|
364
|
-
var WIDE_TYPE_KINDS = [
|
|
365
|
-
"string",
|
|
366
|
-
"number",
|
|
367
|
-
"boolean"
|
|
368
|
-
];
|
|
369
|
-
var NARROW_CONTAINER_TYPE_KINDS = [
|
|
370
|
-
"object",
|
|
371
|
-
"explicitFunctions",
|
|
372
|
-
"fnType",
|
|
373
|
-
"fnWithDict",
|
|
374
|
-
"tuple",
|
|
375
|
-
"union",
|
|
376
|
-
"intersection",
|
|
377
|
-
"arrayOf"
|
|
378
|
-
];
|
|
379
|
-
var WIDE_CONTAINER_TYPE_KINDS = [
|
|
380
|
-
"anyArray",
|
|
381
|
-
"anyObject",
|
|
382
|
-
"unknownObject",
|
|
383
|
-
"anyFunction",
|
|
384
|
-
"emptyObject"
|
|
385
|
-
];
|
|
386
|
-
var TYPE_KINDS = [
|
|
387
|
-
...FALSY_TYPE_KINDS,
|
|
388
|
-
...WIDE_TYPE_KINDS,
|
|
389
|
-
...LITERAL_TYPE_KINDS,
|
|
390
|
-
...NARROW_CONTAINER_TYPE_KINDS,
|
|
391
|
-
...WIDE_CONTAINER_TYPE_KINDS
|
|
392
|
-
];
|
|
393
|
-
|
|
394
|
-
// dist/constants/Comma.js
|
|
395
|
-
var COMMA = createConstant("comma");
|
|
396
|
-
|
|
397
|
-
// dist/constants/Functional.js
|
|
398
|
-
var RESULT = {
|
|
399
|
-
Ok: "ok",
|
|
400
|
-
Err: "err"
|
|
401
|
-
};
|
|
402
|
-
var OPTION = {
|
|
403
|
-
Some: 1,
|
|
404
|
-
None: 0
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
// dist/constants/Alpha.js
|
|
408
|
-
var LOWER_ALPHA_CHARS = [
|
|
409
|
-
"a",
|
|
410
|
-
"b",
|
|
411
|
-
"c",
|
|
412
|
-
"d",
|
|
413
|
-
"e",
|
|
414
|
-
"f",
|
|
415
|
-
"g",
|
|
416
|
-
"h",
|
|
417
|
-
"i",
|
|
418
|
-
"j",
|
|
419
|
-
"k",
|
|
420
|
-
"l",
|
|
421
|
-
"m",
|
|
422
|
-
"n",
|
|
423
|
-
"o",
|
|
424
|
-
"p",
|
|
425
|
-
"q",
|
|
426
|
-
"r",
|
|
427
|
-
"s",
|
|
428
|
-
"t",
|
|
429
|
-
"u",
|
|
430
|
-
"v",
|
|
431
|
-
"w",
|
|
432
|
-
"x",
|
|
433
|
-
"y",
|
|
434
|
-
"z"
|
|
435
|
-
];
|
|
436
|
-
var UPPER_ALPHA_CHARS = [
|
|
437
|
-
"A",
|
|
438
|
-
"B",
|
|
439
|
-
"C",
|
|
440
|
-
"D",
|
|
441
|
-
"E",
|
|
442
|
-
"F",
|
|
443
|
-
"G",
|
|
444
|
-
"H",
|
|
445
|
-
"I",
|
|
446
|
-
"J",
|
|
447
|
-
"K",
|
|
448
|
-
"L",
|
|
449
|
-
"M",
|
|
450
|
-
"N",
|
|
451
|
-
"O",
|
|
452
|
-
"P",
|
|
453
|
-
"Q",
|
|
454
|
-
"R",
|
|
455
|
-
"S",
|
|
456
|
-
"T",
|
|
457
|
-
"U",
|
|
458
|
-
"V",
|
|
459
|
-
"W",
|
|
460
|
-
"X",
|
|
461
|
-
"Y",
|
|
462
|
-
"Z"
|
|
463
|
-
];
|
|
464
|
-
var ALPHA_CHARS = [
|
|
465
|
-
...LOWER_ALPHA_CHARS,
|
|
466
|
-
...UPPER_ALPHA_CHARS
|
|
467
|
-
];
|
|
468
|
-
|
|
469
|
-
// dist/constants/Consonants.js
|
|
470
|
-
var CONSONANTS = [
|
|
471
|
-
"b",
|
|
472
|
-
"c",
|
|
473
|
-
"d",
|
|
474
|
-
"f",
|
|
475
|
-
"g",
|
|
476
|
-
"h",
|
|
477
|
-
"j",
|
|
478
|
-
"k",
|
|
479
|
-
"l",
|
|
480
|
-
"m",
|
|
481
|
-
"n",
|
|
482
|
-
"p",
|
|
483
|
-
"q",
|
|
484
|
-
"r",
|
|
485
|
-
"s",
|
|
486
|
-
"t",
|
|
487
|
-
"v",
|
|
488
|
-
"w",
|
|
489
|
-
"x",
|
|
490
|
-
"z",
|
|
491
|
-
"y"
|
|
492
|
-
];
|
|
493
|
-
|
|
494
|
-
// dist/constants/PluralExceptions.js
|
|
495
|
-
var PLURAL_EXCEPTIONS_OLD = [
|
|
496
|
-
["photo", "photos"],
|
|
497
|
-
["piano", "pianos"],
|
|
498
|
-
["halo", "halos"],
|
|
499
|
-
["foot", "feet"],
|
|
500
|
-
["man", "men"],
|
|
501
|
-
["woman", "women"],
|
|
502
|
-
["person", "people"],
|
|
503
|
-
["mouse", "mice"],
|
|
504
|
-
["series", "series"],
|
|
505
|
-
["sheep", "sheep"],
|
|
506
|
-
["money", "monies"],
|
|
507
|
-
["deer", "deer"]
|
|
508
|
-
];
|
|
509
|
-
var PLURAL_EXCEPTIONS = {
|
|
510
|
-
photo: "photos",
|
|
511
|
-
piano: "pianos",
|
|
512
|
-
halo: "halos",
|
|
513
|
-
foot: "feet",
|
|
514
|
-
man: "men",
|
|
515
|
-
woman: "women",
|
|
516
|
-
person: "people",
|
|
517
|
-
mouse: "mice",
|
|
518
|
-
series: "series",
|
|
519
|
-
sheep: "sheep",
|
|
520
|
-
money: "monies",
|
|
521
|
-
deer: "deer",
|
|
522
|
-
goose: "geese",
|
|
523
|
-
child: "children",
|
|
524
|
-
tooth: "teeth",
|
|
525
|
-
ox: "oxen",
|
|
526
|
-
basis: "bases",
|
|
527
|
-
radius: "radii",
|
|
528
|
-
syllabus: "syllabi",
|
|
529
|
-
ice: "ice",
|
|
530
|
-
fish: "fish",
|
|
531
|
-
means: "means",
|
|
532
|
-
phenomenon: "phenomena",
|
|
533
|
-
criterion: "criteria",
|
|
534
|
-
datum: "data",
|
|
535
|
-
memorandum: "memoranda",
|
|
536
|
-
bacterium: "bacteria",
|
|
537
|
-
stratum: "strata",
|
|
538
|
-
curriculum: "curricula",
|
|
539
|
-
index: "indices",
|
|
540
|
-
appendix: "appendices",
|
|
541
|
-
vortex: "vortices",
|
|
542
|
-
bison: "bison",
|
|
543
|
-
axis: "axes",
|
|
544
|
-
antenna: "antennas",
|
|
545
|
-
cactus: "cacti",
|
|
546
|
-
corpus: "corpora",
|
|
547
|
-
beau: "beaux",
|
|
548
|
-
die: "dice",
|
|
549
|
-
ellipsis: "ellipses",
|
|
550
|
-
erratum: "errata",
|
|
551
|
-
focus: "foci",
|
|
552
|
-
formula: "formulas",
|
|
553
|
-
fungus: "fungi",
|
|
554
|
-
genus: "genera",
|
|
555
|
-
graffito: "graffiti",
|
|
556
|
-
grouse: "grouses",
|
|
557
|
-
half: "halves",
|
|
558
|
-
hoof: "hooves",
|
|
559
|
-
hypothesis: "hypothesis",
|
|
560
|
-
larva: "larvae",
|
|
561
|
-
libretto: "libretti",
|
|
562
|
-
loaf: "loaves",
|
|
563
|
-
locus: "loci",
|
|
564
|
-
medium: "mediums",
|
|
565
|
-
minutia: "minutiae",
|
|
566
|
-
nucleus: "nuclei",
|
|
567
|
-
oasis: "oases",
|
|
568
|
-
opus: "opuses",
|
|
569
|
-
ovum: "ova",
|
|
570
|
-
parenthesis: "parentheses",
|
|
571
|
-
phylum: "phyla",
|
|
572
|
-
quiz: "quizzes",
|
|
573
|
-
referendum: "referendums",
|
|
574
|
-
self: "selves",
|
|
575
|
-
species: "species",
|
|
576
|
-
stimulus: "stimuli",
|
|
577
|
-
swine: "swine",
|
|
578
|
-
synopsis: "synopses",
|
|
579
|
-
thesis: "theses",
|
|
580
|
-
thief: "thieves",
|
|
581
|
-
vertex: "vertexes",
|
|
582
|
-
wife: "wives",
|
|
583
|
-
wolf: "wolves"
|
|
584
|
-
};
|
|
585
|
-
|
|
586
|
-
// dist/constants/SingularNounEnding.js
|
|
587
|
-
var SINGULAR_NOUN_ENDINGS = [
|
|
588
|
-
"s",
|
|
589
|
-
"sh",
|
|
590
|
-
"ch",
|
|
591
|
-
"x",
|
|
592
|
-
"z",
|
|
593
|
-
"o"
|
|
594
|
-
];
|
|
595
|
-
|
|
596
|
-
// dist/constants/CommonObjProps.js
|
|
597
|
-
var COMMON_OBJ_PROPS = [
|
|
598
|
-
"id",
|
|
599
|
-
"type",
|
|
600
|
-
"kind",
|
|
601
|
-
"_type",
|
|
602
|
-
"_kind",
|
|
603
|
-
"key",
|
|
604
|
-
"value",
|
|
605
|
-
"name"
|
|
606
|
-
];
|
|
607
|
-
|
|
608
|
-
// dist/constants/NumericChar.js
|
|
609
|
-
var NUMERIC_CHAR = [
|
|
610
|
-
"0",
|
|
611
|
-
"1",
|
|
612
|
-
"2",
|
|
613
|
-
"3",
|
|
614
|
-
"4",
|
|
615
|
-
"5",
|
|
616
|
-
"6",
|
|
617
|
-
"7",
|
|
618
|
-
"8",
|
|
619
|
-
"9"
|
|
620
|
-
];
|
|
621
|
-
var NON_ZERO_NUMERIC_CHAR = [
|
|
622
|
-
"1",
|
|
623
|
-
"2",
|
|
624
|
-
"3",
|
|
625
|
-
"4",
|
|
626
|
-
"5",
|
|
627
|
-
"6",
|
|
628
|
-
"7",
|
|
629
|
-
"8",
|
|
630
|
-
"9"
|
|
631
|
-
];
|
|
632
|
-
|
|
633
|
-
// dist/constants/NumericDigit.js
|
|
634
|
-
var NUMERIC_DIGIT = [
|
|
635
|
-
0,
|
|
636
|
-
1,
|
|
637
|
-
2,
|
|
638
|
-
3,
|
|
639
|
-
4,
|
|
640
|
-
5,
|
|
641
|
-
6,
|
|
642
|
-
7,
|
|
643
|
-
8,
|
|
644
|
-
9
|
|
645
|
-
];
|
|
646
|
-
|
|
647
|
-
// dist/constants/FalsyValues.js
|
|
648
|
-
var FALSY_VALUES = [
|
|
649
|
-
false,
|
|
650
|
-
0,
|
|
651
|
-
-0,
|
|
652
|
-
"",
|
|
653
|
-
null,
|
|
654
|
-
void 0,
|
|
655
|
-
Number.NaN
|
|
656
|
-
];
|
|
657
|
-
|
|
658
|
-
// dist/constants/NotDefined.js
|
|
659
|
-
var NOT_DEFINED = createConstant("not-defined");
|
|
660
|
-
|
|
661
|
-
// dist/constants/TypeOf.js
|
|
662
|
-
var TYPE_OF = ["string", "number", "boolean", "undefined", "symbol", "bigint", "function", "object"];
|
|
663
|
-
|
|
664
|
-
// dist/constants/Wide.js
|
|
665
|
-
var WideAssignment = {
|
|
666
|
-
boolean: () => "<<boolean>>",
|
|
667
|
-
string: () => "<<string>>",
|
|
668
|
-
number: () => "<<number>>",
|
|
669
|
-
symbol: () => "<<symbol>>",
|
|
670
|
-
null: () => "<<null>>",
|
|
671
|
-
function: () => "<<function>>",
|
|
672
|
-
tuple: () => "<<tuple>>",
|
|
673
|
-
singularTuple: () => ["<<tuple>>"],
|
|
674
|
-
object: () => "<<object>>",
|
|
675
|
-
emptyObject: () => "<<empty-object>>",
|
|
676
|
-
undefined: () => "<<undefined>>",
|
|
677
|
-
/**
|
|
678
|
-
* run-time value is a type token for `unknown` and type is of course `unknown`
|
|
679
|
-
*/
|
|
680
|
-
unknown: () => "<<unknown>>",
|
|
681
|
-
nothing: () => "<<nothing>>",
|
|
682
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
683
|
-
something: () => "<<something>>"
|
|
684
|
-
};
|
|
685
|
-
|
|
686
|
-
// dist/constants/TypeComparisons.js
|
|
687
|
-
var wide = WideAssignment;
|
|
688
|
-
var entry = (refType, desc, ...params) => [
|
|
689
|
-
refType(wide),
|
|
690
|
-
desc,
|
|
691
|
-
params.map((i) => typeof i === "function" ? i(wide) : i)
|
|
692
|
-
];
|
|
693
|
-
var TYPE_COMPARISONS = {
|
|
694
|
-
"Extends": entry((t) => t.unknown(), "extends the type", (t) => t.unknown()),
|
|
695
|
-
"NotExtends": entry((t) => t.unknown(), "does not extent the type", (t) => t.unknown()),
|
|
696
|
-
"Equals": entry((t) => t.unknown(), "equals the type", (t) => t.unknown()),
|
|
697
|
-
"NotEqual": entry((t) => t.unknown(), "does not equal the type", (t) => t.unknown()),
|
|
698
|
-
"Truthy": entry((t) => t.unknown(), "must be a truthy value"),
|
|
699
|
-
"Falsy": entry((t) => t.unknown(), "must be a falsy value"),
|
|
700
|
-
"IsSomething": entry((t) => t.unknown(), "must be 'something' (aka, not null or undefined)"),
|
|
701
|
-
"IsNothing": entry((t) => t.unknown(), "must be 'nothing' (aka, null or undefined)"),
|
|
702
|
-
"IsString": entry((t) => t.string(), "must extend a string type"),
|
|
703
|
-
"IsNumber": entry((t) => t.number(), "must extend a number type"),
|
|
704
|
-
"IsBoolean": entry((t) => t.boolean(), "must extend a boolean type"),
|
|
705
|
-
// numeric
|
|
706
|
-
"GreaterThan": entry((t) => t.number(), "must be a numeric literal greater than [[0]]", (t) => t.number()),
|
|
707
|
-
"LessThan": entry((t) => t.number(), "must be a numeric literal less than [[0]]", (t) => t.number()),
|
|
708
|
-
// string
|
|
709
|
-
"StartsWith": entry((t) => t.string(), "must be a string literal that starts with '[[0]]'", (t) => t.string()),
|
|
710
|
-
"EndsWith": entry((t) => t.string(), "must be a string literal that ends with '[[0]]'", (t) => t.string()),
|
|
711
|
-
"Includes": entry((t) => t.string(), "must be a string literal that includes the substring '[[0]]'", (t) => t.string()),
|
|
712
|
-
// function
|
|
713
|
-
"ReturnsSomething": entry((t) => t.function(), "must be a function which returns 'something' (aka, not null or undefined)"),
|
|
714
|
-
"ReturnsNothing": entry((t) => t.function(), "must be a function which returns 'nothing' (aka, null or undefined)"),
|
|
715
|
-
"ReturnsTrue": entry((t) => t.function(), "must be a function which returns 'true'"),
|
|
716
|
-
"ReturnsFalse": entry((t) => t.function(), "must be a function which returns 'false'"),
|
|
717
|
-
"ReturnsTruthy": entry((t) => t.function(), "must be a function which returns a 'truthy' value"),
|
|
718
|
-
"ReturnsFalsy": entry((t) => t.function(), "must be a function which returns a 'falsy' value"),
|
|
719
|
-
"ReturnsExtends": entry((t) => t.unknown(), "must be a function which returns a value which extends [[0]]", (t) => t.unknown()),
|
|
720
|
-
"ReturnsEquals": entry((t) => t.unknown(), "must be a function which returns a value which equals [[0]]", (t) => t.unknown()),
|
|
721
|
-
"Contains": entry((t) => t.tuple(), "must be a tuple and have elements that extends the value [[0]]", (t) => t.unknown()),
|
|
722
|
-
// TODO: get the below working`
|
|
723
|
-
"ContainsSome": entry((t) => t.tuple(), "must be a tuple and have elements that extends the value [[0]]", (t) => t.singularTuple())
|
|
724
|
-
};
|
|
725
|
-
|
|
726
|
-
// dist/constants/TypeTransforms.js
|
|
727
|
-
var t_unknown = "<<unknown>>";
|
|
728
|
-
var t_string = "<<string>>";
|
|
729
|
-
var t_number = "<<number>>";
|
|
730
|
-
var t_union_string_tuple = "<<union:string,tuple>>";
|
|
731
|
-
var TYPE_TRANSFORMS = {
|
|
732
|
-
Identity: [t_unknown, [], "a transform which returns the same value passed in"],
|
|
733
|
-
ToNever: [t_unknown, [], "converts all incoming types to the Never type"],
|
|
734
|
-
ToString: [t_unknown, [], "ensures that any incoming type is converted to a string variant of that value"],
|
|
735
|
-
ToBoolean: [t_unknown, [], `uses Javascript's "truthiness" to convert inputs to a boolean value; with functions it will use the return type`],
|
|
736
|
-
Trim: [t_string, [], "Trims whitespace from start and end of string"],
|
|
737
|
-
TrimStart: [t_string, [], "Trims whitespace from start of string"],
|
|
738
|
-
TrimEnd: [t_string, [], "Trims whitespace from end of string"],
|
|
739
|
-
Capitalize: [t_string, [], "Converts a string input to a capitalized variant"],
|
|
740
|
-
UnCapitalize: [t_string, [], "Converts a string input to a un-capitalized variant"],
|
|
741
|
-
AllCaps: [t_string, [], "Converts a string input to all uppercase characters"],
|
|
742
|
-
Lowercase: [t_string, [], "Converts a string input to all lowercase characters"],
|
|
743
|
-
ToCamelCase: [t_string, [], "Converts a string to use the camelCase naming convention"],
|
|
744
|
-
ToKebabCase: [t_string, [], "Converts a string to use the kebab-case naming convention"],
|
|
745
|
-
ToPascalCase: [t_string, [], "Converts a string to use the PascalCase naming convention"],
|
|
746
|
-
ToSnakeCase: [t_string, [], "Converts a string to use the snake_case naming convention"],
|
|
747
|
-
StripLeading: [t_string, [t_string], "Strips a string literal from the beginning of a string (if it exists)"],
|
|
748
|
-
StripTrailing: [t_string, [t_string], "Strips a string literal from the end of a string (if it exists)"],
|
|
749
|
-
EnsureLeading: [t_string, [t_string], "Ensures a string literal is at the beginning of a string (with no change if it already was)"],
|
|
750
|
-
EnsureTrailing: [t_string, [t_string], "Ensures a string literal is at the end of a string (with no change if it already was)"],
|
|
751
|
-
ToPlural: [t_string, [], "Pluralizes a word"],
|
|
752
|
-
Surround: [t_string, [t_string, t_string], "Surrounds a string literal with a pre and post character or set of characters"],
|
|
753
|
-
Prepend: [t_union_string_tuple, [t_unknown], "Takes a string or tuple and prepends a value to the start."],
|
|
754
|
-
Append: [t_union_string_tuple, [t_unknown], "Takes a string or tuple and appends a value to the end."],
|
|
755
|
-
Increment: [t_number, [], "Increments a numeric value by one"],
|
|
756
|
-
Decrement: [t_number, [], "Decrements a numeric value by one"]
|
|
757
|
-
};
|
|
758
|
-
|
|
759
|
-
// dist/constants/Never.js
|
|
760
|
-
var Never = createConstant("never");
|
|
761
|
-
|
|
762
|
-
// dist/constants/TypeTokens.js
|
|
763
|
-
var TT_Atomics = [
|
|
764
|
-
"undefined",
|
|
765
|
-
"null",
|
|
766
|
-
"boolean",
|
|
767
|
-
"true",
|
|
768
|
-
"false"
|
|
769
|
-
];
|
|
770
|
-
var TT_Singletons = [
|
|
771
|
-
"string",
|
|
772
|
-
"number"
|
|
773
|
-
];
|
|
774
|
-
var TT_Sets = [
|
|
775
|
-
"string-set",
|
|
776
|
-
"numeric-set",
|
|
777
|
-
"union-set"
|
|
778
|
-
];
|
|
779
|
-
var TT_Functions = [
|
|
780
|
-
"fn",
|
|
781
|
-
"gen"
|
|
782
|
-
];
|
|
783
|
-
var TT_Containers = [
|
|
784
|
-
"rec",
|
|
785
|
-
"arr",
|
|
786
|
-
"set",
|
|
787
|
-
"map",
|
|
788
|
-
"union",
|
|
789
|
-
"obj",
|
|
790
|
-
"tuple"
|
|
791
|
-
];
|
|
792
|
-
var TT_START = "<<";
|
|
793
|
-
var TT_STOP = ">>";
|
|
794
|
-
var TT_SEP = "::";
|
|
795
|
-
var TYPE_TOKEN_IDENTITIES = [
|
|
796
|
-
"string",
|
|
797
|
-
"number",
|
|
798
|
-
"numericString",
|
|
799
|
-
"booleanString",
|
|
800
|
-
"null",
|
|
801
|
-
"undefined",
|
|
802
|
-
"boolean",
|
|
803
|
-
"true",
|
|
804
|
-
"false",
|
|
805
|
-
"space",
|
|
806
|
-
"whitespace",
|
|
807
|
-
"object",
|
|
808
|
-
"emptyObject",
|
|
809
|
-
"function",
|
|
810
|
-
"array"
|
|
811
|
-
];
|
|
812
|
-
var TYPE_TOKEN_PARAM_STR = [
|
|
813
|
-
"explicitClass",
|
|
814
|
-
"startsWith",
|
|
815
|
-
"endsWith",
|
|
816
|
-
"ensureLeading",
|
|
817
|
-
"stripLeading",
|
|
818
|
-
"ensureTrailing",
|
|
819
|
-
"stripTrailing",
|
|
820
|
-
"camelCase",
|
|
821
|
-
"pascalCase",
|
|
822
|
-
"snakeCase",
|
|
823
|
-
"kebabCase",
|
|
824
|
-
"explicitType"
|
|
825
|
-
];
|
|
826
|
-
var TYPE_TOKEN_PARAM_CSV = [
|
|
827
|
-
"stringLiteral",
|
|
828
|
-
"numericLiteral",
|
|
829
|
-
"objectLiteral",
|
|
830
|
-
"tuple",
|
|
831
|
-
"union"
|
|
832
|
-
];
|
|
833
|
-
var TYPE_TOKEN_PARAM_DATETIME = [
|
|
834
|
-
"datetime"
|
|
835
|
-
];
|
|
836
|
-
var TYPE_TOKEN_PARAM_DATE = [
|
|
837
|
-
"ymd",
|
|
838
|
-
"monthThenDate",
|
|
839
|
-
"dateThenMonth"
|
|
840
|
-
];
|
|
841
|
-
var TYPE_TOKEN_PARAM_TIME = [
|
|
842
|
-
"timeInMinutes",
|
|
843
|
-
"timeInSeconds",
|
|
844
|
-
"militaryTimeInMinutes",
|
|
845
|
-
"militaryTimeInSeconds",
|
|
846
|
-
"militaryTimeInMilliseconds",
|
|
847
|
-
"civilianTimeInMinutes"
|
|
848
|
-
];
|
|
849
|
-
var TYPE_TOKEN_ALL = [
|
|
850
|
-
...TYPE_TOKEN_IDENTITIES,
|
|
851
|
-
...TYPE_TOKEN_PARAM_CSV,
|
|
852
|
-
...TYPE_TOKEN_PARAM_DATE,
|
|
853
|
-
...TYPE_TOKEN_PARAM_DATETIME,
|
|
854
|
-
...TYPE_TOKEN_PARAM_STR,
|
|
855
|
-
...TYPE_TOKEN_PARAM_TIME
|
|
856
|
-
];
|
|
857
|
-
|
|
858
|
-
// dist/constants/Shape.js
|
|
859
|
-
var SHAPE_PREFIXES = [
|
|
860
|
-
"string",
|
|
861
|
-
"number",
|
|
862
|
-
"boolean",
|
|
863
|
-
"null",
|
|
864
|
-
"undefined",
|
|
865
|
-
"unknown",
|
|
866
|
-
"opt::",
|
|
867
|
-
"union::",
|
|
868
|
-
"tuple::",
|
|
869
|
-
"array::",
|
|
870
|
-
"object",
|
|
871
|
-
"record::"
|
|
872
|
-
];
|
|
873
|
-
var SHAPE_DELIMITER = "||,||";
|
|
874
|
-
|
|
875
|
-
// dist/constants/Marked.js
|
|
876
|
-
var MARKED = createConstant("Marked");
|
|
877
|
-
|
|
878
|
-
// dist/constants/HashTable.js
|
|
879
|
-
var HASH_TABLE_WIDE = {
|
|
880
|
-
string: "318",
|
|
881
|
-
number: "523",
|
|
882
|
-
boolean: "21",
|
|
883
|
-
never: "!!!",
|
|
884
|
-
unknown: "ed",
|
|
885
|
-
undefined: "ce",
|
|
886
|
-
null: "cc",
|
|
887
|
-
symbol: "78",
|
|
888
|
-
object: "fe8",
|
|
889
|
-
array: "17",
|
|
890
|
-
record: "ee",
|
|
891
|
-
map: "e65",
|
|
892
|
-
weakMap: "e64",
|
|
893
|
-
set: "f62",
|
|
894
|
-
union: "f61"
|
|
895
|
-
};
|
|
896
|
-
var HASH_TABLE_ALPHA_LOWER = {
|
|
897
|
-
"a": "8",
|
|
898
|
-
"b": "~",
|
|
899
|
-
"c": "^",
|
|
900
|
-
"d": ".",
|
|
901
|
-
"e": "82",
|
|
902
|
-
"f": "89",
|
|
903
|
-
"g": ",",
|
|
904
|
-
"h": "!",
|
|
905
|
-
"i": "-7",
|
|
906
|
-
"j": "-8",
|
|
907
|
-
"k": "88",
|
|
908
|
-
"l": "8f",
|
|
909
|
-
"m": "8e",
|
|
910
|
-
"n": "6e",
|
|
911
|
-
"o": "44",
|
|
912
|
-
"p": "60",
|
|
913
|
-
"q": "61",
|
|
914
|
-
"r": "71",
|
|
915
|
-
"s": ":",
|
|
916
|
-
"t": "-45",
|
|
917
|
-
"u": "-5",
|
|
918
|
-
"v": "-9",
|
|
919
|
-
"w": "-f",
|
|
920
|
-
"x": "+1",
|
|
921
|
-
"y": ";",
|
|
922
|
-
"z": "*1"
|
|
923
|
-
};
|
|
924
|
-
var HASH_TABLE_SPECIAL = {
|
|
925
|
-
"!": "1",
|
|
926
|
-
"@": "8",
|
|
927
|
-
"#": "5",
|
|
928
|
-
"$": "4",
|
|
929
|
-
"%": "3",
|
|
930
|
-
"^": "2",
|
|
931
|
-
"&": "9",
|
|
932
|
-
"*": "7",
|
|
933
|
-
"(": "6",
|
|
934
|
-
")": "12",
|
|
935
|
-
"{": "33",
|
|
936
|
-
"}": "54",
|
|
937
|
-
"[": "x8",
|
|
938
|
-
"]": "y4",
|
|
939
|
-
":": "z2",
|
|
940
|
-
";": "e88",
|
|
941
|
-
'"': "c11",
|
|
942
|
-
"'": "c12",
|
|
943
|
-
"<": "p3",
|
|
944
|
-
",": "45",
|
|
945
|
-
">": "e9",
|
|
946
|
-
".": "f2",
|
|
947
|
-
"?": "ee",
|
|
948
|
-
"/": "u9",
|
|
949
|
-
"\\": "f9",
|
|
950
|
-
"|": "q1",
|
|
951
|
-
"~": "fe",
|
|
952
|
-
"`": "8e"
|
|
953
|
-
};
|
|
954
|
-
var HASH_TABLE_DIGIT = {
|
|
955
|
-
"0": "-2",
|
|
956
|
-
"1": "-9",
|
|
957
|
-
"2": "ff",
|
|
958
|
-
"3": "fe",
|
|
959
|
-
"4": "2e",
|
|
960
|
-
"5": "cd",
|
|
961
|
-
"6": "54",
|
|
962
|
-
"7": "27",
|
|
963
|
-
"8": "49",
|
|
964
|
-
"9": "51"
|
|
965
|
-
};
|
|
966
|
-
var HASH_TABLE_ALPHA_UPPER = {
|
|
967
|
-
"A": "b8",
|
|
968
|
-
"B": "~9",
|
|
969
|
-
"C": "6^",
|
|
970
|
-
"D": ".8",
|
|
971
|
-
"E": "5<",
|
|
972
|
-
"F": ">7",
|
|
973
|
-
"G": "1,",
|
|
974
|
-
"H": "!7",
|
|
975
|
-
"I": "8#",
|
|
976
|
-
"J": "@9",
|
|
977
|
-
"K": "1*",
|
|
978
|
-
"L": "4&",
|
|
979
|
-
"M": "+5",
|
|
980
|
-
"N": "j|",
|
|
981
|
-
"O": "-l",
|
|
982
|
-
"P": "q{",
|
|
983
|
-
"Q": "]9",
|
|
984
|
-
"R": "f%",
|
|
985
|
-
"S": ":3",
|
|
986
|
-
"T": "?+",
|
|
987
|
-
"U": "}5",
|
|
988
|
-
"V": "'4",
|
|
989
|
-
"W": "1@g",
|
|
990
|
-
"X": "0+1",
|
|
991
|
-
"Y": "4;",
|
|
992
|
-
"Z": "a*1"
|
|
993
|
-
};
|
|
994
|
-
var HASH_TABLE_CHAR = {
|
|
995
|
-
...HASH_TABLE_ALPHA_LOWER,
|
|
996
|
-
...HASH_TABLE_ALPHA_UPPER,
|
|
997
|
-
...HASH_TABLE_SPECIAL
|
|
998
|
-
};
|
|
999
|
-
var HASH_TABLE_OTHER = "999";
|
|
1000
|
-
|
|
1001
|
-
// dist/constants/Geo.js
|
|
1002
|
-
var US_STATE_LOOKUP_STRICT = [
|
|
1003
|
-
{ name: "Alabama", abbrev: "AL" },
|
|
1004
|
-
{ name: "Alaska", abbrev: "AK" },
|
|
1005
|
-
{ name: "Arizona", abbrev: "AZ" },
|
|
1006
|
-
{ name: "Arkansas", abbrev: "AR" },
|
|
1007
|
-
{ name: "California", abbrev: "CA" },
|
|
1008
|
-
{ name: "Colorado", abbrev: "CO" },
|
|
1009
|
-
{ name: "Connecticut", abbrev: "CT" },
|
|
1010
|
-
{ name: "Delaware", abbrev: "DE" },
|
|
1011
|
-
{ name: "Florida", abbrev: "FL" },
|
|
1012
|
-
{ name: "Georgia", abbrev: "GA" },
|
|
1013
|
-
{ name: "Hawaii", abbrev: "HI" },
|
|
1014
|
-
{ name: "Idaho", abbrev: "ID" },
|
|
1015
|
-
{ name: "Illinois", abbrev: "IL" },
|
|
1016
|
-
{ name: "Indiana", abbrev: "IN" },
|
|
1017
|
-
{ name: "Iowa", abbrev: "IA" },
|
|
1018
|
-
{ name: "Kansas", abbrev: "KS" },
|
|
1019
|
-
{ name: "Kentucky", abbrev: "KY" },
|
|
1020
|
-
{ name: "Louisiana", abbrev: "LA" },
|
|
1021
|
-
{ name: "Maine", abbrev: "ME" },
|
|
1022
|
-
{ name: "Maryland", abbrev: "MD" },
|
|
1023
|
-
{ name: "Massachusetts", abbrev: "MA" },
|
|
1024
|
-
{ name: "Michigan", abbrev: "MI" },
|
|
1025
|
-
{ name: "Minnesota", abbrev: "MN" },
|
|
1026
|
-
{ name: "Mississippi", abbrev: "MS" },
|
|
1027
|
-
{ name: "Missouri", abbrev: "MO" },
|
|
1028
|
-
{ name: "Montana", abbrev: "MT" },
|
|
1029
|
-
{ name: "Nebraska", abbrev: "NE" },
|
|
1030
|
-
{ name: "Nevada", abbrev: "NV" },
|
|
1031
|
-
{ name: "New Hampshire", abbrev: "NH" },
|
|
1032
|
-
{ name: "New Jersey", abbrev: "NJ" },
|
|
1033
|
-
{ name: "New Mexico", abbrev: "NM" },
|
|
1034
|
-
{ name: "New York", abbrev: "NY" },
|
|
1035
|
-
{ name: "North Carolina", abbrev: "NC" },
|
|
1036
|
-
{ name: "North Dakota", abbrev: "ND" },
|
|
1037
|
-
{ name: "Ohio", abbrev: "OH" },
|
|
1038
|
-
{ name: "Oklahoma", abbrev: "OK" },
|
|
1039
|
-
{ name: "Oregon", abbrev: "OR" },
|
|
1040
|
-
{ name: "Pennsylvania", abbrev: "PA" },
|
|
1041
|
-
{ name: "Rhode Island", abbrev: "RI" },
|
|
1042
|
-
{ name: "South Carolina", abbrev: "SC" },
|
|
1043
|
-
{ name: "South Dakota", abbrev: "SD" },
|
|
1044
|
-
{ name: "Tennessee", abbrev: "TN" },
|
|
1045
|
-
{ name: "Texas", abbrev: "TX" },
|
|
1046
|
-
{ name: "Utah", abbrev: "UT" },
|
|
1047
|
-
{ name: "Vermont", abbrev: "VT" },
|
|
1048
|
-
{ name: "Virginia", abbrev: "VA" },
|
|
1049
|
-
{ name: "Washington", abbrev: "WA" },
|
|
1050
|
-
{ name: "West Virginia", abbrev: "WV" },
|
|
1051
|
-
{ name: "Wisconsin", abbrev: "WI" },
|
|
1052
|
-
{ name: "Wyoming", abbrev: "WY" }
|
|
1053
|
-
];
|
|
1054
|
-
var US_STATE_LOOKUP_PROVINCES = [
|
|
1055
|
-
{ name: "Puerto Rico", abbrev: "PR" },
|
|
1056
|
-
{ name: "Virgin Islands", abbrev: "VI" },
|
|
1057
|
-
{ name: "Palau", abbrev: "PW" },
|
|
1058
|
-
{ name: "Federated States of Micronesia", abbrev: "FM" },
|
|
1059
|
-
{ name: "Northern Mariana Islands", abbrev: "MP" },
|
|
1060
|
-
{ name: "District of Columbia", abbrev: "DC" },
|
|
1061
|
-
{ name: "Marshall Islands", abbrev: "MH" },
|
|
1062
|
-
{ name: "American Samoa", abbrev: "AS" },
|
|
1063
|
-
{ name: "Guam", abbrev: "GU" }
|
|
1064
|
-
];
|
|
1065
|
-
var US_STATE_LOOKUP = [
|
|
1066
|
-
...US_STATE_LOOKUP_STRICT,
|
|
1067
|
-
...US_STATE_LOOKUP_PROVINCES
|
|
1068
|
-
];
|
|
1069
|
-
var ZIP_TO_STATE = {
|
|
1070
|
-
"0": ["CT", "MA", "ME", "NH", "NJ", "NY", "PR", "RI", "VT", "VI"],
|
|
1071
|
-
"1": ["DE", "NY", "PA"],
|
|
1072
|
-
"2": ["DC", "MD", "NC", "SC", "VA", "WV"],
|
|
1073
|
-
"3": ["AL", "FL", "GA", "MS", "TN"],
|
|
1074
|
-
"4": ["IN", "KY", "MI", "OH"],
|
|
1075
|
-
"5": ["IA", "MN", "MT", "ND", "SD", "WI"],
|
|
1076
|
-
"6": ["IL", "KS", "MO", "NE"],
|
|
1077
|
-
"7": ["AR", "LA", "OK", "TX"],
|
|
1078
|
-
"8": ["AZ", "CO", "ID", "NM", "NV", "UT", "WY"],
|
|
1079
|
-
"9": ["AK", "AS", "CA", "GU", "HI", "MH", "FM", "MP", "OR", "PW", "WA"]
|
|
1080
|
-
};
|
|
1081
|
-
|
|
1082
|
-
// dist/constants/RepoConstants.js
|
|
1083
|
-
var REPO_SOURCES = [
|
|
1084
|
-
"github",
|
|
1085
|
-
"bitbucket",
|
|
1086
|
-
"gitlab",
|
|
1087
|
-
"codecommit",
|
|
1088
|
-
"local"
|
|
1089
|
-
];
|
|
1090
|
-
var REPO_PAGE_TYPES = [
|
|
1091
|
-
"repo",
|
|
1092
|
-
"commits",
|
|
1093
|
-
"author",
|
|
1094
|
-
"org",
|
|
1095
|
-
"profile",
|
|
1096
|
-
"issues",
|
|
1097
|
-
"actions",
|
|
1098
|
-
"followers",
|
|
1099
|
-
"following",
|
|
1100
|
-
"docs",
|
|
1101
|
-
"unknown"
|
|
1102
|
-
];
|
|
1103
|
-
var REPO_SOURCE_LOOKUP = {
|
|
1104
|
-
"github": [`github.com`, "github.io"],
|
|
1105
|
-
"bitbucket": ["bitbucket.com"],
|
|
1106
|
-
"gitlab": ["gitlab.com"],
|
|
1107
|
-
"codecommit": ["https://aws.amazon.com/codecommit/"],
|
|
1108
|
-
"local": []
|
|
1109
|
-
};
|
|
1110
|
-
var GITHUB_INSIGHT_CATEGORY_LOOKUP = {
|
|
1111
|
-
pulse: "pulse",
|
|
1112
|
-
contributors: "graphs/contributors",
|
|
1113
|
-
community: "graphs/community",
|
|
1114
|
-
standards: "community",
|
|
1115
|
-
traffic: "graphs/traffic",
|
|
1116
|
-
commits: "graphs/commit-activity",
|
|
1117
|
-
code_frequency: "graphs/code-frequency",
|
|
1118
|
-
dependencies: "network/dependencies",
|
|
1119
|
-
dependents: "network/dependents",
|
|
1120
|
-
dependabot: "network/updates",
|
|
1121
|
-
network: "network",
|
|
1122
|
-
forks: "forks",
|
|
1123
|
-
people: "people"
|
|
1124
|
-
};
|
|
1125
|
-
|
|
1126
|
-
// dist/constants/NetworkConstants.js
|
|
1127
|
-
var IPv6 = {
|
|
1128
|
-
"Loopback": "::1/128",
|
|
1129
|
-
"Multicast": "ff00::/8",
|
|
1130
|
-
"IPv4MappedAddresses": "::FFFF:0:0/96",
|
|
1131
|
-
"Unicast": "fe80::/10",
|
|
1132
|
-
"DocumentationAddresses": "2001:db8::/32"
|
|
1133
|
-
};
|
|
1134
|
-
var IPv4 = {
|
|
1135
|
-
"Loopback": "127.0.0.1"
|
|
1136
|
-
};
|
|
1137
|
-
var NETWORK_PROTOCOL_LOOKUP = {
|
|
1138
|
-
http: ["http", "https"],
|
|
1139
|
-
ftp: ["ftp", "sftp"],
|
|
1140
|
-
file: ["", "file"],
|
|
1141
|
-
ws: ["ws", "wss"],
|
|
1142
|
-
ssh: ["", "ssh"],
|
|
1143
|
-
"scp": ["", "scp"]
|
|
1144
|
-
};
|
|
1145
|
-
var TOP_LEVEL_DOMAINS = [
|
|
1146
|
-
"com",
|
|
1147
|
-
"org",
|
|
1148
|
-
"net",
|
|
1149
|
-
"int",
|
|
1150
|
-
"edu",
|
|
1151
|
-
"gov",
|
|
1152
|
-
"io",
|
|
1153
|
-
"mil",
|
|
1154
|
-
"arpa",
|
|
1155
|
-
"academy",
|
|
1156
|
-
"agency",
|
|
1157
|
-
"analytics",
|
|
1158
|
-
"app",
|
|
1159
|
-
"art",
|
|
1160
|
-
"bet",
|
|
1161
|
-
"beer",
|
|
1162
|
-
"book",
|
|
1163
|
-
"coffee",
|
|
1164
|
-
"dot",
|
|
1165
|
-
"doctor",
|
|
1166
|
-
"dog",
|
|
1167
|
-
"family",
|
|
1168
|
-
"game",
|
|
1169
|
-
"guide",
|
|
1170
|
-
"guru",
|
|
1171
|
-
"info",
|
|
1172
|
-
"inc",
|
|
1173
|
-
"news",
|
|
1174
|
-
"new",
|
|
1175
|
-
"ninja",
|
|
1176
|
-
"now",
|
|
1177
|
-
"online",
|
|
1178
|
-
"page",
|
|
1179
|
-
"photos",
|
|
1180
|
-
"place",
|
|
1181
|
-
"pub",
|
|
1182
|
-
"room",
|
|
1183
|
-
"show",
|
|
1184
|
-
"technology",
|
|
1185
|
-
"tel",
|
|
1186
|
-
"tech",
|
|
1187
|
-
"team",
|
|
1188
|
-
"talk",
|
|
1189
|
-
"travel",
|
|
1190
|
-
"website",
|
|
1191
|
-
"work",
|
|
1192
|
-
"works",
|
|
1193
|
-
"wow",
|
|
1194
|
-
"uk",
|
|
1195
|
-
"us",
|
|
1196
|
-
"fr",
|
|
1197
|
-
"de",
|
|
1198
|
-
"eu",
|
|
1199
|
-
"london"
|
|
1200
|
-
];
|
|
1201
|
-
|
|
1202
|
-
// dist/constants/Characters.js
|
|
1203
|
-
var WHITESPACE_CHARS = [
|
|
1204
|
-
" ",
|
|
1205
|
-
"\n",
|
|
1206
|
-
" "
|
|
1207
|
-
];
|
|
1208
|
-
|
|
1209
|
-
// dist/constants/Phone.js
|
|
1210
|
-
var PHONE_FORMAT = [
|
|
1211
|
-
"Dashed (e.g., 456-555-1212)",
|
|
1212
|
-
"Dotted (e.g., 456.555.1212)",
|
|
1213
|
-
"ParaSpaced (e.g., (456) 555 1212)",
|
|
1214
|
-
"ParaDashed (e.g., (456) 555-1212)"
|
|
1215
|
-
];
|
|
1216
|
-
var PHONE_COUNTRY_CODES = [
|
|
1217
|
-
["886", "TWN", "TW"],
|
|
1218
|
-
["93", "AFG", "AF"],
|
|
1219
|
-
["355", "ALB", "AL"],
|
|
1220
|
-
["213", "DZA", "DZ"],
|
|
1221
|
-
["1-684", "ASM", "AS"],
|
|
1222
|
-
["376", "AND", "AD"],
|
|
1223
|
-
["244", "AGO", "AO"],
|
|
1224
|
-
["1-264", "AIA", "AI"],
|
|
1225
|
-
["672", "ATA", "AQ"],
|
|
1226
|
-
["1-268", "ATG", "AG"],
|
|
1227
|
-
["54", "ARG", "AR"],
|
|
1228
|
-
["374", "ARM", "AM"],
|
|
1229
|
-
["297", "ABW", "AW"],
|
|
1230
|
-
["61", "AUS", "AU"],
|
|
1231
|
-
["43", "AUT", "AT"],
|
|
1232
|
-
["994", "AZE", "AZ"],
|
|
1233
|
-
["1-242", "BHS", "BS"],
|
|
1234
|
-
["973", "BHR", "BH"],
|
|
1235
|
-
["880", "BGD", "BD"],
|
|
1236
|
-
["1-246", "BRB", "BB"],
|
|
1237
|
-
["375", "BLR", "BY"],
|
|
1238
|
-
["32", "BEL", "BE"],
|
|
1239
|
-
["501", "BLZ", "BZ"],
|
|
1240
|
-
["229", "BEN", "BJ"],
|
|
1241
|
-
["1-441", "BMU", "BM"],
|
|
1242
|
-
["975", "BTN", "BT"],
|
|
1243
|
-
["591", "BOL", "BO"],
|
|
1244
|
-
["599", "BES", "BQ"],
|
|
1245
|
-
["387", "BIH", "BA"],
|
|
1246
|
-
["267", "BWA", "BW"],
|
|
1247
|
-
["47", "BVT", "BV"],
|
|
1248
|
-
["55", "BRA", "BR"],
|
|
1249
|
-
["246", "IOT", "IO"],
|
|
1250
|
-
["1-284", "VGB", "VG"],
|
|
1251
|
-
["673", "BRN", "BN"],
|
|
1252
|
-
["359", "BGR", "BG"],
|
|
1253
|
-
["226", "BFA", "BF"],
|
|
1254
|
-
["257", "BDI", "BI"],
|
|
1255
|
-
["238", "CPV", "CV"],
|
|
1256
|
-
["855", "KHM", "KH"],
|
|
1257
|
-
["237", "CMR", "CM"],
|
|
1258
|
-
["1", "CAN", "CA"],
|
|
1259
|
-
["1-345", "CYM", "KY"],
|
|
1260
|
-
["236", "CAF", "CF"],
|
|
1261
|
-
["235", "TCD", "TD"],
|
|
1262
|
-
["56", "CHL", "CL"],
|
|
1263
|
-
["86", "CHN", "CN"],
|
|
1264
|
-
["852", "HKG", "HK"],
|
|
1265
|
-
["853", "MAC", "MO"],
|
|
1266
|
-
["61", "CXR", "CX"],
|
|
1267
|
-
["61", "CCK", "CC"],
|
|
1268
|
-
["57", "COL", "CO"],
|
|
1269
|
-
["269", "COM", "KM"],
|
|
1270
|
-
["242", "COG", "CG"],
|
|
1271
|
-
["682", "COK", "CK"],
|
|
1272
|
-
["506", "CRI", "CR"],
|
|
1273
|
-
["385", "HRV", "HR"],
|
|
1274
|
-
["53", "CUB", "CU"],
|
|
1275
|
-
["599", "CUW", "CW"],
|
|
1276
|
-
["357", "CYP", "CY"],
|
|
1277
|
-
["420", "CZE", "CZ"],
|
|
1278
|
-
["225", "CIV", "CI"],
|
|
1279
|
-
["850", "PRK", "KP"],
|
|
1280
|
-
["243", "COD", "CD"],
|
|
1281
|
-
["45", "DNK", "DK"],
|
|
1282
|
-
["253", "DJI", "DJ"],
|
|
1283
|
-
["1-767", "DMA", "DM"],
|
|
1284
|
-
["1-809", "DOM", "DO"],
|
|
1285
|
-
["1-829", "DOM", "DO"],
|
|
1286
|
-
["1-849", "DOM", "DO"],
|
|
1287
|
-
["593", "ECU", "EC"],
|
|
1288
|
-
["20", "EGY", "EG"],
|
|
1289
|
-
["503", "SLV", "SV"],
|
|
1290
|
-
["240", "GNQ", "GQ"],
|
|
1291
|
-
["291", "ERI", "ER"],
|
|
1292
|
-
["372", "EST", "EE"],
|
|
1293
|
-
["268", "SWZ", "SZ"],
|
|
1294
|
-
["251", "ETH", "ET"],
|
|
1295
|
-
["500", "FLK", "FK"],
|
|
1296
|
-
["298", "FRO", "FO"],
|
|
1297
|
-
["679", "FJI", "FJ"],
|
|
1298
|
-
["358", "FIN", "FI"],
|
|
1299
|
-
["33", "FRA", "FR"],
|
|
1300
|
-
["594", "GUF", "GF"],
|
|
1301
|
-
["689", "PYF", "PF"],
|
|
1302
|
-
["262", "ATF", "TF"],
|
|
1303
|
-
["241", "GAB", "GA"],
|
|
1304
|
-
["220", "GMB", "GM"],
|
|
1305
|
-
["995", "GEO", "GE"],
|
|
1306
|
-
["49", "DEU", "DE"],
|
|
1307
|
-
["233", "GHA", "GH"],
|
|
1308
|
-
["350", "GIB", "GI"],
|
|
1309
|
-
["30", "GRC", "GR"],
|
|
1310
|
-
["299", "GRL", "GL"],
|
|
1311
|
-
["1-473", "GRD", "GD"],
|
|
1312
|
-
["590", "GLP", "GP"],
|
|
1313
|
-
["1-671", "GUM", "GU"],
|
|
1314
|
-
["502", "GTM", "GT"],
|
|
1315
|
-
["44", "GGY", "GG"],
|
|
1316
|
-
["224", "GIN", "GN"],
|
|
1317
|
-
["245", "GNB", "GW"],
|
|
1318
|
-
["592", "GUY", "GY"],
|
|
1319
|
-
["509", "HTI", "HT"],
|
|
1320
|
-
["672", "HMD", "HM"],
|
|
1321
|
-
["39-06", "VAT", "VA"],
|
|
1322
|
-
["504", "HND", "HN"],
|
|
1323
|
-
["36", "HUN", "HU"],
|
|
1324
|
-
["354", "ISL", "IS"],
|
|
1325
|
-
["91", "IND", "IN"],
|
|
1326
|
-
["62", "IDN", "ID"],
|
|
1327
|
-
["98", "IRN", "IR"],
|
|
1328
|
-
["964", "IRQ", "IQ"],
|
|
1329
|
-
["353", "IRL", "IE"],
|
|
1330
|
-
["44", "IMN", "IM"],
|
|
1331
|
-
["972", "ISR", "IL"],
|
|
1332
|
-
["39", "ITA", "IT"],
|
|
1333
|
-
["1-876", "JAM", "JM"],
|
|
1334
|
-
["81", "JPN", "JP"],
|
|
1335
|
-
["44", "JEY", "JE"],
|
|
1336
|
-
["962", "JOR", "JO"],
|
|
1337
|
-
["7", "KAZ", "KZ"],
|
|
1338
|
-
["254", "KEN", "KE"],
|
|
1339
|
-
["686", "KIR", "KI"],
|
|
1340
|
-
["965", "KWT", "KW"],
|
|
1341
|
-
["996", "KGZ", "KG"],
|
|
1342
|
-
["856", "LAO", "LA"],
|
|
1343
|
-
["371", "LVA", "LV"],
|
|
1344
|
-
["961", "LBN", "LB"],
|
|
1345
|
-
["266", "LSO", "LS"],
|
|
1346
|
-
["231", "LBR", "LR"],
|
|
1347
|
-
["218", "LBY", "LY"],
|
|
1348
|
-
["423", "LIE", "LI"],
|
|
1349
|
-
["370", "LTU", "LT"],
|
|
1350
|
-
["352", "LUX", "LU"],
|
|
1351
|
-
["261", "MDG", "MG"],
|
|
1352
|
-
["265", "MWI", "MW"],
|
|
1353
|
-
["60", "MYS", "MY"],
|
|
1354
|
-
["960", "MDV", "MV"],
|
|
1355
|
-
["223", "MLI", "ML"],
|
|
1356
|
-
["356", "MLT", "MT"],
|
|
1357
|
-
["692", "MHL", "MH"],
|
|
1358
|
-
["596", "MTQ", "MQ"],
|
|
1359
|
-
["222", "MRT", "MR"],
|
|
1360
|
-
["230", "MUS", "MU"],
|
|
1361
|
-
["262", "MYT", "YT"],
|
|
1362
|
-
["52", "MEX", "MX"],
|
|
1363
|
-
["691", "FSM", "FM"],
|
|
1364
|
-
["377", "MCO", "MC"],
|
|
1365
|
-
["976", "MNG", "MN"],
|
|
1366
|
-
["382", "MNE", "ME"],
|
|
1367
|
-
["1-664", "MSR", "MS"],
|
|
1368
|
-
["212", "MAR", "MA"],
|
|
1369
|
-
["258", "MOZ", "MZ"],
|
|
1370
|
-
["95", "MMR", "MM"],
|
|
1371
|
-
["264", "NAM", "NA"],
|
|
1372
|
-
["674", "NRU", "NR"],
|
|
1373
|
-
["977", "NPL", "NP"],
|
|
1374
|
-
["31", "NLD", "NL"],
|
|
1375
|
-
["687", "NCL", "NC"],
|
|
1376
|
-
["64", "NZL", "NZ"],
|
|
1377
|
-
["505", "NIC", "NI"],
|
|
1378
|
-
["227", "NER", "NE"],
|
|
1379
|
-
["234", "NGA", "NG"],
|
|
1380
|
-
["683", "NIU", "NU"],
|
|
1381
|
-
["672", "NFK", "NF"],
|
|
1382
|
-
["1-670", "MNP", "MP"],
|
|
1383
|
-
["47", "NOR", "NO"],
|
|
1384
|
-
["968", "OMN", "OM"],
|
|
1385
|
-
["92", "PAK", "PK"],
|
|
1386
|
-
["680", "PLW", "PW"],
|
|
1387
|
-
["507", "PAN", "PA"],
|
|
1388
|
-
["675", "PNG", "PG"],
|
|
1389
|
-
["595", "PRY", "PY"],
|
|
1390
|
-
["51", "PER", "PE"],
|
|
1391
|
-
["63", "PHL", "PH"],
|
|
1392
|
-
["870", "PCN", "PN"],
|
|
1393
|
-
["48", "POL", "PL"],
|
|
1394
|
-
["351", "PRT", "PT"],
|
|
1395
|
-
["974", "QAT", "QA"],
|
|
1396
|
-
["82", "KOR", "KR"],
|
|
1397
|
-
["373", "MDA", "MD"],
|
|
1398
|
-
["40", "ROU", "RO"],
|
|
1399
|
-
["7", "RUS", "RU"],
|
|
1400
|
-
["250", "RWA", "RW"],
|
|
1401
|
-
["262", "REU", "RE"],
|
|
1402
|
-
["590", "BLM", "BL"],
|
|
1403
|
-
["290", "SHN", "SH"],
|
|
1404
|
-
["1-869", "KNA", "KN"],
|
|
1405
|
-
["1-758", "LCA", "LC"],
|
|
1406
|
-
["590", "MAF", "MF"],
|
|
1407
|
-
["508", "SPM", "PM"],
|
|
1408
|
-
["1-784", "VCT", "VC"],
|
|
1409
|
-
["685", "WSM", "WS"],
|
|
1410
|
-
["378", "SMR", "SM"],
|
|
1411
|
-
["239", "STP", "ST"],
|
|
1412
|
-
["966", "SAU", "SA"],
|
|
1413
|
-
["221", "SEN", "SN"],
|
|
1414
|
-
["381", "SRB", "RS"],
|
|
1415
|
-
["248", "SYC", "SC"],
|
|
1416
|
-
["232", "SLE", "SL"],
|
|
1417
|
-
["65", "SGP", "SG"],
|
|
1418
|
-
["1-721", "SXM", "SX"],
|
|
1419
|
-
["421", "SVK", "SK"],
|
|
1420
|
-
["386", "SVN", "SI"],
|
|
1421
|
-
["677", "SLB", "SB"],
|
|
1422
|
-
["252", "SOM", "SO"],
|
|
1423
|
-
["27", "ZAF", "ZA"],
|
|
1424
|
-
["500", "SGS", "GS"],
|
|
1425
|
-
["211", "SSD", "SS"],
|
|
1426
|
-
["34", "ESP", "ES"],
|
|
1427
|
-
["94", "LKA", "LK"],
|
|
1428
|
-
["970", "PSE", "PS"],
|
|
1429
|
-
["249", "SDN", "SD"],
|
|
1430
|
-
["597", "SUR", "SR"],
|
|
1431
|
-
["47", "SJM", "SJ"],
|
|
1432
|
-
["46", "SWE", "SE"],
|
|
1433
|
-
["41", "CHE", "CH"],
|
|
1434
|
-
["963", "SYR", "SY"],
|
|
1435
|
-
["992", "TJK", "TJ"],
|
|
1436
|
-
["66", "THA", "TH"],
|
|
1437
|
-
["389", "MKD", "MK"],
|
|
1438
|
-
["670", "TLS", "TL"],
|
|
1439
|
-
["228", "TGO", "TG"],
|
|
1440
|
-
["690", "TKL", "TK"],
|
|
1441
|
-
["676", "TON", "TO"],
|
|
1442
|
-
["1-868", "TTO", "TT"],
|
|
1443
|
-
["216", "TUN", "TN"],
|
|
1444
|
-
["90", "TUR", "TR"],
|
|
1445
|
-
["993", "TKM", "TM"],
|
|
1446
|
-
["1-649", "TCA", "TC"],
|
|
1447
|
-
["688", "TUV", "TV"],
|
|
1448
|
-
["256", "UGA", "UG"],
|
|
1449
|
-
["380", "UKR", "UA"],
|
|
1450
|
-
["971", "ARE", "AE"],
|
|
1451
|
-
["44", "GBR", "GB"],
|
|
1452
|
-
["255", "TZA", "TZ"],
|
|
1453
|
-
["1-340", "VIR", "VI"],
|
|
1454
|
-
["1", "USA", "US"],
|
|
1455
|
-
["598", "URY", "UY"],
|
|
1456
|
-
["998", "UZB", "UZ"],
|
|
1457
|
-
["678", "VUT", "VU"],
|
|
1458
|
-
["58", "VEN", "VE"],
|
|
1459
|
-
["84", "VNM", "VN"],
|
|
1460
|
-
["681", "WLF", "WF"],
|
|
1461
|
-
["212", "ESH", "EH"],
|
|
1462
|
-
["967", "YEM", "YE"],
|
|
1463
|
-
["260", "ZMB", "ZM"],
|
|
1464
|
-
["263", "ZWE", "ZW"],
|
|
1465
|
-
["358", "ALA", "AX"]
|
|
1466
|
-
];
|
|
1467
|
-
|
|
1468
|
-
// dist/constants/ProxmoxConstants.js
|
|
1469
|
-
var PROXMOX_CT_STATE = [
|
|
1470
|
-
"started",
|
|
1471
|
-
"stopped",
|
|
1472
|
-
"enabled",
|
|
1473
|
-
"disabled",
|
|
1474
|
-
"ignored"
|
|
1475
|
-
];
|
|
1476
|
-
|
|
1477
|
-
// dist/types/dictionary/MapTo.js
|
|
1478
|
-
var toFinalizedConfig = (config) => {
|
|
1479
|
-
return { ...config, finalized: true };
|
|
1480
|
-
};
|
|
1481
|
-
var DEFAULT_ONE_TO_MANY_MAPPING = toFinalizedConfig({
|
|
1482
|
-
input: "req",
|
|
1483
|
-
output: "opt",
|
|
1484
|
-
cardinality: "I -> O[]"
|
|
1485
|
-
});
|
|
1486
|
-
var DEFAULT_ONE_TO_ONE_MAPPING = toFinalizedConfig({
|
|
1487
|
-
input: "req",
|
|
1488
|
-
output: "req",
|
|
1489
|
-
cardinality: "I -> O"
|
|
1490
|
-
});
|
|
1491
|
-
var DEFAULT_MANY_TO_ONE_MAPPING = toFinalizedConfig({
|
|
1492
|
-
input: "req",
|
|
1493
|
-
output: "req",
|
|
1494
|
-
cardinality: "I[] -> O"
|
|
1495
|
-
});
|
|
1496
|
-
var MapCardinality;
|
|
1497
|
-
(function(MapCardinality2) {
|
|
1498
|
-
MapCardinality2["OneToMany"] = "I -> O[]";
|
|
1499
|
-
MapCardinality2["OneToOne"] = "I -> O";
|
|
1500
|
-
MapCardinality2["ManyToOne"] = "I[] -> O";
|
|
1501
|
-
})(MapCardinality || (MapCardinality = {}));
|
|
1502
|
-
|
|
1503
|
-
// dist/runtime/api/defineApi.js
|
|
1504
|
-
var asEscapeFunction = (fn2) => createFnWithProps(fn2, { escape: true });
|
|
1505
|
-
var asOptionalParamFunction = (fn2) => createFnWithProps(fn2, { optionalParams: true });
|
|
1506
|
-
var asApi = (api) => isApi(api) ? api : isApiSurface(api) ? { _kind: "api", surface: api } : createErrorCondition("invalid-api");
|
|
1507
|
-
var asCallbackProp = (...args) => args;
|
|
1508
|
-
var getEscapeFunction = (api) => {
|
|
1509
|
-
const surface = api.surface;
|
|
1510
|
-
return isFunction(surface) && "escape" in surface && surface.escape === true ? surface : isObject(surface) ? surface[Object.keys(surface).find((k) => isEscapeFunction(surface[k]))] : Never;
|
|
1511
|
-
};
|
|
1512
|
-
var defaultApiHandler = (_api) => {
|
|
1513
|
-
return (_result) => {
|
|
1514
|
-
};
|
|
1515
|
-
};
|
|
1516
|
-
var cb = (api) => (cb2) => {
|
|
1517
|
-
try {
|
|
1518
|
-
return cb2(api.surface);
|
|
1519
|
-
} catch (e) {
|
|
1520
|
-
throw new Error("oops");
|
|
1521
|
-
}
|
|
1522
|
-
};
|
|
1523
|
-
var asApiCallback = (api) => cb(api);
|
|
1524
|
-
var asHandledApiCallback = (api, handler) => {
|
|
1525
|
-
let _h = handler ? handler : defaultApiHandler;
|
|
1526
|
-
let _cb = asApiCallback(api);
|
|
1527
|
-
};
|
|
1528
|
-
|
|
1529
|
-
// dist/runtime/api/handleDoneFn.js
|
|
1530
|
-
var handleDoneFn = (val, call_bare_fn = false) => {
|
|
1531
|
-
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;
|
|
1532
|
-
};
|
|
1533
|
-
|
|
1534
|
-
// dist/runtime/combinators/and.js
|
|
1535
|
-
var and = (...values) => {
|
|
1536
|
-
return values.every((i) => i === true);
|
|
1537
|
-
};
|
|
1538
|
-
|
|
1539
|
-
// dist/runtime/combinators/or.js
|
|
1540
|
-
function or(...conditions) {
|
|
1541
|
-
const values = conditions.some((v) => v === true ? true : false);
|
|
1542
|
-
return values;
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
// dist/runtime/dictionary/keysOf.js
|
|
1546
|
-
function keysOf(container) {
|
|
1547
|
-
const keys = Array.isArray(container) ? Object.keys(container).map((i) => Number(i)) : isObject(container) ? isRef(container) ? ["value"] : Object.keys(container) : [];
|
|
1548
|
-
return keys;
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
// dist/runtime/dictionary/entries.js
|
|
1552
|
-
function entries(obj) {
|
|
1553
|
-
const iterable = {
|
|
1554
|
-
*[Symbol.iterator]() {
|
|
1555
|
-
for (const k of keysOf(obj)) {
|
|
1556
|
-
yield [k, obj[k]];
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
};
|
|
1560
|
-
return iterable;
|
|
1561
|
-
}
|
|
1562
|
-
|
|
1563
|
-
// dist/runtime/dictionary/get.js
|
|
1564
|
-
function updatedDotPath(value, dotpath, segment) {
|
|
1565
|
-
return isRef(value) ? dotpath.replace(segment, `Ref(${segment})`) : dotpath;
|
|
1566
|
-
}
|
|
1567
|
-
function getValue(value, dotPath, defaultValue, handleInvalid, fullDotPath) {
|
|
1568
|
-
const pathSegments = isTruthy(dotPath) ? dotPath.split(".") : [];
|
|
1569
|
-
const idx = pathSegments[0];
|
|
1570
|
-
const hasMoreSegments = pathSegments.length > 1;
|
|
1571
|
-
const valueIsIndexable = isContainer(value) && hasIndexOf(value, idx);
|
|
1572
|
-
const hasHandler = !isSpecificConstant("not-defined")(handleInvalid);
|
|
1573
|
-
const invalidDotPath = createErrorCondition("invalid-dot-path", `The segment "${idx}" in the dotpath "${fullDotPath}" was not indexable and no default value existed on: ${JSON.stringify(value)}`);
|
|
1574
|
-
const current = hasMoreSegments ? isContainer(value) && idx in value ? getValue(indexOf(value, idx), pathSegments.join(".").replace(`${idx}.`, ""), defaultValue, handleInvalid, updatedDotPath(value, fullDotPath, idx)) : hasHandler ? handleInvalid : invalidDotPath : valueIsIndexable ? hasDefaultValue(hasDefaultValue) ? indexOf(value, idx) || defaultValue : indexOf(value, idx) : hasHandler ? handleInvalid : invalidDotPath;
|
|
1575
|
-
return current;
|
|
1576
|
-
}
|
|
1577
|
-
function get(value, dotPath, options = {
|
|
1578
|
-
defaultValue: NO_DEFAULT_VALUE,
|
|
1579
|
-
handleInvalidDotpath: NOT_DEFINED
|
|
1580
|
-
}) {
|
|
1581
|
-
const outcome = dotPath === null || dotPath === "" ? value : getValue(value, dotPath, (options == null ? void 0 : options.defaultValue) || NO_DEFAULT_VALUE, (options == null ? void 0 : options.handleInvalidDotpath) || NOT_DEFINED, String(dotPath));
|
|
1582
|
-
return outcome;
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
// dist/runtime/dictionary/omit.js
|
|
1586
|
-
function omit(obj, ...removeKeys) {
|
|
1587
|
-
const keys = Object.keys(obj);
|
|
1588
|
-
return keys.reduce((acc, key) => removeKeys.includes(key) ? acc : {
|
|
1589
|
-
...acc,
|
|
1590
|
-
[key]: obj[key]
|
|
1591
|
-
}, {});
|
|
1592
|
-
}
|
|
1593
|
-
|
|
1594
|
-
// dist/runtime/dictionary/retain.js
|
|
1595
|
-
var retain = (dict2, ...keys) => {
|
|
1596
|
-
let output = {};
|
|
1597
|
-
for (const k of keys) {
|
|
1598
|
-
output = {
|
|
1599
|
-
...output,
|
|
1600
|
-
[k]: dict2[k]
|
|
1601
|
-
};
|
|
1602
|
-
}
|
|
1603
|
-
return output;
|
|
1604
|
-
};
|
|
1605
|
-
|
|
1606
|
-
// dist/runtime/dictionary/sharedKeys.js
|
|
1607
|
-
var sharedKeys = (a, b) => {
|
|
1608
|
-
const ka = Object.keys(a);
|
|
1609
|
-
const kb = Object.keys(b);
|
|
1610
|
-
return ka.filter((k) => kb.includes(k));
|
|
1611
|
-
};
|
|
1612
|
-
|
|
1613
|
-
// dist/runtime/dictionary/takeProp.js
|
|
1614
|
-
var takeProp = (val, prop, otherwise) => {
|
|
1615
|
-
return (isObject(val) || isArray(val)) && prop in val ? val[prop] : otherwise;
|
|
1616
|
-
};
|
|
1617
|
-
|
|
1618
|
-
// dist/runtime/dictionary/withKeys.js
|
|
1619
|
-
var withKeys = (dict2, ...keys) => retain(dict2, ...keys);
|
|
1620
|
-
|
|
1621
|
-
// dist/runtime/dictionary/withoutKeys.js
|
|
1622
|
-
var withoutKeys = (dict2, ...exclude) => omit(dict2, ...exclude);
|
|
1623
|
-
|
|
1624
|
-
// dist/runtime/dictionary/withoutValue.js
|
|
1625
|
-
function withoutValue(val) {
|
|
1626
|
-
return (obj) => {
|
|
1627
|
-
return Object.keys(obj).reduce((acc, key) => val === obj[key] ? acc : { ...acc, [key]: obj[key] }, {});
|
|
1628
|
-
};
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
// dist/runtime/dictionary/withDefaults.js
|
|
1632
|
-
var withDefaults = (with_defaults) => (obj) => {
|
|
1633
|
-
const merged = {
|
|
1634
|
-
...with_defaults,
|
|
1635
|
-
...obj
|
|
1636
|
-
};
|
|
1637
|
-
return merged;
|
|
1638
|
-
};
|
|
1639
|
-
|
|
1640
|
-
// dist/runtime/dictionary/valuesOf.js
|
|
1641
|
-
var valuesOf = (obj) => {
|
|
1642
|
-
const values = [];
|
|
1643
|
-
for (const k of Object.keys(obj)) {
|
|
1644
|
-
values.push(obj[k]);
|
|
1645
|
-
}
|
|
1646
|
-
return values;
|
|
1647
|
-
};
|
|
1648
|
-
|
|
1649
|
-
// dist/runtime/errors/createErrorCondition.js
|
|
1650
|
-
var createErrorCondition = (kind, msg = "", utility = "") => {
|
|
1651
|
-
return {
|
|
1652
|
-
__kind: "ErrorCondition",
|
|
1653
|
-
kind,
|
|
1654
|
-
msg,
|
|
1655
|
-
utility
|
|
1656
|
-
};
|
|
1657
|
-
};
|
|
1658
|
-
|
|
1659
|
-
// dist/runtime/literals/box.js
|
|
1660
|
-
function box(value) {
|
|
1661
|
-
const rtn = {
|
|
1662
|
-
__type: "box",
|
|
1663
|
-
value,
|
|
1664
|
-
unbox: (...p) => {
|
|
1665
|
-
return typeof value === "function" ? value(...p) : value;
|
|
1666
|
-
}
|
|
1667
|
-
};
|
|
1668
|
-
return rtn;
|
|
1669
|
-
}
|
|
1670
|
-
function isBox(thing) {
|
|
1671
|
-
return typeof thing === "object" && "__type" in thing && thing.__type === "box";
|
|
1672
|
-
}
|
|
1673
|
-
function boxDictionaryValues(dict2) {
|
|
1674
|
-
const keys = Object.keys(dict2);
|
|
1675
|
-
return keys.reduce((acc, key) => ({ ...acc, [key]: box(dict2[key]) }), {});
|
|
1676
|
-
}
|
|
1677
|
-
function unbox(val) {
|
|
1678
|
-
return isBox(val) ? val.value : val;
|
|
1679
|
-
}
|
|
1680
|
-
|
|
1681
|
-
// dist/runtime/literals/identity.js
|
|
1682
|
-
var identity = (v) => v;
|
|
1683
|
-
|
|
1684
|
-
// dist/runtime/literals/literal.js
|
|
1685
|
-
function idLiteral(o) {
|
|
1686
|
-
return { ...o, id: o.id };
|
|
1687
|
-
}
|
|
1688
|
-
function nameLiteral(o) {
|
|
1689
|
-
return o;
|
|
1690
|
-
}
|
|
1691
|
-
function kindLiteral(o) {
|
|
1692
|
-
return o;
|
|
1693
|
-
}
|
|
1694
|
-
function idTypeGuard(_o) {
|
|
1695
|
-
return true;
|
|
1696
|
-
}
|
|
1697
|
-
function literal(obj) {
|
|
1698
|
-
return obj;
|
|
1699
|
-
}
|
|
1700
|
-
|
|
1701
|
-
// dist/runtime/literals/stripTrailing.js
|
|
1702
|
-
var switchType = (content) => (val) => {
|
|
1703
|
-
return typeof content === "number" ? Number(val) : val;
|
|
1704
|
-
};
|
|
1705
|
-
function stripTrailing(content, strip) {
|
|
1706
|
-
var _a;
|
|
1707
|
-
const re = new RegExp(`(.*)${strip}$`);
|
|
1708
|
-
return ((_a = String(content)) == null ? void 0 : _a.endsWith(String(strip))) ? switchType(content)(String(content).replace(re, "$1")) : switchType(content)(String(content));
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
// dist/runtime/literals/stripLeading.js
|
|
1712
|
-
function stripLeading(content, ...strip) {
|
|
1713
|
-
const stripper = strip.find((i) => content.startsWith(i));
|
|
1714
|
-
return stripper ? (
|
|
1715
|
-
// starts with
|
|
1716
|
-
content.slice(stripper.length)
|
|
1717
|
-
) : (
|
|
1718
|
-
// does not
|
|
1719
|
-
content
|
|
1720
|
-
);
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
// dist/runtime/literals/ensureTrailing.js
|
|
1724
|
-
function ensureTrailing(content, ensure) {
|
|
1725
|
-
return (
|
|
1726
|
-
//
|
|
1727
|
-
content.endsWith(ensure) ? content : `${content}${ensure}`
|
|
1728
|
-
);
|
|
1729
|
-
}
|
|
1730
|
-
|
|
1731
|
-
// dist/runtime/literals/ensureLeading.js
|
|
1732
|
-
function ensureLeading(content, ensure) {
|
|
1733
|
-
return String(content).startsWith(ensure) ? content : `${ensure}${content}`;
|
|
1734
|
-
}
|
|
1735
|
-
|
|
1736
|
-
// dist/runtime/literals/ensureSurround.js
|
|
1737
|
-
function ensureSurround(prefix, postfix) {
|
|
1738
|
-
const fn2 = (input) => {
|
|
1739
|
-
const result2 = ensureTrailing(ensureLeading(input, prefix), postfix);
|
|
1740
|
-
return result2;
|
|
1741
|
-
};
|
|
1742
|
-
return fn2;
|
|
1743
|
-
}
|
|
1744
|
-
|
|
1745
|
-
// dist/runtime/literals/ifUppercase.js
|
|
1746
|
-
function ifUppercaseChar(ch, callbackForMatch, callbackForNoMatch) {
|
|
1747
|
-
if (ch.length !== 1) {
|
|
1748
|
-
throw new Error(`Invalid string length passed to ifUppercaseChar(ch); this function requires a single character but ${ch.length} were received`);
|
|
1749
|
-
}
|
|
1750
|
-
return LOWER_ALPHA_CHARS.includes(ch) ? callbackForMatch(ch) : callbackForNoMatch(ch);
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
// dist/runtime/literals/pathJoin.js
|
|
1754
|
-
function pathJoin(...segments) {
|
|
1755
|
-
const clean_path = segments.map((i) => stripTrailing(stripLeading(i, "/"), "/")).join("/");
|
|
1756
|
-
const original_path = segments.join("/");
|
|
1757
|
-
const pre = original_path.startsWith("/") ? "/" : "";
|
|
1758
|
-
const post = original_path.endsWith("/") ? "/" : "";
|
|
1759
|
-
return `${pre}${clean_path}${post}`;
|
|
1760
|
-
}
|
|
1761
|
-
|
|
1762
|
-
// dist/runtime/literals/narrow.js
|
|
1763
|
-
function narrow(...values) {
|
|
1764
|
-
return values.length === 1 ? values[0] : values;
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
// dist/runtime/literals/split.js
|
|
1768
|
-
function split(str, sep = "") {
|
|
1769
|
-
return str.split(sep);
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
// dist/runtime/literals/tuple.js
|
|
1773
|
-
var tuple = (...values) => {
|
|
1774
|
-
const arr = values.length === 1 ? values[0] : values;
|
|
1775
|
-
return asArray(arr);
|
|
1776
|
-
};
|
|
1777
|
-
|
|
1778
|
-
// dist/runtime/literals/capitalize.js
|
|
1779
|
-
function capitalize(str) {
|
|
1780
|
-
return `${str == null ? void 0 : str.slice(0, 1).toUpperCase()}${str == null ? void 0 : str.slice(1)}`;
|
|
1781
|
-
}
|
|
1782
|
-
|
|
1783
|
-
// dist/runtime/literals/uncapitalize.js
|
|
1784
|
-
function uncapitalize(str) {
|
|
1785
|
-
return `${str == null ? void 0 : str.slice(0, 1).toLowerCase()}${str == null ? void 0 : str.slice(1)}`;
|
|
1786
|
-
}
|
|
1787
|
-
|
|
1788
|
-
// dist/runtime/literals/uppercase.js
|
|
1789
|
-
function uppercase(str) {
|
|
1790
|
-
return str.toUpperCase();
|
|
1791
|
-
}
|
|
1792
|
-
|
|
1793
|
-
// dist/runtime/literals/lowercase.js
|
|
1794
|
-
function lowercase(str) {
|
|
1795
|
-
return str.toLowerCase();
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
// dist/runtime/literals/widen.js
|
|
1799
|
-
function widen(value) {
|
|
1800
|
-
return value;
|
|
1801
|
-
}
|
|
1802
|
-
|
|
1803
|
-
// dist/runtime/literals/toCamelCase.js
|
|
1804
|
-
function toCamelCase(input, preserveWhitespace) {
|
|
1805
|
-
const pascal = preserveWhitespace ? toPascalCase(input, preserveWhitespace) : toPascalCase(input);
|
|
1806
|
-
const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(pascal);
|
|
1807
|
-
const camel = (preserveWhitespace ? preWhite : "") + focus.replace(/^.*?([0-9]*?[a-z|A-Z]{1})/s, (_2, p1) => p1.toLowerCase()) + (preserveWhitespace ? postWhite : "");
|
|
1808
|
-
return camel;
|
|
1809
|
-
}
|
|
1810
|
-
|
|
1811
|
-
// dist/runtime/literals/toKebabCase.js
|
|
1812
|
-
function toKebabCase(input, _preserveWhitespace) {
|
|
1813
|
-
const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(input);
|
|
1814
|
-
const replaceWhitespace = (i) => i.replace(/\s/gs, "-");
|
|
1815
|
-
const replaceUppercase = (i) => i.replace(/[A-Z]/g, (c) => `-${c[0].toLowerCase()}`);
|
|
1816
|
-
const replaceLeadingDash = (i) => i.replace(/^-/s, "");
|
|
1817
|
-
const replaceTrailingDash = (i) => i.replace(/-$/s, "");
|
|
1818
|
-
const replaceUnderscore = (i) => i.replace(/_/g, "-");
|
|
1819
|
-
const removeDupDashes = (i) => i.replace(/-+/g, "-");
|
|
1820
|
-
return removeDupDashes(`${preWhite}${replaceUnderscore(replaceTrailingDash(replaceLeadingDash(removeDupDashes(replaceWhitespace(replaceUppercase(focus))))))}${postWhite}`);
|
|
1821
|
-
}
|
|
1822
|
-
|
|
1823
|
-
// dist/runtime/literals/ifLowercase.js
|
|
1824
|
-
function ifLowercaseChar(ch, callbackForMatch, callbackForNoMatch) {
|
|
1825
|
-
if (ch.length !== 1) {
|
|
1826
|
-
throw new Error(`call to ifUppercaseChar received ${ch.length} characters but is only valid when one character is passed in!`);
|
|
1827
|
-
}
|
|
1828
|
-
return LOWER_ALPHA_CHARS.includes(ch) ? callbackForMatch(ch) : callbackForNoMatch(ch);
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
// dist/runtime/literals/toSnakeCase.js
|
|
1832
|
-
function toSnakeCase(input, preserveWhitespace = false) {
|
|
1833
|
-
const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(input);
|
|
1834
|
-
const convertInteriorSpace = (input2) => input2.replace(/\s+/gs, "_");
|
|
1835
|
-
const convertDashes = (input2) => input2.replace(/-/gs, "_");
|
|
1836
|
-
const injectUnderscoreBeforeCaps = (input2) => input2.replace(/([A-Z])/gs, "_$1");
|
|
1837
|
-
const removeLeadingUnderscore = (input2) => input2.startsWith("_") ? input2.slice(1) : input2;
|
|
1838
|
-
return ((preserveWhitespace ? preWhite : "") + removeLeadingUnderscore(injectUnderscoreBeforeCaps(convertDashes(convertInteriorSpace(focus)))).toLowerCase() + (preserveWhitespace ? postWhite : "")).replace(/__/g, "_");
|
|
1839
|
-
}
|
|
1840
|
-
|
|
1841
|
-
// dist/runtime/literals/toString.js
|
|
1842
|
-
function toString(val) {
|
|
1843
|
-
return String(val);
|
|
1844
|
-
}
|
|
1845
|
-
|
|
1846
|
-
// dist/runtime/literals/pluralize.js
|
|
1847
|
-
var isException = (word) => Object.keys(PLURAL_EXCEPTIONS).includes(word);
|
|
1848
|
-
var endingIn = (word, postfix) => {
|
|
1849
|
-
switch (postfix) {
|
|
1850
|
-
case "is":
|
|
1851
|
-
return word.endsWith(postfix) ? `${word}es` : void 0;
|
|
1852
|
-
case "singular-noun":
|
|
1853
|
-
return SINGULAR_NOUN_ENDINGS.some((i) => word.endsWith(i)) ? split(word).every((i) => [...ALPHA_CHARS].includes(i)) ? `${word}es` : void 0 : void 0;
|
|
1854
|
-
case "f":
|
|
1855
|
-
return word.endsWith("f") ? stripTrailing(word, "f") + "ves" : word.endsWith("fe") ? stripTrailing(word, "fe") + "ves" : void 0;
|
|
1856
|
-
case "y":
|
|
1857
|
-
return word.endsWith("y") ? CONSONANTS.includes(word.slice(-2, 1)) ? stripTrailing(word, "y") + "ies" : void 0 : void 0;
|
|
1858
|
-
default:
|
|
1859
|
-
throw new Error(`endingIn received "${postfix}" as a postfix but this ending is not known!`);
|
|
1860
|
-
}
|
|
1861
|
-
};
|
|
1862
|
-
var pluralize = (word) => {
|
|
1863
|
-
const result2 = isException(word) ? PLURAL_EXCEPTIONS[word] : endingIn(word, "is") || endingIn(word, "singular-noun") || endingIn(word, "f") || endingIn(word, "y") || `${word}s`;
|
|
1864
|
-
return result2;
|
|
1865
|
-
};
|
|
1866
|
-
|
|
1867
|
-
// dist/runtime/literals/retainAfter.js
|
|
1868
|
-
function retainAfter(content, find2) {
|
|
1869
|
-
const parts = content.split(find2);
|
|
1870
|
-
parts.shift();
|
|
1871
|
-
return parts.join(find2);
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
// dist/runtime/literals/surround.js
|
|
1875
|
-
function surround(prefix, postfix) {
|
|
1876
|
-
return (input) => `${prefix}${input}${postfix}`;
|
|
1877
|
-
}
|
|
1878
|
-
|
|
1879
|
-
// dist/runtime/literals/stripAfter.js
|
|
1880
|
-
function stripAfter(content, find2) {
|
|
1881
|
-
return content.split(find2).shift();
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
// dist/runtime/literals/stripBefore.js
|
|
1885
|
-
function stripBefore(content, find2) {
|
|
1886
|
-
return content.split(find2).slice(1).join(find2);
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
// dist/runtime/literals/trim.js
|
|
1890
|
-
function trim(input) {
|
|
1891
|
-
return input.trim();
|
|
1892
|
-
}
|
|
1893
|
-
function trimLeft(input) {
|
|
1894
|
-
return input.trimStart();
|
|
1895
|
-
}
|
|
1896
|
-
function trimStart(input) {
|
|
1897
|
-
return input.trimStart();
|
|
1898
|
-
}
|
|
1899
|
-
function trimRight(input) {
|
|
1900
|
-
return input.trimEnd();
|
|
1901
|
-
}
|
|
1902
|
-
function trimEnd(input) {
|
|
1903
|
-
return input.trimEnd();
|
|
1904
|
-
}
|
|
1905
|
-
|
|
1906
|
-
// dist/runtime/literals/toPascalCase.js
|
|
1907
|
-
function toPascalCase(input, preserveWhitespace = void 0) {
|
|
1908
|
-
const [_, preWhite, focus, postWhite] = /^(\s*)(.*?)(\s*)$/.exec(input);
|
|
1909
|
-
const convertInteriorToCap = (i) => i.replace(/[ |_|-]+([0-9]*?[a-z|A-Z]{1})/gs, (_2, p1) => p1.toUpperCase());
|
|
1910
|
-
const startingToCap = (i) => i.replace(/^[_|-]*?([0-9]*?[a-z]{1})/gs, (_2, p1) => p1.toUpperCase());
|
|
1911
|
-
const replaceLeadingTrash = (i) => i.replace(/^[-_]/s, "");
|
|
1912
|
-
const replaceTrailingTrash = (i) => i.replace(/[-_]$/s, "");
|
|
1913
|
-
const pascal = `${preserveWhitespace ? preWhite : ""}${capitalize(replaceTrailingTrash(replaceLeadingTrash(convertInteriorToCap(startingToCap(focus)))))}${preserveWhitespace ? postWhite : ""}`;
|
|
1914
|
-
return pascal;
|
|
1915
|
-
}
|
|
1916
|
-
|
|
1917
|
-
// dist/runtime/literals/toUppercase.js
|
|
1918
|
-
function toUppercase(str) {
|
|
1919
|
-
return str.split("").map((i) => ifLowercaseChar(i, (v) => capitalize(v), (v) => v)).join("");
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
// dist/runtime/literals/toNumericArray.js
|
|
1923
|
-
var toNumericArray = (arr) => {
|
|
1924
|
-
return arr.map((i) => Number(i));
|
|
1925
|
-
};
|
|
1926
|
-
|
|
1927
|
-
// dist/runtime/literals/truncate.js
|
|
1928
|
-
var truncate = (content, maxLength, ellipsis = false) => {
|
|
1929
|
-
const overLimit = content.length > maxLength;
|
|
1930
|
-
return overLimit ? ellipsis ? `${content.slice(0, maxLength)}${typeof ellipsis === "string" ? ellipsis : "..."}` : content.slice(0, maxLength) : content;
|
|
1931
|
-
};
|
|
1932
|
-
|
|
1933
|
-
// dist/runtime/literals/takeNumericCharacters.js
|
|
1934
|
-
var takeNumericCharacters = (content) => {
|
|
1935
|
-
let nonNumericIdx = asChars(content).findIndex((i) => !NUMERIC_CHAR.includes(i));
|
|
1936
|
-
return content.slice(0, nonNumericIdx);
|
|
1937
|
-
};
|
|
1938
|
-
|
|
1939
|
-
// dist/runtime/type-conversion/asChars.js
|
|
1940
|
-
var asChars = (str) => {
|
|
1941
|
-
return str.split("");
|
|
1942
|
-
};
|
|
1943
|
-
|
|
1944
|
-
// dist/runtime/literals/retainChars.js
|
|
1945
|
-
var retainChars = (content, ...retain2) => {
|
|
1946
|
-
return asChars(content).filter((c) => retain2.includes(c)).join("");
|
|
1947
|
-
};
|
|
1948
|
-
|
|
1949
|
-
// dist/runtime/literals/stripChars.js
|
|
1950
|
-
var stripChars = (content, ...strip) => {
|
|
1951
|
-
return asChars(content).filter((c) => !strip.includes(c)).join("");
|
|
1952
|
-
};
|
|
1953
|
-
|
|
1954
|
-
// dist/runtime/type-conversion/mergeObjects.js
|
|
1955
|
-
function mergeObjects(defVal, override) {
|
|
1956
|
-
const intersectingKeys = sharedKeys(defVal, override);
|
|
1957
|
-
const defUnique = withoutKeys(defVal, ...intersectingKeys);
|
|
1958
|
-
const overrideUnique = withoutKeys(defVal, ...intersectingKeys);
|
|
1959
|
-
const merged = {
|
|
1960
|
-
...intersectingKeys.reduce((acc, key) => typeof override[key] === "undefined" ? { ...acc, [key]: defVal[key] } : { ...acc, [key]: override[key] }, {}),
|
|
1961
|
-
...defUnique,
|
|
1962
|
-
...overrideUnique
|
|
1963
|
-
};
|
|
1964
|
-
return merged;
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
// dist/runtime/type-conversion/optional.js
|
|
1968
|
-
function optional(...values) {
|
|
1969
|
-
return values.length === 1 ? values[0] : values;
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
|
-
// dist/runtime/type-guards/isUndefined.js
|
|
1973
|
-
function isUndefined(value) {
|
|
1974
|
-
return typeof value === "undefined" ? true : false;
|
|
1975
|
-
}
|
|
1976
|
-
|
|
1977
|
-
// dist/runtime/type-conversion/mergeScalars.js
|
|
1978
|
-
function mergeScalars(a, b) {
|
|
1979
|
-
return isUndefined(b) ? a : b;
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
// dist/runtime/type-conversion/mergeTuples.js
|
|
1983
|
-
function mergeTuples(a, b) {
|
|
1984
|
-
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]);
|
|
1985
|
-
}
|
|
1986
|
-
|
|
1987
|
-
// dist/runtime/type-conversion/unionize.js
|
|
1988
|
-
function unionize(value, inUnionWith) {
|
|
1989
|
-
return value;
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
// dist/runtime/type-conversion/intersect.js
|
|
1993
|
-
function intersect(value, intersectedWith) {
|
|
1994
|
-
return value;
|
|
1995
|
-
}
|
|
1996
|
-
|
|
1997
|
-
// dist/runtime/type-conversion/never.js
|
|
1998
|
-
function never(val) {
|
|
1999
|
-
return val;
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
// dist/runtime/type-conversion/union.js
|
|
2003
|
-
var union = (...options) => (value) => value;
|
|
2004
|
-
|
|
2005
|
-
// dist/runtime/type-conversion/toNumber.js
|
|
2006
|
-
var convertScalar = (val) => {
|
|
2007
|
-
switch (typeof val) {
|
|
2008
|
-
case "number":
|
|
2009
|
-
return val;
|
|
2010
|
-
case "string":
|
|
2011
|
-
return Number(val);
|
|
2012
|
-
case "boolean":
|
|
2013
|
-
return val ? 1 : 0;
|
|
2014
|
-
default:
|
|
2015
|
-
throw Error(`${typeof val} is an invalid scalar type to convert to a number!`);
|
|
2016
|
-
}
|
|
2017
|
-
};
|
|
2018
|
-
var convertList = (val) => val.map((i) => convertScalar(i));
|
|
2019
|
-
function toNumber(value) {
|
|
2020
|
-
return Array.isArray(value) ? convertList(value) : convertScalar(value);
|
|
2021
|
-
}
|
|
2022
|
-
|
|
2023
|
-
// dist/runtime/type-conversion/asRecord.js
|
|
2024
|
-
var asRecord = (obj) => {
|
|
2025
|
-
return obj;
|
|
2026
|
-
};
|
|
2027
|
-
|
|
2028
|
-
// dist/runtime/type-conversion/asString.js
|
|
2029
|
-
var asString = (value) => {
|
|
2030
|
-
return isString(value) ? value : isNumber(value) ? `${value}` : isBoolean(value) ? `${value}` : String(value);
|
|
2031
|
-
};
|
|
2032
|
-
|
|
2033
|
-
// dist/runtime/type-conversion/ip6GroupExpansion.js
|
|
2034
|
-
var ip6GroupExpansion = (ip) => {
|
|
2035
|
-
return stripTrailing(ip.replaceAll("::", ":0000:"), ":");
|
|
2036
|
-
};
|
|
2037
|
-
|
|
2038
|
-
// dist/runtime/literals/retainWhile.js
|
|
2039
|
-
var retainWhile = (content, ...retain2) => {
|
|
2040
|
-
const stopIdx = asChars(content).findIndex((c) => !retain2.includes(c));
|
|
2041
|
-
return content.slice(0, stopIdx);
|
|
2042
|
-
};
|
|
2043
|
-
|
|
2044
|
-
// dist/runtime/literals/asPhoneNumber.js
|
|
2045
|
-
var getPhoneCountryCode = (phone) => {
|
|
2046
|
-
return phone.trim().startsWith("+") || phone.trim().startsWith("00") ? retainWhile(stripLeading(stripLeading(phone.trim(), "+"), "00"), ...NUMERIC_CHAR) : "";
|
|
2047
|
-
};
|
|
2048
|
-
var removePhoneCountryCode = (phone) => {
|
|
2049
|
-
const countryCode = getPhoneCountryCode(phone);
|
|
2050
|
-
return countryCode !== "" ? stripLeading(stripLeading(phone.trim(), "+", "00"), countryCode).trim() : phone.trim();
|
|
2051
|
-
};
|
|
2052
|
-
var convert = (countryCode, phone, delimiter, para) => {
|
|
2053
|
-
const parts = stripChars(phone, "(", ")").trim().split(/[-. ]/);
|
|
2054
|
-
const isRegional = parts.length === 2 ? true : false;
|
|
2055
|
-
const isCountry = parts.length === 3 ? true : false;
|
|
2056
|
-
const isShortCode = parts.length === 1 && asChars(phone).length < 7 ? true : false;
|
|
2057
|
-
const replacement = isShortCode ? phone : isRegional ? parts.join(delimiter) : isCountry && para ? `(${parts[0]}) ${parts.slice(1).join(delimiter)}` : isCountry ? parts.join(delimiter) : void 0;
|
|
2058
|
-
if (!replacement) {
|
|
2059
|
-
throw new Error(`invalid phone number: ${phone}. Unable to parse!`);
|
|
2060
|
-
}
|
|
2061
|
-
return countryCode === "" ? replacement : `+${countryCode} ${replacement}`;
|
|
2062
|
-
};
|
|
2063
|
-
var asPhoneNumber = (phone, format = "Dotted (e.g., 456.555.1212)") => {
|
|
2064
|
-
if (!isPhoneNumber(phone)) {
|
|
2065
|
-
throw new Error(`Invalid phone number presented to asPhoneNumber(phone,format)!`);
|
|
2066
|
-
}
|
|
2067
|
-
const countryCode = getPhoneCountryCode(phone);
|
|
2068
|
-
const remaining = removePhoneCountryCode(phone);
|
|
2069
|
-
let result2;
|
|
2070
|
-
switch (format) {
|
|
2071
|
-
case "Dashed (e.g., 456-555-1212)":
|
|
2072
|
-
result2 = convert(countryCode, remaining, "-", false);
|
|
2073
|
-
break;
|
|
2074
|
-
case "Dotted (e.g., 456.555.1212)":
|
|
2075
|
-
result2 = convert(countryCode, remaining, ".", false);
|
|
2076
|
-
break;
|
|
2077
|
-
case "ParaDashed (e.g., (456) 555-1212)":
|
|
2078
|
-
result2 = convert(countryCode, remaining, "-", true);
|
|
2079
|
-
break;
|
|
2080
|
-
case "ParaSpaced (e.g., (456) 555 1212)":
|
|
2081
|
-
result2 = convert(countryCode, remaining, " ", true);
|
|
2082
|
-
break;
|
|
2083
|
-
}
|
|
2084
|
-
return result2;
|
|
2085
|
-
};
|
|
2086
|
-
|
|
2087
|
-
// dist/runtime/errors/kindedError.js
|
|
2088
|
-
var kindError = (kind, _defineContext) => (msg, context) => {
|
|
2089
|
-
const err = new Error(msg);
|
|
2090
|
-
err.name = toPascalCase(kind);
|
|
2091
|
-
err.kind = toKebabCase(kind);
|
|
2092
|
-
err.__kind = "KindError";
|
|
2093
|
-
err.context = context;
|
|
2094
|
-
return err;
|
|
2095
|
-
};
|
|
2096
|
-
|
|
2097
|
-
// dist/runtime/functional/result.js
|
|
2098
|
-
var result = "NOT READY";
|
|
2099
|
-
|
|
2100
|
-
// dist/runtime/functions/fnMeta.js
|
|
2101
|
-
var fnMeta = (func) => {
|
|
2102
|
-
const fn2 = (...args) => func(...args);
|
|
2103
|
-
const props = Object.keys(fn2).reduce((acc, key) => ({ ...acc, [key]: fn2[key] }), {});
|
|
2104
|
-
return {
|
|
2105
|
-
fn: fn2,
|
|
2106
|
-
props
|
|
2107
|
-
};
|
|
2108
|
-
};
|
|
2109
|
-
|
|
2110
|
-
// dist/runtime/functions/wrapFn.js
|
|
2111
|
-
var wrapFn = "NOT IMPLEMENTED";
|
|
2112
|
-
|
|
2113
|
-
// dist/runtime/initializers/addFnToProps.js
|
|
2114
|
-
var addPropsToFn = (fn2, clone_fn) => {
|
|
2115
|
-
const localFn = clone_fn ? (...args) => fn2(args) : fn2;
|
|
2116
|
-
return (obj) => {
|
|
2117
|
-
for (const k in obj) {
|
|
2118
|
-
localFn[k] = obj[k];
|
|
2119
|
-
}
|
|
2120
|
-
return localFn;
|
|
2121
|
-
};
|
|
2122
|
-
};
|
|
2123
|
-
|
|
2124
|
-
// dist/runtime/initializers/addPropsToFn.js
|
|
2125
|
-
var addFnToProps = (props, _clone_fn) => (fn2) => {
|
|
2126
|
-
const localFn = (...args) => fn2(args);
|
|
2127
|
-
for (const k in props) {
|
|
2128
|
-
localFn[k] = props[k];
|
|
2129
|
-
}
|
|
2130
|
-
return localFn;
|
|
2131
|
-
};
|
|
2132
|
-
|
|
2133
|
-
// dist/runtime/initializers/createFnWithProps.js
|
|
2134
|
-
var createFnWithProps = (fn2, props, narrowing = false) => {
|
|
2135
|
-
const fnWithProps = fn2;
|
|
2136
|
-
for (const prop of keysOf(props)) {
|
|
2137
|
-
fnWithProps[prop] = props[prop];
|
|
2138
|
-
}
|
|
2139
|
-
return isTrue(narrowing) ? fnWithProps : fnWithProps;
|
|
2140
|
-
};
|
|
2141
|
-
|
|
2142
|
-
// dist/runtime/initializers/defineObj.js
|
|
2143
|
-
function defineObj(literal2 = {}) {
|
|
2144
|
-
return (wide2 = {}) => {
|
|
2145
|
-
const obj = literal2 ? { ...literal2, ...wide2 } : wide2;
|
|
2146
|
-
return obj;
|
|
2147
|
-
};
|
|
2148
|
-
}
|
|
2149
|
-
|
|
2150
|
-
// dist/runtime/initializers/defineTuple.js
|
|
2151
|
-
var defineTuple = (...values) => {
|
|
2152
|
-
return values.map((i) => isFunction(i) ? handleDoneFn(i(ShapeApiImplementation)) : i);
|
|
2153
|
-
};
|
|
2154
|
-
|
|
2155
|
-
// dist/runtime/lists/asArray.js
|
|
2156
|
-
var asArray = (thing) => {
|
|
2157
|
-
return Array.isArray(thing) === true ? (
|
|
2158
|
-
// proxy thing back as it's already an array
|
|
2159
|
-
thing
|
|
2160
|
-
) : typeof thing === "undefined" ? [] : [thing];
|
|
2161
|
-
};
|
|
2162
|
-
|
|
2163
|
-
// dist/runtime/lists/getEach.js
|
|
2164
|
-
function getEach(list2, dotPath) {
|
|
2165
|
-
const result2 = list2.map((i) => isNull(dotPath) ? i : isContainer(i) ? get(i, dotPath) : Never).filter((i) => !isErrorCondition(i));
|
|
2166
|
-
return result2;
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
// dist/runtime/lists/indexOf.js
|
|
2170
|
-
function indexOf(val, index) {
|
|
2171
|
-
const isNegative = isNumber(index) && index < 0;
|
|
2172
|
-
if (isNegative && !Array.isArray(val)) {
|
|
2173
|
-
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}]!`);
|
|
2174
|
-
}
|
|
2175
|
-
if (isNegative && Array.isArray(val) && val.length < Math.abs(index)) {
|
|
2176
|
-
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.`);
|
|
2177
|
-
}
|
|
2178
|
-
const idx = isNegative && Array.isArray(val) ? val.length + 1 - Math.abs(index) : index;
|
|
2179
|
-
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;
|
|
2180
|
-
}
|
|
2181
|
-
|
|
2182
|
-
// dist/runtime/boolean-logic/ifNotNull.js
|
|
2183
|
-
function ifNotNull(val, ifVal, elseVal) {
|
|
2184
|
-
return isNull(val) ? elseVal() : ifVal(val);
|
|
2185
|
-
}
|
|
2186
|
-
|
|
2187
|
-
// dist/runtime/lists/intersection.js
|
|
2188
|
-
function intersectWithOffset(a, b, deref) {
|
|
2189
|
-
const aIndexable = a.every((i) => isIndexable(i));
|
|
2190
|
-
const bIndexable = b.every((i) => isIndexable(i));
|
|
2191
|
-
if (!aIndexable || !bIndexable) {
|
|
2192
|
-
if (!aIndexable) {
|
|
2193
|
-
throw new Error(`The "a" array passed into intersect(a,b) was not fully composed of indexable properties: ${a.map((i) => typeof i).join(", ")}`);
|
|
2194
|
-
} else {
|
|
2195
|
-
throw new Error(`The "b" array passed into intersect(a,b) was not fully composed of indexable properties: ${b.map((i) => typeof i).join(", ")}`);
|
|
2196
|
-
}
|
|
2197
|
-
}
|
|
2198
|
-
const aMatches = getEach(a, deref);
|
|
2199
|
-
const bMatches = getEach(b, deref);
|
|
2200
|
-
const sharedKeys2 = ifNotNull(deref, (v) => [
|
|
2201
|
-
a.filter((i) => Array.from(bMatches).includes(get(i, v))),
|
|
2202
|
-
b.filter((i) => Array.from(aMatches).includes(get(i, v)))
|
|
2203
|
-
], () => a.filter((k) => b.includes(k)));
|
|
2204
|
-
return sharedKeys2;
|
|
2205
|
-
}
|
|
2206
|
-
function intersectNoOffset(a, b) {
|
|
2207
|
-
return a.length < b.length ? a.filter((val) => b.includes(val)) : b.filter((val) => a.includes(val));
|
|
2208
|
-
}
|
|
2209
|
-
var intersection = (a, b, deref = null) => {
|
|
2210
|
-
return deref === null ? intersectNoOffset(a, b) : intersectWithOffset(a, b, deref);
|
|
2211
|
-
};
|
|
2212
|
-
|
|
2213
|
-
// dist/runtime/lists/unique.js
|
|
2214
|
-
var unique = (...values) => {
|
|
2215
|
-
const u = [];
|
|
2216
|
-
for (const i of values.flat()) {
|
|
2217
|
-
if (!u.includes(i)) {
|
|
2218
|
-
u.push(i);
|
|
2219
|
-
}
|
|
2220
|
-
}
|
|
2221
|
-
return u;
|
|
2222
|
-
};
|
|
2223
|
-
|
|
2224
|
-
// dist/runtime/lists/logicalReturns.js
|
|
2225
|
-
function logicalReturns(conditions) {
|
|
2226
|
-
return conditions.map((c) => isBoolean(c) ? c : isFunction(c) ? c() : Never);
|
|
2227
|
-
}
|
|
2228
|
-
|
|
2229
|
-
// dist/runtime/lists/find.js
|
|
2230
|
-
var find = (list2, deref = null) => (comparator) => {
|
|
2231
|
-
return list2.find((i) => {
|
|
2232
|
-
const val = deref ? isContainer(i) ? deref in i ? i[deref] : void 0 : i : i;
|
|
2233
|
-
return val === comparator;
|
|
2234
|
-
});
|
|
2235
|
-
};
|
|
2236
|
-
|
|
2237
|
-
// dist/runtime/lists/filter.js
|
|
2238
|
-
var FILTER = "NOT READY";
|
|
2239
|
-
|
|
2240
|
-
// dist/runtime/lists/createConverter.js
|
|
2241
|
-
function createConverter(mapper) {
|
|
2242
|
-
return (input) => {
|
|
2243
|
-
let result2;
|
|
2244
|
-
if (isNothing(input)) {
|
|
2245
|
-
result2 = mapper.nothing ? mapper.nothing(input) : Never;
|
|
2246
|
-
} else if (isObject(input)) {
|
|
2247
|
-
result2 = mapper.object ? mapper.object(input) : Never;
|
|
2248
|
-
} else {
|
|
2249
|
-
switch (typeof input) {
|
|
2250
|
-
case "string":
|
|
2251
|
-
result2 = mapper.string ? mapper.string(input) : Never;
|
|
2252
|
-
break;
|
|
2253
|
-
case "number":
|
|
2254
|
-
case "bigint":
|
|
2255
|
-
result2 = mapper.number ? mapper.number(input) : Never;
|
|
2256
|
-
break;
|
|
2257
|
-
case "boolean":
|
|
2258
|
-
result2 = mapper.boolean ? mapper.boolean(input) : Never;
|
|
2259
|
-
break;
|
|
2260
|
-
default:
|
|
2261
|
-
throw new Error(`Unhandled type: ${typeof input}`);
|
|
2262
|
-
}
|
|
2263
|
-
}
|
|
2264
|
-
return result2;
|
|
2265
|
-
};
|
|
2266
|
-
}
|
|
2267
|
-
|
|
2268
|
-
// dist/runtime/lists/slice.js
|
|
2269
|
-
var slice = (list2, start, end) => {
|
|
2270
|
-
return list2.slice(start, end);
|
|
2271
|
-
};
|
|
2272
|
-
|
|
2273
|
-
// dist/runtime/lists/last.js
|
|
2274
|
-
var last = (list2) => {
|
|
2275
|
-
return [...list2].pop();
|
|
2276
|
-
};
|
|
2277
|
-
|
|
2278
|
-
// dist/runtime/lists/reverse.js
|
|
2279
|
-
var reverse = (list2) => {
|
|
2280
|
-
return [...list2].reverse();
|
|
2281
|
-
};
|
|
2282
|
-
|
|
2283
|
-
// dist/runtime/lists/pop.js
|
|
2284
|
-
var pop = (list2) => {
|
|
2285
|
-
return list2.length > 0 ? [last(list2), slice(list2, 0, -1)] : void 0;
|
|
2286
|
-
};
|
|
2287
|
-
|
|
2288
|
-
// dist/runtime/lists/join.js
|
|
2289
|
-
function join(joinWith) {
|
|
2290
|
-
return (...tuple3) => {
|
|
2291
|
-
return tuple3.join(joinWith);
|
|
2292
|
-
};
|
|
2293
|
-
}
|
|
2294
|
-
|
|
2295
|
-
// dist/runtime/lists/shift.js
|
|
2296
|
-
var shift = (list2) => {
|
|
2297
|
-
return list2.length > 0 ? [list2[0], list2.slice(1)] : void 0;
|
|
2298
|
-
};
|
|
2299
|
-
|
|
2300
|
-
// dist/runtime/meta/youtube-meta.js
|
|
2301
|
-
var getYouTubePageType = (url) => {
|
|
2302
|
-
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;
|
|
2303
|
-
};
|
|
2304
|
-
var youtubeMeta = (url) => {
|
|
2305
|
-
return isYouTubeUrl(url) ? {
|
|
2306
|
-
url,
|
|
2307
|
-
isYouTubeUrl: true,
|
|
2308
|
-
isShareUrl: isYouTubeShareUrl(url),
|
|
2309
|
-
pageType: getYouTubePageType(url)
|
|
2310
|
-
} : {
|
|
2311
|
-
url,
|
|
2312
|
-
isYouTubeUrl: false
|
|
2313
|
-
};
|
|
2314
|
-
};
|
|
2315
|
-
|
|
2316
|
-
// dist/runtime/meta/urlMeta.js
|
|
2317
|
-
var PROTOCOLS = Object.values(NETWORK_PROTOCOL_LOOKUP).flat().filter((i) => i !== "");
|
|
2318
|
-
var getUrlProtocol = (url) => {
|
|
2319
|
-
const proto = PROTOCOLS.find((p) => url.startsWith(`${p}://`));
|
|
2320
|
-
return proto;
|
|
2321
|
-
};
|
|
2322
|
-
var removeUrlProtocol = (url) => {
|
|
2323
|
-
return stripBefore(url, "://");
|
|
2324
|
-
};
|
|
2325
|
-
var ensurePath = (val) => val === "" ? "" : stripTrailing(ensureLeading(val, "/"), "/");
|
|
2326
|
-
var getUrlPath = (url) => {
|
|
2327
|
-
return isUrl(url) ? ensurePath(stripAfter(stripBefore(removeUrlProtocol(url), "/"), "?")) : Never;
|
|
2328
|
-
};
|
|
2329
|
-
var getUrlQueryParams = (url) => {
|
|
2330
|
-
const qp = stripBefore(url, "?");
|
|
2331
|
-
return qp === "" ? qp : `?${qp}`;
|
|
2332
|
-
};
|
|
2333
|
-
var getUrlPort = (url) => {
|
|
2334
|
-
const candidate = takeNumericCharacters(stripBefore(removeUrlProtocol(url), ":"));
|
|
2335
|
-
return candidate === "" ? "default" : Number(candidate);
|
|
2336
|
-
};
|
|
2337
|
-
var getUrlSource = (url) => {
|
|
2338
|
-
const candidate = stripAfter(stripAfter(stripAfter(removeUrlProtocol(url), "/"), "?"), ":");
|
|
2339
|
-
return isIpAddress(candidate) || isDomainName(candidate) ? candidate : Never;
|
|
2340
|
-
};
|
|
2341
|
-
var urlMeta = (url) => {
|
|
2342
|
-
return {
|
|
2343
|
-
url,
|
|
2344
|
-
isUrl: isUrl(url),
|
|
2345
|
-
protocol: getUrlProtocol(url),
|
|
2346
|
-
path: getUrlPath(url),
|
|
2347
|
-
queryParameters: getUrlQueryParams(url),
|
|
2348
|
-
port: getUrlPort(url),
|
|
2349
|
-
source: getUrlSource(url),
|
|
2350
|
-
isIpAddress: isIpAddress(getUrlSource(url)),
|
|
2351
|
-
isIp4Address: isIp4Address(getUrlSource(url)),
|
|
2352
|
-
isIp6Address: isIp6Address(getUrlSource(url))
|
|
2353
|
-
};
|
|
2354
|
-
};
|
|
2355
|
-
|
|
2356
|
-
// dist/runtime/runtime-types/shape-helpers/addToken.js
|
|
2357
|
-
var addToken = (token, ...params) => `<<${token}${params.length > 0 ? `::${params.join("::")}` : ""}>>`;
|
|
2358
|
-
|
|
2359
|
-
// dist/runtime/runtime-types/shape-helpers/atomics.js
|
|
2360
|
-
var boolean = (literal2) => isDefined(literal2) ? isTrue(literal2) ? addToken("true") : isFalse(literal2) ? addToken("false") : addToken("boolean") : addToken("boolean");
|
|
2361
|
-
var unknown = () => "<<unknown>>";
|
|
2362
|
-
var undefinedType = () => "<<undefined>>";
|
|
2363
|
-
var nullType = () => "<<null>>";
|
|
2364
|
-
|
|
2365
|
-
// dist/runtime/runtime-types/shape-helpers/singletons.js
|
|
2366
|
-
var addSingleton = (token, api) => (...literals) => {
|
|
2367
|
-
return literals.length === 0 ? api ? api : addToken(token) : literals.length === 1 ? addToken(token, literals[0]) : addToken("union", literals.map((l) => addToken(token, `${l}`)).join(","));
|
|
2368
|
-
};
|
|
2369
|
-
var stringApi = {
|
|
2370
|
-
zip: () => addToken("string-set", "Zip5"),
|
|
2371
|
-
zipPlus4: () => addToken("string-set", "Zip5_4"),
|
|
2372
|
-
zipCode: () => addToken("string-set", "ZipCode"),
|
|
2373
|
-
militaryTime: (resolution) => {
|
|
2374
|
-
return addToken("string-set", "militaryTime", resolution || "HH:MM");
|
|
2375
|
-
},
|
|
2376
|
-
civilianTime: (resolution) => {
|
|
2377
|
-
return addToken("string-set", "militaryTime", resolution || "HH:MM");
|
|
2378
|
-
},
|
|
2379
|
-
numericString: () => addToken("string-set", "numeric"),
|
|
2380
|
-
ipv4Address: () => addToken("string-set", "ipv4Address"),
|
|
2381
|
-
ipv6Address: () => addToken("string-set", "ipv6Address"),
|
|
2382
|
-
done: () => addToken("string")
|
|
2383
|
-
};
|
|
2384
|
-
var string = addSingleton("string", stringApi);
|
|
2385
|
-
var number = addSingleton("number");
|
|
2386
|
-
|
|
2387
|
-
// dist/runtime/runtime-types/shape-helpers/functions.js
|
|
2388
|
-
var fn = (..._args) => ({
|
|
2389
|
-
returns: (_rtn) => ({
|
|
2390
|
-
addProperties: (_kv) => {
|
|
2391
|
-
return null;
|
|
2392
|
-
},
|
|
2393
|
-
done: () => {
|
|
2394
|
-
return null;
|
|
2395
|
-
}
|
|
2396
|
-
}),
|
|
2397
|
-
done: () => {
|
|
2398
|
-
const result2 = null;
|
|
2399
|
-
return result2;
|
|
2400
|
-
}
|
|
2401
|
-
});
|
|
2402
|
-
|
|
2403
|
-
// dist/runtime/runtime-types/shape-helpers/literal-containers.js
|
|
2404
|
-
var dictionary = (_obj) => {
|
|
2405
|
-
return null;
|
|
2406
|
-
};
|
|
2407
|
-
var tuple2 = (..._elements) => {
|
|
2408
|
-
return null;
|
|
2409
|
-
};
|
|
2410
|
-
|
|
2411
|
-
// dist/runtime/runtime-types/shape-helpers/wide-containers.js
|
|
2412
|
-
var record = (_key, _value) => {
|
|
2413
|
-
return null;
|
|
2414
|
-
};
|
|
2415
|
-
var array = (_type) => {
|
|
2416
|
-
return null;
|
|
2417
|
-
};
|
|
2418
|
-
var set = (_type) => {
|
|
2419
|
-
return null;
|
|
2420
|
-
};
|
|
2421
|
-
var map = (_key, _value) => {
|
|
2422
|
-
return null;
|
|
2423
|
-
};
|
|
2424
|
-
var weakMap = (_key, _value) => {
|
|
2425
|
-
return null;
|
|
2426
|
-
};
|
|
2427
|
-
|
|
2428
|
-
// dist/runtime/runtime-types/shape-helpers/union.js
|
|
2429
|
-
var union2 = (...elements) => {
|
|
2430
|
-
const result2 = elements.map((_el) => {
|
|
2431
|
-
});
|
|
2432
|
-
return result2;
|
|
2433
|
-
};
|
|
2434
|
-
|
|
2435
|
-
// dist/runtime/runtime-types/shape.js
|
|
2436
|
-
var isAddOrDone = (val) => {
|
|
2437
|
-
return isObject(val) && hasKeys("add", "done") && typeof val.done === "function" && typeof val.add === "function";
|
|
2438
|
-
};
|
|
2439
|
-
var ShapeApiImplementation = {
|
|
2440
|
-
string,
|
|
2441
|
-
number,
|
|
2442
|
-
boolean,
|
|
2443
|
-
unknown,
|
|
2444
|
-
undefined: undefinedType,
|
|
2445
|
-
null: nullType,
|
|
2446
|
-
union: union2,
|
|
2447
|
-
fn,
|
|
2448
|
-
record,
|
|
2449
|
-
array,
|
|
2450
|
-
set,
|
|
2451
|
-
map,
|
|
2452
|
-
weakMap,
|
|
2453
|
-
dictionary,
|
|
2454
|
-
tuple: tuple2
|
|
2455
|
-
};
|
|
2456
|
-
var shape = (cb2) => {
|
|
2457
|
-
const rtn = cb2(ShapeApiImplementation);
|
|
2458
|
-
return handleDoneFn(isAddOrDone(rtn) ? rtn.done() : rtn);
|
|
2459
|
-
};
|
|
2460
|
-
var isShape = (v) => {
|
|
2461
|
-
return isString(v) && v.startsWith("<<") && v.endsWith(">>") && SHAPE_PREFIXES.some((i) => v.startsWith(`<<${i}`)) ? true : false;
|
|
2462
|
-
};
|
|
2463
|
-
|
|
2464
|
-
// dist/runtime/runtime-types/choices.js
|
|
2465
|
-
var choices = "NOT READY";
|
|
2466
|
-
|
|
2467
|
-
// dist/runtime/runtime-types/list.js
|
|
2468
|
-
var createProxy = (...initialize) => {
|
|
2469
|
-
const state = initialize;
|
|
2470
|
-
state.id = null;
|
|
2471
|
-
const proxy = new Proxy(state, {});
|
|
2472
|
-
Object.defineProperty(proxy, "id", {
|
|
2473
|
-
enumerable: false
|
|
2474
|
-
});
|
|
2475
|
-
return proxy;
|
|
2476
|
-
};
|
|
2477
|
-
var list = (...init) => {
|
|
2478
|
-
return init.length === 1 && isArray(init[0]) ? createProxy(...init[0]) : createProxy(...init);
|
|
2479
|
-
};
|
|
2480
|
-
|
|
2481
|
-
// dist/runtime/runtime-types/dict.js
|
|
2482
|
-
var process = (obj, _narrow, _opt) => {
|
|
2483
|
-
return Object.defineProperty(obj, "__id", { enumerable: false });
|
|
2484
|
-
};
|
|
2485
|
-
var dict = (obj, ...props) => process(obj, (props || []).filter((i) => !i.startsWith("opt:")), (props || []).filter((i) => i.startsWith("opt:")));
|
|
2486
|
-
|
|
2487
|
-
// dist/runtime/runtime-types/ip6Prefix.js
|
|
2488
|
-
var ip6Prefix = (...groups) => {
|
|
2489
|
-
const empty = addToken("string");
|
|
2490
|
-
let count = 4 - groups.length;
|
|
2491
|
-
let fillIn = [];
|
|
2492
|
-
for (let index = 0; index < count; index++) {
|
|
2493
|
-
fillIn.push(empty);
|
|
2494
|
-
}
|
|
2495
|
-
return [
|
|
2496
|
-
"<<string::",
|
|
2497
|
-
[
|
|
2498
|
-
groups.join(":"),
|
|
2499
|
-
fillIn.join(":")
|
|
2500
|
-
].join(":"),
|
|
2501
|
-
">>"
|
|
2502
|
-
].join("");
|
|
2503
|
-
};
|
|
2504
|
-
|
|
2505
|
-
// dist/runtime/runtime-types/shape-helpers/getTokenName.js
|
|
2506
|
-
var getTokenName = (token) => {
|
|
2507
|
-
const [name, ..._rest] = stripLeading(token, "<<").split("::");
|
|
2508
|
-
return name;
|
|
2509
|
-
};
|
|
2510
|
-
|
|
2511
|
-
// dist/runtime/runtime-types/shape-helpers/getTokenData.js
|
|
2512
|
-
var getTokenData = (token) => {
|
|
2513
|
-
const [_name, ...rest] = stripTrailing(token, ">>").split("::");
|
|
2514
|
-
return rest;
|
|
2515
|
-
};
|
|
2516
|
-
|
|
2517
|
-
// dist/runtime/runtime-types/parse.js
|
|
2518
|
-
var handleTypeToken = (token) => () => {
|
|
2519
|
-
return {
|
|
2520
|
-
isToken: true,
|
|
2521
|
-
type: null,
|
|
2522
|
-
token,
|
|
2523
|
-
tokenName: getTokenName(token),
|
|
2524
|
-
tokenData: getTokenData(token)
|
|
2525
|
-
};
|
|
2526
|
-
};
|
|
2527
|
-
var parse = (value) => {
|
|
2528
|
-
return isShape(value) ? handleTypeToken(value)() : {
|
|
2529
|
-
isToken: false,
|
|
2530
|
-
type: value
|
|
2531
|
-
};
|
|
2532
|
-
};
|
|
2533
|
-
|
|
2534
|
-
// dist/runtime/type-guards/isArray.js
|
|
2535
|
-
function isArray(value) {
|
|
2536
|
-
return Array.isArray(value) === true;
|
|
2537
|
-
}
|
|
2538
|
-
|
|
2539
|
-
// dist/runtime/sets/uniqueKeys.js
|
|
2540
|
-
var uniqueKeys = (left, right) => {
|
|
2541
|
-
const isNumeric = isArray(left) && isArray(right) ? true : false;
|
|
2542
|
-
if (isArray(left) && !isArray(right) || isArray(right) && !isArray(left)) {
|
|
2543
|
-
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!");
|
|
2544
|
-
}
|
|
2545
|
-
const l = isNumeric ? Object.keys(left).map((i) => Number(i)) : Object.keys(left);
|
|
2546
|
-
const r = isNumeric ? Object.keys(right).map((i) => Number(i)) : Object.keys(right);
|
|
2547
|
-
if (isNumeric) {
|
|
2548
|
-
throw new Error("uniqueKeys does not yet work with tuples");
|
|
2549
|
-
}
|
|
2550
|
-
const leftKeys = l.filter((i) => !r.includes(i));
|
|
2551
|
-
const rightKeys = r.filter((i) => !l.includes(i));
|
|
2552
|
-
return [
|
|
2553
|
-
"LeftRight",
|
|
2554
|
-
leftKeys,
|
|
2555
|
-
rightKeys
|
|
2556
|
-
];
|
|
2557
|
-
};
|
|
2558
|
-
|
|
2559
|
-
// dist/runtime/type-guards/isDefined.js
|
|
2560
|
-
function isDefined(value) {
|
|
2561
|
-
return typeof value === "undefined" ? false : true;
|
|
2562
|
-
}
|
|
2563
|
-
|
|
2564
|
-
// dist/runtime/type-guards/isFalsy.js
|
|
2565
|
-
var isFalsy = (val) => {
|
|
2566
|
-
return FALSY_VALUES.includes(val);
|
|
2567
|
-
};
|
|
2568
|
-
|
|
2569
|
-
// dist/runtime/type-guards/isNull.js
|
|
2570
|
-
function isNull(value) {
|
|
2571
|
-
return value === null ? true : false;
|
|
2572
|
-
}
|
|
2573
|
-
|
|
2574
|
-
// dist/runtime/type-guards/isNotNull.js
|
|
2575
|
-
function isNotNull(value) {
|
|
2576
|
-
return value === null ? true : false;
|
|
2577
|
-
}
|
|
2578
|
-
|
|
2579
|
-
// dist/runtime/type-guards/isTruthy.js
|
|
2580
|
-
var isTruthy = (val) => {
|
|
2581
|
-
return !FALSY_VALUES.includes(val);
|
|
2582
|
-
};
|
|
2583
|
-
|
|
2584
|
-
// dist/runtime/type-guards/isTypeTuple.js
|
|
2585
|
-
function isTypeTuple(value) {
|
|
2586
|
-
return Array.isArray(value) && value.length === 3 && typeof value[1] === "function";
|
|
2587
|
-
}
|
|
2588
|
-
|
|
2589
|
-
// dist/runtime/type-guards/isBoolean.js
|
|
2590
|
-
function isBoolean(value) {
|
|
2591
|
-
return typeof value === "boolean";
|
|
2592
|
-
}
|
|
2593
|
-
|
|
2594
|
-
// dist/runtime/type-guards/isString.js
|
|
2595
|
-
function isString(value) {
|
|
2596
|
-
return typeof value === "string";
|
|
2597
|
-
}
|
|
2598
|
-
|
|
2599
|
-
// dist/runtime/type-guards/isIndexable.js
|
|
2600
|
-
function isIndexable(value) {
|
|
2601
|
-
return Array.isArray(value) || typeof value === "object" && keysOf(value).length > 0 ? true : false;
|
|
2602
|
-
}
|
|
2603
|
-
|
|
2604
|
-
// dist/runtime/type-guards/isObject.js
|
|
2605
|
-
function isObject(value) {
|
|
2606
|
-
return typeof value === "object" && value !== null && Array.isArray(value) === false;
|
|
2607
|
-
}
|
|
2608
|
-
|
|
2609
|
-
// dist/runtime/type-guards/isTrue.js
|
|
2610
|
-
function isTrue(value) {
|
|
2611
|
-
return value === true;
|
|
2612
|
-
}
|
|
2613
|
-
|
|
2614
|
-
// dist/runtime/type-guards/isConstant.js
|
|
2615
|
-
function isConstant(value) {
|
|
2616
|
-
return isObject(value) && "_type" in value && "kind" in value && value._type === "Constant" ? true : false;
|
|
2617
|
-
}
|
|
2618
|
-
|
|
2619
|
-
// dist/runtime/type-guards/isNever.js
|
|
2620
|
-
var isNever = (val) => {
|
|
2621
|
-
return isConstant(val) && val.kind === "never";
|
|
2622
|
-
};
|
|
2623
|
-
|
|
2624
|
-
// dist/runtime/type-guards/isContainer.js
|
|
2625
|
-
function isContainer(value) {
|
|
2626
|
-
return Array.isArray(value) || isObject(value) ? true : false;
|
|
2627
|
-
}
|
|
2628
|
-
|
|
2629
|
-
// dist/runtime/type-guards/isSpecificConstant.js
|
|
2630
|
-
function isSpecificConstant(kind) {
|
|
2631
|
-
return (value) => {
|
|
2632
|
-
return isConstant(value) && value.kind === kind ? true : false;
|
|
2633
|
-
};
|
|
2634
|
-
}
|
|
2635
|
-
|
|
2636
|
-
// dist/runtime/type-guards/isReadonlyArray.js
|
|
2637
|
-
function isReadonlyArray(value) {
|
|
2638
|
-
return Array.isArray(value) === true;
|
|
2639
|
-
}
|
|
2640
|
-
|
|
2641
|
-
// dist/runtime/type-guards/hasIndexOf.js
|
|
2642
|
-
var hasIndexOf = (value, idx) => {
|
|
2643
|
-
const result2 = isObject(value) ? String(idx) in value : Array.isArray(value) ? Number(idx) in value : false;
|
|
2644
|
-
return isErrorCondition(result2, "invalid-index") ? false : result2;
|
|
2645
|
-
};
|
|
2646
|
-
|
|
2647
|
-
// dist/runtime/type-guards/isRef.js
|
|
2648
|
-
function isRef(value) {
|
|
2649
|
-
return isObject(value) && "value" in value && Array.from(Object.keys(value)).includes("_value");
|
|
2650
|
-
}
|
|
2651
|
-
|
|
2652
|
-
// dist/runtime/type-guards/isFalse.js
|
|
2653
|
-
function isFalse(i) {
|
|
2654
|
-
return typeof i === "boolean" && !i;
|
|
2655
|
-
}
|
|
2656
|
-
|
|
2657
|
-
// dist/runtime/type-guards/hasDefaultValue.js
|
|
2658
|
-
function hasDefaultValue(value) {
|
|
2659
|
-
const noDefault = isSpecificConstant("no-default-value");
|
|
2660
|
-
return noDefault(value) ? false : true;
|
|
2661
|
-
}
|
|
2662
|
-
|
|
2663
|
-
// dist/runtime/type-guards/isNumericString.js
|
|
2664
|
-
function isNumericString(value) {
|
|
2665
|
-
const validChars = [...NUMERIC_CHAR, "x", "E"];
|
|
2666
|
-
return typeof value === "string" && split(value).every((i) => validChars.includes(i));
|
|
2667
|
-
}
|
|
2668
|
-
|
|
2669
|
-
// dist/runtime/type-guards/isFnWithParams.js
|
|
2670
|
-
function isFnWithParams(input) {
|
|
2671
|
-
var _a;
|
|
2672
|
-
return typeof input === "function" && ((_a = Object.keys(input)) == null ? void 0 : _a.length) > 0;
|
|
2673
|
-
}
|
|
2674
|
-
|
|
2675
|
-
// dist/runtime/type-guards/isFunction.js
|
|
2676
|
-
function isFunction(value) {
|
|
2677
|
-
return typeof value === "function" ? true : false;
|
|
2678
|
-
}
|
|
2679
|
-
|
|
2680
|
-
// dist/runtime/type-guards/isNumber.js
|
|
2681
|
-
function isNumber(value) {
|
|
2682
|
-
return typeof value === "number";
|
|
2683
|
-
}
|
|
2684
|
-
|
|
2685
|
-
// dist/runtime/type-guards/isNothing.js
|
|
2686
|
-
function isNothing(val) {
|
|
2687
|
-
return val === null || val === void 0 ? true : false;
|
|
2688
|
-
}
|
|
2689
|
-
|
|
2690
|
-
// dist/runtime/type-guards/isSymbol.js
|
|
2691
|
-
function isSymbol(value) {
|
|
2692
|
-
return typeof value === "symbol";
|
|
2693
|
-
}
|
|
2694
|
-
|
|
2695
|
-
// dist/runtime/type-guards/isScalar.js
|
|
2696
|
-
function isScalar(value) {
|
|
2697
|
-
return isString(value) || isNumber(value) || isSymbol(value) || isNull(value);
|
|
2698
|
-
}
|
|
2699
|
-
|
|
2700
|
-
// dist/runtime/type-guards/isTypeToken.js
|
|
2701
|
-
function isTypeToken(val) {
|
|
2702
|
-
if (isString(val) && startsWith("<<")(val) && endsWith(">>")(val)) {
|
|
2703
|
-
return true;
|
|
2704
|
-
} else {
|
|
2705
|
-
return false;
|
|
2706
|
-
}
|
|
2707
|
-
}
|
|
2708
|
-
|
|
2709
|
-
// dist/runtime/type-guards/isErrorCondition.js
|
|
2710
|
-
function isErrorCondition(value, kind = null) {
|
|
2711
|
-
return isObject(value) && "__kind" in value && value.__kind === "ErrorCondition" && "kind" in value ? kind !== null ? value["kind"] === kind : true : false;
|
|
2712
|
-
}
|
|
2713
|
-
|
|
2714
|
-
// dist/runtime/type-guards/hasKeys.js
|
|
2715
|
-
var hasKeys = (...props) => (
|
|
2716
|
-
/**
|
|
2717
|
-
* Type guard which validates whether the configured properties
|
|
2718
|
-
* exist on a given `Record<ObjectKey, unknown` and if they do at
|
|
2719
|
-
* runtime will provide the type support for them.
|
|
2720
|
-
*/
|
|
2721
|
-
(val) => {
|
|
2722
|
-
const keys = Array.isArray(props) ? props : Object.keys(props).filter((i) => typeof i === "string");
|
|
2723
|
-
return (isFunction(val) || isObject(val)) && keys.every((k) => k in val) ? true : false;
|
|
2724
|
-
}
|
|
2725
|
-
);
|
|
2726
|
-
|
|
2727
|
-
// dist/runtime/type-guards/isDoneFn.js
|
|
2728
|
-
var isDoneFn = (val) => {
|
|
2729
|
-
return hasKeys("done")(val) && typeof val.done === "function";
|
|
2730
|
-
};
|
|
2731
|
-
|
|
2732
|
-
// dist/runtime/type-guards/isUrl.js
|
|
2733
|
-
var isUri = (val, ...protocols) => {
|
|
2734
|
-
const p = protocols.length === 0 ? valuesOf(NETWORK_PROTOCOL_LOOKUP).flat().filter((i) => i) : protocols;
|
|
2735
|
-
return isString(val) && p.some((i) => val.startsWith(`${i}://`));
|
|
2736
|
-
};
|
|
2737
|
-
var isUrl = (val, ...protocols) => {
|
|
2738
|
-
const p = protocols.length === 0 ? ["http", "https"] : protocols;
|
|
2739
|
-
return isString(val) && p.some((i) => val.startsWith(`${i}://`));
|
|
2740
|
-
};
|
|
2741
|
-
|
|
2742
|
-
// dist/runtime/type-guards/isCssAspectRatio.js
|
|
2743
|
-
var tokens = [
|
|
2744
|
-
"1",
|
|
2745
|
-
"inherit",
|
|
2746
|
-
"initial",
|
|
2747
|
-
"revert",
|
|
2748
|
-
"revert-layer",
|
|
2749
|
-
"unset",
|
|
2750
|
-
"auto"
|
|
2751
|
-
];
|
|
2752
|
-
var isRatio = (val) => /[0-9]{1,4}\s*\/\s*[0-9]{1,4}/.test(val);
|
|
2753
|
-
var isCssAspectRatio = (val) => {
|
|
2754
|
-
return isString(val) && val.split(/\s+/).every((i) => tokens.includes(i) || isRatio(i));
|
|
2755
|
-
};
|
|
2756
|
-
|
|
2757
|
-
// dist/runtime/type-guards/isInlineSvg.js
|
|
2758
|
-
var isInlineSvg = (v) => {
|
|
2759
|
-
return isString(v) && v.trim().startsWith(`<svg`) && v.trim().endsWith(`</svg>`);
|
|
2760
|
-
};
|
|
2761
|
-
|
|
2762
|
-
// dist/runtime/type-guards/isAlpha.js
|
|
2763
|
-
var isAlpha = (value) => {
|
|
2764
|
-
return isString(value) && split(value).every((v) => ALPHA_CHARS.includes(v));
|
|
2765
|
-
};
|
|
2766
|
-
|
|
2767
|
-
// dist/runtime/type-guards/isHexadecimal.js
|
|
2768
|
-
var isHexadecimal = (val) => {
|
|
2769
|
-
return isString(val) && asChars(val).every((i) => isNumericString(i) || ["a", "b", "c", "d", "e", "f"].includes(i.toLowerCase()));
|
|
2770
|
-
};
|
|
2771
|
-
|
|
2772
|
-
// dist/runtime/type-guards/network-tg.js
|
|
2773
|
-
var isIp4Address = (val) => {
|
|
2774
|
-
return isString(val) && val.split(".").length === 4 && val.split(".").every((i) => isNumericString(i)) && val.split(".").every((i) => Number(i) >= 0 && Number(i) <= 255);
|
|
2775
|
-
};
|
|
2776
|
-
var isIp6Address = (val) => {
|
|
2777
|
-
const expanded = isString(val) ? ip6GroupExpansion(val) : "";
|
|
2778
|
-
return isString(val) && isString(expanded) && expanded.split(":").every((i) => asChars(i).length >= 1 && asChars(i).length <= 4) && expanded.split(":").every((i) => isHexadecimal(i));
|
|
2779
|
-
};
|
|
2780
|
-
var isIpAddress = (val) => {
|
|
2781
|
-
return isIp4Address(val) || isIp6Address(val);
|
|
2782
|
-
};
|
|
2783
|
-
var hasUrlPort = (val) => {
|
|
2784
|
-
return isString(val) && asChars(removeUrlProtocol(val)).some((i) => i === ":");
|
|
2785
|
-
};
|
|
2786
|
-
var isUrlPath = (val) => {
|
|
2787
|
-
return isString(val) && (val === "" || val.startsWith("/")) && asChars(val).every((c) => isAlpha(c) || isNumericString(c) || c === "_" || c === "@" || c === "." || c === "-");
|
|
2788
|
-
};
|
|
2789
|
-
var isDomainName = (val) => {
|
|
2790
|
-
return isString(val) && val.split(".").filter((i) => i).length > 1 && isString(val.split(".").filter((i) => i).pop()) && asChars(val.split(".").filter((i) => i).pop()).length > 1 && val.split(".").filter((i) => i).every((i) => isAlpha(i) || isNumericString(i) || i === "-" || i === "_");
|
|
2791
|
-
};
|
|
2792
|
-
var isUrlSource = (val) => {
|
|
2793
|
-
return isDomainName(val) || isIpAddress(val);
|
|
2794
|
-
};
|
|
2795
|
-
var hasUrlQueryParameter = (val, prop) => {
|
|
2796
|
-
const re = new RegExp(`${prop}=`);
|
|
2797
|
-
return isString(val) && re.test(getUrlQueryParams(val));
|
|
2798
|
-
};
|
|
2799
|
-
|
|
2800
|
-
// dist/runtime/type-guards/youtube.js
|
|
2801
|
-
var isYouTubeUrl = (val) => {
|
|
2802
|
-
return isString(val) && (val.startsWith("https://www.youtube.com") || val.startsWith("https://youtube.com") || val.startsWith("https://youtu.be"));
|
|
2803
|
-
};
|
|
2804
|
-
var isYouTubeShareUrl = (val) => {
|
|
2805
|
-
return isString(val) && val.startsWith(`https://youtu.be`);
|
|
2806
|
-
};
|
|
2807
|
-
var isYouTubeVideoUrl = (val) => {
|
|
2808
|
-
return isString(val) && (val.startsWith("https://www.youtube.com") || val.startsWith("https://youtube.com") || val.startsWith("https://youtu.be"));
|
|
2809
|
-
};
|
|
2810
|
-
var isYouTubePlaylistUrl = (val) => {
|
|
2811
|
-
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`));
|
|
2812
|
-
};
|
|
2813
|
-
var feed_map = (type) => {
|
|
2814
|
-
return isUndefined(type) ? `/feed` : type === "liked" ? `/playlist?list=LL` : ["history", "playlists", "trending", "subscriptions"].includes(type) ? `/feed/${type}` : `/feed/`;
|
|
2815
|
-
};
|
|
2816
|
-
var isYouTubeFeedUrl = (val, type = void 0) => {
|
|
2817
|
-
return isString(val) && (val.startsWith(`https://www.youtube.com${feed_map(type)}`) || val.startsWith(`https://youtube.com${feed_map(type)}`));
|
|
2818
|
-
};
|
|
2819
|
-
var isYouTubeCreatorUrl = (url) => {
|
|
2820
|
-
return isString(url) && (url.startsWith(`https://www.youtube.com/@`) || url.startsWith(`https://youtube.com/@`) || url.startsWith(`https://www.youtube.com/channel/`));
|
|
2821
|
-
};
|
|
2822
|
-
var isYouTubeVideosInPlaylist = (val) => {
|
|
2823
|
-
return isString(val) && (val.startsWith(`https://www.youtube.com/playlist?`) || val.startsWith(`https://youtube.com/playlist?`)) && hasUrlQueryParameter(val, "list");
|
|
2824
|
-
};
|
|
2825
|
-
|
|
2826
|
-
// dist/runtime/type-guards/repos.js
|
|
2827
|
-
var isRepoSource = (v) => {
|
|
2828
|
-
return isString(v) && REPO_SOURCES.includes(v);
|
|
2829
|
-
};
|
|
2830
|
-
var isSemanticVersion = (v, allowPrefix = false) => {
|
|
2831
|
-
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())));
|
|
2832
|
-
};
|
|
2833
|
-
var isRepoUrl = (val) => {
|
|
2834
|
-
const baseUrls = valuesOf(REPO_SOURCE_LOOKUP).flat();
|
|
2835
|
-
return isString(val) && baseUrls.every((u) => val === u || val.startsWith(`${u}/`));
|
|
2836
|
-
};
|
|
2837
|
-
var isGithubUrl = (val) => {
|
|
2838
|
-
const baseUrls = REPO_SOURCE_LOOKUP["github"];
|
|
2839
|
-
return isString(val) && baseUrls.every((u) => val === u || val.startsWith(`${u}/`));
|
|
2840
|
-
};
|
|
2841
|
-
var isGithubRepoUrl = (val) => {
|
|
2842
|
-
const baseUrls = [""];
|
|
2843
|
-
return isString(val) && baseUrls.every((u) => val === u || val.startsWith(`${u}/`));
|
|
2844
|
-
};
|
|
2845
|
-
var isBitbucketUrl = (val) => {
|
|
2846
|
-
const baseUrls = REPO_SOURCE_LOOKUP["bitbucket"];
|
|
2847
|
-
return isString(val) && baseUrls.every((u) => val === u || val.startsWith(`${u}/`));
|
|
2848
|
-
};
|
|
2849
|
-
var isCodeCommitUrl = (val) => {
|
|
2850
|
-
const baseUrls = REPO_SOURCE_LOOKUP["codecommit"];
|
|
2851
|
-
return isString(val) && baseUrls.every((u) => val === u || val.startsWith(`${u}/`));
|
|
2852
|
-
};
|
|
2853
|
-
|
|
2854
|
-
// dist/runtime/type-guards/isTrimmable.js
|
|
2855
|
-
var isTrimable = (val) => {
|
|
2856
|
-
return isString(val) && val !== val.trim();
|
|
2857
|
-
};
|
|
2858
|
-
|
|
2859
|
-
// dist/runtime/type-guards/hasWhitespace.js
|
|
2860
|
-
var hasWhiteSpace = (val) => {
|
|
2861
|
-
return isString(val) && asChars(val).some((c) => WHITESPACE_CHARS.includes(c));
|
|
2862
|
-
};
|
|
2863
|
-
|
|
2864
|
-
// dist/runtime/type-guards/isEmail.js
|
|
2865
|
-
var isEmail = (val) => {
|
|
2866
|
-
return isString(val) && (val.split("@").length === 2 && val.split("@")[1].split(".").length > 1 && asChars(last(val.split("@")[1].split("."))).length > 1);
|
|
2867
|
-
};
|
|
2868
|
-
|
|
2869
|
-
// dist/runtime/type-guards/isPhoneNumber.js
|
|
2870
|
-
var isPhoneNumber = (val) => {
|
|
2871
|
-
return isString(val) && ["+", "(", ...NUMERIC_CHAR].includes(asChars(val.trim())[0]) && [...NUMERIC_CHAR].includes([...asChars(val.trim())].pop()) && (val.trim().startsWith(`+`) ? asChars(retainChars(val, ...NUMERIC_CHAR)).length >= 8 : val.trim().startsWith("00") ? asChars(retainChars(val, ...NUMERIC_CHAR)).length >= 10 : asChars(retainChars(val, ...NUMERIC_CHAR)).length >= 7) && stripChars(val, ...NUMERIC_CHAR, ...WHITESPACE_CHARS, "(", ")", "+", ".", "-") === "";
|
|
2872
|
-
};
|
|
2873
|
-
|
|
2874
|
-
// dist/runtime/type-guards/isUnset.js
|
|
2875
|
-
var isUnset = (val) => {
|
|
2876
|
-
return isObject(val) && val.kind === "Unset";
|
|
2877
|
-
};
|
|
2878
|
-
var isSet = (val) => {
|
|
2879
|
-
return isObject(val) ? val.kind !== "Unset" ? true : false : true;
|
|
2880
|
-
};
|
|
2881
|
-
|
|
2882
|
-
// dist/runtime/type-guards/api-tg.js
|
|
2883
|
-
var isEscapeFunction = (val) => {
|
|
2884
|
-
return isFunction(val) && "escape" in val && val.escape === true;
|
|
2885
|
-
};
|
|
2886
|
-
var isOptionalParamFunction = (val) => {
|
|
2887
|
-
return isFunction(val) && "optionalParams" in val && val.optionalParams === true;
|
|
2888
|
-
};
|
|
2889
|
-
var isApi = (api) => {
|
|
2890
|
-
return isObject(api) && "surface" in api && "_kind" in api && api._kind === "api";
|
|
2891
|
-
};
|
|
2892
|
-
var isApiSurface = (val) => {
|
|
2893
|
-
return isObject(val) && Object.keys(val).some((k) => isEscapeFunction(val[k]));
|
|
2894
|
-
};
|
|
2895
|
-
|
|
2896
|
-
// dist/runtime/boolean-logic/ifString.js
|
|
2897
|
-
function ifString(val, ifVal, elseVal) {
|
|
2898
|
-
return isString(val) ? ifVal(val) : elseVal(val);
|
|
2899
|
-
}
|
|
2900
|
-
|
|
2901
|
-
// dist/runtime/boolean-logic/ifNumber.js
|
|
2902
|
-
function ifNumber(val, ifVal, elseVal) {
|
|
2903
|
-
return isNumber(val) ? ifVal(val) : elseVal(val);
|
|
2904
|
-
}
|
|
2905
|
-
|
|
2906
|
-
// dist/runtime/type-guards/higher-order/endsWith.js
|
|
2907
|
-
var endsWith = (endingIn2) => (val) => {
|
|
2908
|
-
return ifString(val, (v) => v.endsWith(endingIn2) ? true : false, (v) => ifNumber(v, (n) => String(n).endsWith(endingIn2) ? true : false, () => false));
|
|
2909
|
-
};
|
|
2910
|
-
|
|
2911
|
-
// dist/runtime/type-guards/higher-order/startsWith.js
|
|
2912
|
-
var startsWith = (startingWith) => (val) => {
|
|
2913
|
-
return isString(val) ? val.startsWith(startingWith) ? true : false : isNumber(val) ? String(val).startsWith(startingWith) ? true : false : false;
|
|
2914
|
-
};
|
|
2915
|
-
|
|
2916
|
-
// dist/runtime/type-guards/higher-order/isSameTypeOf.js
|
|
2917
|
-
var isSameTypeOf = (base) => (compare) => {
|
|
2918
|
-
return typeof base === typeof compare;
|
|
2919
|
-
};
|
|
2920
|
-
|
|
2921
|
-
// dist/runtime/type-guards/higher-order/isEqual.js
|
|
2922
|
-
var isEqual = (base) => (value) => isSameTypeOf(base)(value) ? value === base ? true : false : false;
|
|
2923
|
-
|
|
2924
|
-
// dist/runtime/type-guards/higher-order/isLength.js
|
|
2925
|
-
function isLength(value, len) {
|
|
2926
|
-
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;
|
|
2927
|
-
}
|
|
2928
|
-
|
|
2929
|
-
// dist/runtime/type-guards/higher-order/isTypeOf.js
|
|
2930
|
-
var isTypeOf = (type) => (value) => {
|
|
2931
|
-
return typeof value === type;
|
|
2932
|
-
};
|
|
2933
|
-
|
|
2934
|
-
// dist/runtime/type-guards/higher-order/isTuple.js
|
|
2935
|
-
var isTuple = (...tuple3) => {
|
|
2936
|
-
const results = tuple3.map((i) => i(ShapeApiImplementation)).map((i) => isDoneFn(i) ? i.done() : i);
|
|
2937
|
-
return (v) => {
|
|
2938
|
-
return isArray(v) && v.length === results.length && results.every(isShape) && v.every((item, idx) => isSameTypeOf(results[idx])(item));
|
|
2939
|
-
};
|
|
2940
|
-
};
|
|
2941
|
-
|
|
2942
|
-
// dist/runtime/vuejs/asVueRef.js
|
|
2943
|
-
var asVueRef = (value) => ({
|
|
2944
|
-
value,
|
|
2945
|
-
_value: null
|
|
2946
|
-
});
|
|
2947
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
2948
|
-
0 && (module.exports = {
|
|
2949
|
-
ALPHA_CHARS,
|
|
2950
|
-
COMMA,
|
|
2951
|
-
COMMON_OBJ_PROPS,
|
|
2952
|
-
CONSONANTS,
|
|
2953
|
-
DEFAULT_MANY_TO_ONE_MAPPING,
|
|
2954
|
-
DEFAULT_ONE_TO_MANY_MAPPING,
|
|
2955
|
-
DEFAULT_ONE_TO_ONE_MAPPING,
|
|
2956
|
-
FALSY_TYPE_KINDS,
|
|
2957
|
-
FALSY_VALUES,
|
|
2958
|
-
FILTER,
|
|
2959
|
-
GITHUB_INSIGHT_CATEGORY_LOOKUP,
|
|
2960
|
-
HASH_TABLE_ALPHA_LOWER,
|
|
2961
|
-
HASH_TABLE_ALPHA_UPPER,
|
|
2962
|
-
HASH_TABLE_CHAR,
|
|
2963
|
-
HASH_TABLE_DIGIT,
|
|
2964
|
-
HASH_TABLE_OTHER,
|
|
2965
|
-
HASH_TABLE_SPECIAL,
|
|
2966
|
-
HASH_TABLE_WIDE,
|
|
2967
|
-
IPv4,
|
|
2968
|
-
IPv6,
|
|
2969
|
-
LITERAL_TYPE_KINDS,
|
|
2970
|
-
LOWER_ALPHA_CHARS,
|
|
2971
|
-
MARKED,
|
|
2972
|
-
MONTH_ABBR,
|
|
2973
|
-
MONTH_NAME,
|
|
2974
|
-
MapCardinality,
|
|
2975
|
-
NARROW_CONTAINER_TYPE_KINDS,
|
|
2976
|
-
NETWORK_PROTOCOL_LOOKUP,
|
|
2977
|
-
NON_ZERO_NUMERIC_CHAR,
|
|
2978
|
-
NOT_APPLICABLE,
|
|
2979
|
-
NOT_DEFINED,
|
|
2980
|
-
NO_DEFAULT_VALUE,
|
|
2981
|
-
NUMERIC_CHAR,
|
|
2982
|
-
NUMERIC_DIGIT,
|
|
2983
|
-
Never,
|
|
2984
|
-
OPTION,
|
|
2985
|
-
PHONE_COUNTRY_CODES,
|
|
2986
|
-
PHONE_FORMAT,
|
|
2987
|
-
PLURAL_EXCEPTIONS,
|
|
2988
|
-
PLURAL_EXCEPTIONS_OLD,
|
|
2989
|
-
PROXMOX_CT_STATE,
|
|
2990
|
-
REPO_PAGE_TYPES,
|
|
2991
|
-
REPO_SOURCES,
|
|
2992
|
-
REPO_SOURCE_LOOKUP,
|
|
2993
|
-
RESULT,
|
|
2994
|
-
SHAPE_DELIMITER,
|
|
2995
|
-
SHAPE_PREFIXES,
|
|
2996
|
-
SINGULAR_NOUN_ENDINGS,
|
|
2997
|
-
ShapeApiImplementation,
|
|
2998
|
-
TOP_LEVEL_DOMAINS,
|
|
2999
|
-
TT_Atomics,
|
|
3000
|
-
TT_Containers,
|
|
3001
|
-
TT_Functions,
|
|
3002
|
-
TT_SEP,
|
|
3003
|
-
TT_START,
|
|
3004
|
-
TT_STOP,
|
|
3005
|
-
TT_Sets,
|
|
3006
|
-
TT_Singletons,
|
|
3007
|
-
TYPE_COMPARISONS,
|
|
3008
|
-
TYPE_KINDS,
|
|
3009
|
-
TYPE_OF,
|
|
3010
|
-
TYPE_TOKEN_ALL,
|
|
3011
|
-
TYPE_TOKEN_IDENTITIES,
|
|
3012
|
-
TYPE_TOKEN_PARAM_CSV,
|
|
3013
|
-
TYPE_TOKEN_PARAM_DATE,
|
|
3014
|
-
TYPE_TOKEN_PARAM_DATETIME,
|
|
3015
|
-
TYPE_TOKEN_PARAM_STR,
|
|
3016
|
-
TYPE_TOKEN_PARAM_TIME,
|
|
3017
|
-
TYPE_TRANSFORMS,
|
|
3018
|
-
UPPER_ALPHA_CHARS,
|
|
3019
|
-
US_STATE_LOOKUP,
|
|
3020
|
-
US_STATE_LOOKUP_PROVINCES,
|
|
3021
|
-
US_STATE_LOOKUP_STRICT,
|
|
3022
|
-
WHITESPACE_CHARS,
|
|
3023
|
-
WIDE_CONTAINER_TYPE_KINDS,
|
|
3024
|
-
WIDE_TYPE_KINDS,
|
|
3025
|
-
WideAssignment,
|
|
3026
|
-
ZIP_TO_STATE,
|
|
3027
|
-
addFnToProps,
|
|
3028
|
-
addPropsToFn,
|
|
3029
|
-
and,
|
|
3030
|
-
asApi,
|
|
3031
|
-
asApiCallback,
|
|
3032
|
-
asArray,
|
|
3033
|
-
asCallbackProp,
|
|
3034
|
-
asChars,
|
|
3035
|
-
asEscapeFunction,
|
|
3036
|
-
asHandledApiCallback,
|
|
3037
|
-
asOptionalParamFunction,
|
|
3038
|
-
asPhoneNumber,
|
|
3039
|
-
asRecord,
|
|
3040
|
-
asString,
|
|
3041
|
-
asVueRef,
|
|
3042
|
-
box,
|
|
3043
|
-
boxDictionaryValues,
|
|
3044
|
-
capitalize,
|
|
3045
|
-
choices,
|
|
3046
|
-
createConstant,
|
|
3047
|
-
createConverter,
|
|
3048
|
-
createErrorCondition,
|
|
3049
|
-
createFnWithProps,
|
|
3050
|
-
defineObj,
|
|
3051
|
-
defineTuple,
|
|
3052
|
-
dict,
|
|
3053
|
-
endsWith,
|
|
3054
|
-
ensureLeading,
|
|
3055
|
-
ensureSurround,
|
|
3056
|
-
ensureTrailing,
|
|
3057
|
-
entries,
|
|
3058
|
-
find,
|
|
3059
|
-
fnMeta,
|
|
3060
|
-
get,
|
|
3061
|
-
getEach,
|
|
3062
|
-
getEscapeFunction,
|
|
3063
|
-
getPhoneCountryCode,
|
|
3064
|
-
getUrlPath,
|
|
3065
|
-
getUrlPort,
|
|
3066
|
-
getUrlProtocol,
|
|
3067
|
-
getUrlQueryParams,
|
|
3068
|
-
getUrlSource,
|
|
3069
|
-
getYouTubePageType,
|
|
3070
|
-
handleDoneFn,
|
|
3071
|
-
hasDefaultValue,
|
|
3072
|
-
hasIndexOf,
|
|
3073
|
-
hasKeys,
|
|
3074
|
-
hasUrlPort,
|
|
3075
|
-
hasUrlQueryParameter,
|
|
3076
|
-
hasWhiteSpace,
|
|
3077
|
-
idLiteral,
|
|
3078
|
-
idTypeGuard,
|
|
3079
|
-
identity,
|
|
3080
|
-
ifLowercaseChar,
|
|
3081
|
-
ifUppercaseChar,
|
|
3082
|
-
indexOf,
|
|
3083
|
-
intersect,
|
|
3084
|
-
intersection,
|
|
3085
|
-
ip6GroupExpansion,
|
|
3086
|
-
ip6Prefix,
|
|
3087
|
-
isApi,
|
|
3088
|
-
isApiSurface,
|
|
3089
|
-
isArray,
|
|
3090
|
-
isBitbucketUrl,
|
|
3091
|
-
isBoolean,
|
|
3092
|
-
isBox,
|
|
3093
|
-
isCodeCommitUrl,
|
|
3094
|
-
isConstant,
|
|
3095
|
-
isContainer,
|
|
3096
|
-
isCssAspectRatio,
|
|
3097
|
-
isDefined,
|
|
3098
|
-
isDomainName,
|
|
3099
|
-
isDoneFn,
|
|
3100
|
-
isEmail,
|
|
3101
|
-
isEqual,
|
|
3102
|
-
isErrorCondition,
|
|
3103
|
-
isEscapeFunction,
|
|
3104
|
-
isFalse,
|
|
3105
|
-
isFalsy,
|
|
3106
|
-
isFnWithParams,
|
|
3107
|
-
isFunction,
|
|
3108
|
-
isGithubRepoUrl,
|
|
3109
|
-
isGithubUrl,
|
|
3110
|
-
isHexadecimal,
|
|
3111
|
-
isIndexable,
|
|
3112
|
-
isInlineSvg,
|
|
3113
|
-
isIp4Address,
|
|
3114
|
-
isIp6Address,
|
|
3115
|
-
isIpAddress,
|
|
3116
|
-
isLength,
|
|
3117
|
-
isNever,
|
|
3118
|
-
isNotNull,
|
|
3119
|
-
isNothing,
|
|
3120
|
-
isNull,
|
|
3121
|
-
isNumber,
|
|
3122
|
-
isNumericString,
|
|
3123
|
-
isObject,
|
|
3124
|
-
isOptionalParamFunction,
|
|
3125
|
-
isPhoneNumber,
|
|
3126
|
-
isReadonlyArray,
|
|
3127
|
-
isRef,
|
|
3128
|
-
isRepoSource,
|
|
3129
|
-
isRepoUrl,
|
|
3130
|
-
isSameTypeOf,
|
|
3131
|
-
isScalar,
|
|
3132
|
-
isSemanticVersion,
|
|
3133
|
-
isSet,
|
|
3134
|
-
isShape,
|
|
3135
|
-
isSpecificConstant,
|
|
3136
|
-
isString,
|
|
3137
|
-
isSymbol,
|
|
3138
|
-
isTrimable,
|
|
3139
|
-
isTrue,
|
|
3140
|
-
isTruthy,
|
|
3141
|
-
isTuple,
|
|
3142
|
-
isTypeOf,
|
|
3143
|
-
isTypeToken,
|
|
3144
|
-
isTypeTuple,
|
|
3145
|
-
isUndefined,
|
|
3146
|
-
isUnset,
|
|
3147
|
-
isUri,
|
|
3148
|
-
isUrl,
|
|
3149
|
-
isUrlPath,
|
|
3150
|
-
isUrlSource,
|
|
3151
|
-
isYouTubeCreatorUrl,
|
|
3152
|
-
isYouTubeFeedUrl,
|
|
3153
|
-
isYouTubePlaylistUrl,
|
|
3154
|
-
isYouTubeShareUrl,
|
|
3155
|
-
isYouTubeUrl,
|
|
3156
|
-
isYouTubeVideoUrl,
|
|
3157
|
-
isYouTubeVideosInPlaylist,
|
|
3158
|
-
join,
|
|
3159
|
-
keysOf,
|
|
3160
|
-
kindError,
|
|
3161
|
-
kindLiteral,
|
|
3162
|
-
last,
|
|
3163
|
-
list,
|
|
3164
|
-
literal,
|
|
3165
|
-
logicalReturns,
|
|
3166
|
-
lowercase,
|
|
3167
|
-
mergeObjects,
|
|
3168
|
-
mergeScalars,
|
|
3169
|
-
mergeTuples,
|
|
3170
|
-
nameLiteral,
|
|
3171
|
-
narrow,
|
|
3172
|
-
never,
|
|
3173
|
-
omit,
|
|
3174
|
-
optional,
|
|
3175
|
-
or,
|
|
3176
|
-
parse,
|
|
3177
|
-
pathJoin,
|
|
3178
|
-
pluralize,
|
|
3179
|
-
pop,
|
|
3180
|
-
removePhoneCountryCode,
|
|
3181
|
-
removeUrlProtocol,
|
|
3182
|
-
result,
|
|
3183
|
-
retain,
|
|
3184
|
-
retainAfter,
|
|
3185
|
-
retainChars,
|
|
3186
|
-
retainWhile,
|
|
3187
|
-
reverse,
|
|
3188
|
-
shape,
|
|
3189
|
-
sharedKeys,
|
|
3190
|
-
shift,
|
|
3191
|
-
slice,
|
|
3192
|
-
split,
|
|
3193
|
-
startsWith,
|
|
3194
|
-
stripAfter,
|
|
3195
|
-
stripBefore,
|
|
3196
|
-
stripChars,
|
|
3197
|
-
stripLeading,
|
|
3198
|
-
stripTrailing,
|
|
3199
|
-
surround,
|
|
3200
|
-
takeNumericCharacters,
|
|
3201
|
-
takeProp,
|
|
3202
|
-
toCamelCase,
|
|
3203
|
-
toKebabCase,
|
|
3204
|
-
toNumber,
|
|
3205
|
-
toNumericArray,
|
|
3206
|
-
toPascalCase,
|
|
3207
|
-
toSnakeCase,
|
|
3208
|
-
toString,
|
|
3209
|
-
toUppercase,
|
|
3210
|
-
trim,
|
|
3211
|
-
trimEnd,
|
|
3212
|
-
trimLeft,
|
|
3213
|
-
trimRight,
|
|
3214
|
-
trimStart,
|
|
3215
|
-
truncate,
|
|
3216
|
-
tuple,
|
|
3217
|
-
unbox,
|
|
3218
|
-
uncapitalize,
|
|
3219
|
-
union,
|
|
3220
|
-
unionize,
|
|
3221
|
-
unique,
|
|
3222
|
-
uniqueKeys,
|
|
3223
|
-
uppercase,
|
|
3224
|
-
urlMeta,
|
|
3225
|
-
valuesOf,
|
|
3226
|
-
widen,
|
|
3227
|
-
withDefaults,
|
|
3228
|
-
withKeys,
|
|
3229
|
-
withoutKeys,
|
|
3230
|
-
withoutValue,
|
|
3231
|
-
wrapFn,
|
|
3232
|
-
youtubeMeta
|
|
3233
|
-
});
|