@gsc-basic/utils 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/node_modules/crypto-js/CONTRIBUTING.md +28 -0
- package/node_modules/crypto-js/LICENSE +24 -0
- package/node_modules/crypto-js/README.md +275 -0
- package/node_modules/crypto-js/aes.js +234 -0
- package/node_modules/crypto-js/blowfish.js +471 -0
- package/node_modules/crypto-js/bower.json +39 -0
- package/node_modules/crypto-js/cipher-core.js +895 -0
- package/node_modules/crypto-js/core.js +807 -0
- package/node_modules/crypto-js/crypto-js.js +6657 -0
- package/node_modules/crypto-js/docs/QuickStartGuide.wiki +470 -0
- package/node_modules/crypto-js/enc-base64.js +136 -0
- package/node_modules/crypto-js/enc-base64url.js +148 -0
- package/node_modules/crypto-js/enc-hex.js +18 -0
- package/node_modules/crypto-js/enc-latin1.js +18 -0
- package/node_modules/crypto-js/enc-utf16.js +149 -0
- package/node_modules/crypto-js/enc-utf8.js +18 -0
- package/node_modules/crypto-js/evpkdf.js +134 -0
- package/node_modules/crypto-js/format-hex.js +66 -0
- package/node_modules/crypto-js/format-openssl.js +18 -0
- package/node_modules/crypto-js/hmac-md5.js +18 -0
- package/node_modules/crypto-js/hmac-ripemd160.js +18 -0
- package/node_modules/crypto-js/hmac-sha1.js +18 -0
- package/node_modules/crypto-js/hmac-sha224.js +18 -0
- package/node_modules/crypto-js/hmac-sha256.js +18 -0
- package/node_modules/crypto-js/hmac-sha3.js +18 -0
- package/node_modules/crypto-js/hmac-sha384.js +18 -0
- package/node_modules/crypto-js/hmac-sha512.js +18 -0
- package/node_modules/crypto-js/hmac.js +143 -0
- package/node_modules/crypto-js/index.js +18 -0
- package/node_modules/crypto-js/lib-typedarrays.js +76 -0
- package/node_modules/crypto-js/md5.js +268 -0
- package/node_modules/crypto-js/mode-cfb.js +80 -0
- package/node_modules/crypto-js/mode-ctr-gladman.js +116 -0
- package/node_modules/crypto-js/mode-ctr.js +58 -0
- package/node_modules/crypto-js/mode-ecb.js +40 -0
- package/node_modules/crypto-js/mode-ofb.js +54 -0
- package/node_modules/crypto-js/package.json +42 -0
- package/node_modules/crypto-js/pad-ansix923.js +49 -0
- package/node_modules/crypto-js/pad-iso10126.js +44 -0
- package/node_modules/crypto-js/pad-iso97971.js +40 -0
- package/node_modules/crypto-js/pad-nopadding.js +30 -0
- package/node_modules/crypto-js/pad-pkcs7.js +18 -0
- package/node_modules/crypto-js/pad-zeropadding.js +47 -0
- package/node_modules/crypto-js/pbkdf2.js +145 -0
- package/node_modules/crypto-js/rabbit-legacy.js +190 -0
- package/node_modules/crypto-js/rabbit.js +192 -0
- package/node_modules/crypto-js/rc4.js +139 -0
- package/node_modules/crypto-js/ripemd160.js +267 -0
- package/node_modules/crypto-js/sha1.js +150 -0
- package/node_modules/crypto-js/sha224.js +80 -0
- package/node_modules/crypto-js/sha256.js +199 -0
- package/node_modules/crypto-js/sha3.js +326 -0
- package/node_modules/crypto-js/sha384.js +83 -0
- package/node_modules/crypto-js/sha512.js +326 -0
- package/node_modules/crypto-js/tripledes.js +779 -0
- package/node_modules/crypto-js/x64-core.js +304 -0
- package/node_modules/lodash-es/LICENSE +47 -0
- package/node_modules/lodash-es/README.md +10 -0
- package/node_modules/lodash-es/_DataView.js +7 -0
- package/node_modules/lodash-es/_Hash.js +32 -0
- package/node_modules/lodash-es/_LazyWrapper.js +28 -0
- package/node_modules/lodash-es/_ListCache.js +32 -0
- package/node_modules/lodash-es/_LodashWrapper.js +22 -0
- package/node_modules/lodash-es/_Map.js +7 -0
- package/node_modules/lodash-es/_MapCache.js +32 -0
- package/node_modules/lodash-es/_Promise.js +7 -0
- package/node_modules/lodash-es/_Set.js +7 -0
- package/node_modules/lodash-es/_SetCache.js +27 -0
- package/node_modules/lodash-es/_Stack.js +27 -0
- package/node_modules/lodash-es/_Symbol.js +6 -0
- package/node_modules/lodash-es/_Uint8Array.js +6 -0
- package/node_modules/lodash-es/_WeakMap.js +7 -0
- package/node_modules/lodash-es/_addMapEntry.js +15 -0
- package/node_modules/lodash-es/_addSetEntry.js +15 -0
- package/node_modules/lodash-es/_apply.js +21 -0
- package/node_modules/lodash-es/_arrayAggregator.js +22 -0
- package/node_modules/lodash-es/_arrayEach.js +22 -0
- package/node_modules/lodash-es/_arrayEachRight.js +21 -0
- package/node_modules/lodash-es/_arrayEvery.js +23 -0
- package/node_modules/lodash-es/_arrayFilter.js +25 -0
- package/node_modules/lodash-es/_arrayIncludes.js +17 -0
- package/node_modules/lodash-es/_arrayIncludesWith.js +22 -0
- package/node_modules/lodash-es/_arrayLikeKeys.js +49 -0
- package/node_modules/lodash-es/_arrayMap.js +21 -0
- package/node_modules/lodash-es/_arrayPush.js +20 -0
- package/node_modules/lodash-es/_arrayReduce.js +26 -0
- package/node_modules/lodash-es/_arrayReduceRight.js +24 -0
- package/node_modules/lodash-es/_arraySample.js +15 -0
- package/node_modules/lodash-es/_arraySampleSize.js +17 -0
- package/node_modules/lodash-es/_arrayShuffle.js +15 -0
- package/node_modules/lodash-es/_arraySome.js +23 -0
- package/node_modules/lodash-es/_asciiSize.js +12 -0
- package/node_modules/lodash-es/_asciiToArray.js +12 -0
- package/node_modules/lodash-es/_asciiWords.js +15 -0
- package/node_modules/lodash-es/_assignMergeValue.js +20 -0
- package/node_modules/lodash-es/_assignValue.js +28 -0
- package/node_modules/lodash-es/_assocIndexOf.js +21 -0
- package/node_modules/lodash-es/_baseAggregator.js +21 -0
- package/node_modules/lodash-es/_baseAssign.js +17 -0
- package/node_modules/lodash-es/_baseAssignIn.js +17 -0
- package/node_modules/lodash-es/_baseAssignValue.js +25 -0
- package/node_modules/lodash-es/_baseAt.js +23 -0
- package/node_modules/lodash-es/_baseClamp.js +22 -0
- package/node_modules/lodash-es/_baseClone.js +166 -0
- package/node_modules/lodash-es/_baseConforms.js +18 -0
- package/node_modules/lodash-es/_baseConformsTo.js +27 -0
- package/node_modules/lodash-es/_baseCreate.js +30 -0
- package/node_modules/lodash-es/_baseDelay.js +21 -0
- package/node_modules/lodash-es/_baseDifference.js +67 -0
- package/node_modules/lodash-es/_baseEach.js +14 -0
- package/node_modules/lodash-es/_baseEachRight.js +14 -0
- package/node_modules/lodash-es/_baseEvery.js +21 -0
- package/node_modules/lodash-es/_baseExtremum.js +32 -0
- package/node_modules/lodash-es/_baseFill.js +32 -0
- package/node_modules/lodash-es/_baseFilter.js +21 -0
- package/node_modules/lodash-es/_baseFindIndex.js +24 -0
- package/node_modules/lodash-es/_baseFindKey.js +23 -0
- package/node_modules/lodash-es/_baseFlatten.js +38 -0
- package/node_modules/lodash-es/_baseFor.js +16 -0
- package/node_modules/lodash-es/_baseForOwn.js +16 -0
- package/node_modules/lodash-es/_baseForOwnRight.js +16 -0
- package/node_modules/lodash-es/_baseForRight.js +15 -0
- package/node_modules/lodash-es/_baseFunctions.js +19 -0
- package/node_modules/lodash-es/_baseGet.js +24 -0
- package/node_modules/lodash-es/_baseGetAllKeys.js +20 -0
- package/node_modules/lodash-es/_baseGetTag.js +28 -0
- package/node_modules/lodash-es/_baseGt.js +14 -0
- package/node_modules/lodash-es/_baseHas.js +19 -0
- package/node_modules/lodash-es/_baseHasIn.js +13 -0
- package/node_modules/lodash-es/_baseInRange.js +18 -0
- package/node_modules/lodash-es/_baseIndexOf.js +20 -0
- package/node_modules/lodash-es/_baseIndexOfWith.js +23 -0
- package/node_modules/lodash-es/_baseIntersection.js +74 -0
- package/node_modules/lodash-es/_baseInverter.js +21 -0
- package/node_modules/lodash-es/_baseInvoke.js +24 -0
- package/node_modules/lodash-es/_baseIsArguments.js +18 -0
- package/node_modules/lodash-es/_baseIsArrayBuffer.js +17 -0
- package/node_modules/lodash-es/_baseIsDate.js +18 -0
- package/node_modules/lodash-es/_baseIsEqual.js +28 -0
- package/node_modules/lodash-es/_baseIsEqualDeep.js +83 -0
- package/node_modules/lodash-es/_baseIsMap.js +18 -0
- package/node_modules/lodash-es/_baseIsMatch.js +62 -0
- package/node_modules/lodash-es/_baseIsNaN.js +12 -0
- package/node_modules/lodash-es/_baseIsNative.js +47 -0
- package/node_modules/lodash-es/_baseIsRegExp.js +18 -0
- package/node_modules/lodash-es/_baseIsSet.js +18 -0
- package/node_modules/lodash-es/_baseIsTypedArray.js +60 -0
- package/node_modules/lodash-es/_baseIteratee.js +31 -0
- package/node_modules/lodash-es/_baseKeys.js +30 -0
- package/node_modules/lodash-es/_baseKeysIn.js +33 -0
- package/node_modules/lodash-es/_baseLodash.js +10 -0
- package/node_modules/lodash-es/_baseLt.js +14 -0
- package/node_modules/lodash-es/_baseMap.js +22 -0
- package/node_modules/lodash-es/_baseMatches.js +22 -0
- package/node_modules/lodash-es/_baseMatchesProperty.js +33 -0
- package/node_modules/lodash-es/_baseMean.js +20 -0
- package/node_modules/lodash-es/_baseMerge.js +42 -0
- package/node_modules/lodash-es/_baseMergeDeep.js +94 -0
- package/node_modules/lodash-es/_baseNth.js +20 -0
- package/node_modules/lodash-es/_baseOrderBy.js +49 -0
- package/node_modules/lodash-es/_basePick.js +19 -0
- package/node_modules/lodash-es/_basePickBy.js +30 -0
- package/node_modules/lodash-es/_baseProperty.js +14 -0
- package/node_modules/lodash-es/_basePropertyDeep.js +16 -0
- package/node_modules/lodash-es/_basePropertyOf.js +14 -0
- package/node_modules/lodash-es/_basePullAll.js +51 -0
- package/node_modules/lodash-es/_basePullAt.js +37 -0
- package/node_modules/lodash-es/_baseRandom.js +18 -0
- package/node_modules/lodash-es/_baseRange.js +28 -0
- package/node_modules/lodash-es/_baseReduce.js +23 -0
- package/node_modules/lodash-es/_baseRepeat.js +35 -0
- package/node_modules/lodash-es/_baseRest.js +17 -0
- package/node_modules/lodash-es/_baseSample.js +15 -0
- package/node_modules/lodash-es/_baseSampleSize.js +18 -0
- package/node_modules/lodash-es/_baseSet.js +51 -0
- package/node_modules/lodash-es/_baseSetData.js +17 -0
- package/node_modules/lodash-es/_baseSetToString.js +22 -0
- package/node_modules/lodash-es/_baseShuffle.js +15 -0
- package/node_modules/lodash-es/_baseSlice.js +31 -0
- package/node_modules/lodash-es/_baseSome.js +22 -0
- package/node_modules/lodash-es/_baseSortBy.js +21 -0
- package/node_modules/lodash-es/_baseSortedIndex.js +42 -0
- package/node_modules/lodash-es/_baseSortedIndexBy.js +67 -0
- package/node_modules/lodash-es/_baseSortedUniq.js +30 -0
- package/node_modules/lodash-es/_baseSum.js +24 -0
- package/node_modules/lodash-es/_baseTimes.js +20 -0
- package/node_modules/lodash-es/_baseToNumber.js +24 -0
- package/node_modules/lodash-es/_baseToPairs.js +18 -0
- package/node_modules/lodash-es/_baseToString.js +37 -0
- package/node_modules/lodash-es/_baseTrim.js +19 -0
- package/node_modules/lodash-es/_baseUnary.js +14 -0
- package/node_modules/lodash-es/_baseUniq.js +72 -0
- package/node_modules/lodash-es/_baseUnset.js +20 -0
- package/node_modules/lodash-es/_baseUpdate.js +18 -0
- package/node_modules/lodash-es/_baseValues.js +19 -0
- package/node_modules/lodash-es/_baseWhile.js +26 -0
- package/node_modules/lodash-es/_baseWrapperValue.js +25 -0
- package/node_modules/lodash-es/_baseXor.js +36 -0
- package/node_modules/lodash-es/_baseZipObject.js +23 -0
- package/node_modules/lodash-es/_cacheHas.js +13 -0
- package/node_modules/lodash-es/_castArrayLikeObject.js +14 -0
- package/node_modules/lodash-es/_castFunction.js +14 -0
- package/node_modules/lodash-es/_castPath.js +21 -0
- package/node_modules/lodash-es/_castRest.js +14 -0
- package/node_modules/lodash-es/_castSlice.js +18 -0
- package/node_modules/lodash-es/_charsEndIndex.js +19 -0
- package/node_modules/lodash-es/_charsStartIndex.js +20 -0
- package/node_modules/lodash-es/_cloneArrayBuffer.js +16 -0
- package/node_modules/lodash-es/_cloneBuffer.js +35 -0
- package/node_modules/lodash-es/_cloneDataView.js +16 -0
- package/node_modules/lodash-es/_cloneMap.js +22 -0
- package/node_modules/lodash-es/_cloneRegExp.js +17 -0
- package/node_modules/lodash-es/_cloneSet.js +22 -0
- package/node_modules/lodash-es/_cloneSymbol.js +18 -0
- package/node_modules/lodash-es/_cloneTypedArray.js +16 -0
- package/node_modules/lodash-es/_compareAscending.js +41 -0
- package/node_modules/lodash-es/_compareMultiple.js +44 -0
- package/node_modules/lodash-es/_composeArgs.js +39 -0
- package/node_modules/lodash-es/_composeArgsRight.js +41 -0
- package/node_modules/lodash-es/_copyArray.js +20 -0
- package/node_modules/lodash-es/_copyObject.js +40 -0
- package/node_modules/lodash-es/_copySymbols.js +16 -0
- package/node_modules/lodash-es/_copySymbolsIn.js +16 -0
- package/node_modules/lodash-es/_coreJsData.js +6 -0
- package/node_modules/lodash-es/_countHolders.js +21 -0
- package/node_modules/lodash-es/_createAggregator.js +23 -0
- package/node_modules/lodash-es/_createAssigner.js +37 -0
- package/node_modules/lodash-es/_createBaseEach.js +32 -0
- package/node_modules/lodash-es/_createBaseFor.js +25 -0
- package/node_modules/lodash-es/_createBind.js +28 -0
- package/node_modules/lodash-es/_createCaseFirst.js +33 -0
- package/node_modules/lodash-es/_createCompounder.js +24 -0
- package/node_modules/lodash-es/_createCtor.js +37 -0
- package/node_modules/lodash-es/_createCurry.js +46 -0
- package/node_modules/lodash-es/_createFind.js +25 -0
- package/node_modules/lodash-es/_createFlow.js +78 -0
- package/node_modules/lodash-es/_createHybrid.js +92 -0
- package/node_modules/lodash-es/_createInverter.js +17 -0
- package/node_modules/lodash-es/_createMathOperation.js +38 -0
- package/node_modules/lodash-es/_createOver.js +27 -0
- package/node_modules/lodash-es/_createPadding.js +33 -0
- package/node_modules/lodash-es/_createPartial.js +43 -0
- package/node_modules/lodash-es/_createRange.js +30 -0
- package/node_modules/lodash-es/_createRecurry.js +56 -0
- package/node_modules/lodash-es/_createRelationalOperation.js +20 -0
- package/node_modules/lodash-es/_createRound.js +35 -0
- package/node_modules/lodash-es/_createSet.js +19 -0
- package/node_modules/lodash-es/_createToPairs.js +30 -0
- package/node_modules/lodash-es/_createWrap.js +106 -0
- package/node_modules/lodash-es/_customDefaultsAssignIn.js +29 -0
- package/node_modules/lodash-es/_customDefaultsMerge.js +28 -0
- package/node_modules/lodash-es/_customOmitClone.js +16 -0
- package/node_modules/lodash-es/_deburrLetter.js +71 -0
- package/node_modules/lodash-es/_defineProperty.js +11 -0
- package/node_modules/lodash-es/_equalArrays.js +84 -0
- package/node_modules/lodash-es/_equalByTag.js +112 -0
- package/node_modules/lodash-es/_equalObjects.js +90 -0
- package/node_modules/lodash-es/_escapeHtmlChar.js +21 -0
- package/node_modules/lodash-es/_escapeStringChar.js +22 -0
- package/node_modules/lodash-es/_flatRest.js +16 -0
- package/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/node_modules/lodash-es/_getAllKeys.js +16 -0
- package/node_modules/lodash-es/_getAllKeysIn.js +17 -0
- package/node_modules/lodash-es/_getData.js +15 -0
- package/node_modules/lodash-es/_getFuncName.js +31 -0
- package/node_modules/lodash-es/_getHolder.js +13 -0
- package/node_modules/lodash-es/_getMapData.js +18 -0
- package/node_modules/lodash-es/_getMatchData.js +24 -0
- package/node_modules/lodash-es/_getNative.js +17 -0
- package/node_modules/lodash-es/_getPrototype.js +6 -0
- package/node_modules/lodash-es/_getRawTag.js +46 -0
- package/node_modules/lodash-es/_getSymbols.js +30 -0
- package/node_modules/lodash-es/_getSymbolsIn.js +25 -0
- package/node_modules/lodash-es/_getTag.js +58 -0
- package/node_modules/lodash-es/_getValue.js +13 -0
- package/node_modules/lodash-es/_getView.js +33 -0
- package/node_modules/lodash-es/_getWrapDetails.js +17 -0
- package/node_modules/lodash-es/_hasPath.js +39 -0
- package/node_modules/lodash-es/_hasUnicode.js +26 -0
- package/node_modules/lodash-es/_hasUnicodeWord.js +15 -0
- package/node_modules/lodash-es/_hashClear.js +15 -0
- package/node_modules/lodash-es/_hashDelete.js +17 -0
- package/node_modules/lodash-es/_hashGet.js +30 -0
- package/node_modules/lodash-es/_hashHas.js +23 -0
- package/node_modules/lodash-es/_hashSet.js +23 -0
- package/node_modules/lodash-es/_initCloneArray.js +26 -0
- package/node_modules/lodash-es/_initCloneByTag.js +77 -0
- package/node_modules/lodash-es/_initCloneObject.js +18 -0
- package/node_modules/lodash-es/_insertWrapDetails.js +23 -0
- package/node_modules/lodash-es/_isFlattenable.js +20 -0
- package/node_modules/lodash-es/_isIndex.js +25 -0
- package/node_modules/lodash-es/_isIterateeCall.js +30 -0
- package/node_modules/lodash-es/_isKey.js +29 -0
- package/node_modules/lodash-es/_isKeyable.js +15 -0
- package/node_modules/lodash-es/_isLaziable.js +28 -0
- package/node_modules/lodash-es/_isMaskable.js +14 -0
- package/node_modules/lodash-es/_isMasked.js +20 -0
- package/node_modules/lodash-es/_isPrototype.js +18 -0
- package/node_modules/lodash-es/_isStrictComparable.js +15 -0
- package/node_modules/lodash-es/_iteratorToArray.js +18 -0
- package/node_modules/lodash-es/_lazyClone.js +23 -0
- package/node_modules/lodash-es/_lazyReverse.js +23 -0
- package/node_modules/lodash-es/_lazyValue.js +69 -0
- package/node_modules/lodash-es/_listCacheClear.js +13 -0
- package/node_modules/lodash-es/_listCacheDelete.js +35 -0
- package/node_modules/lodash-es/_listCacheGet.js +19 -0
- package/node_modules/lodash-es/_listCacheHas.js +16 -0
- package/node_modules/lodash-es/_listCacheSet.js +26 -0
- package/node_modules/lodash-es/_mapCacheClear.js +21 -0
- package/node_modules/lodash-es/_mapCacheDelete.js +18 -0
- package/node_modules/lodash-es/_mapCacheGet.js +16 -0
- package/node_modules/lodash-es/_mapCacheHas.js +16 -0
- package/node_modules/lodash-es/_mapCacheSet.js +22 -0
- package/node_modules/lodash-es/_mapToArray.js +18 -0
- package/node_modules/lodash-es/_matchesStrictComparable.js +20 -0
- package/node_modules/lodash-es/_memoizeCapped.js +26 -0
- package/node_modules/lodash-es/_mergeData.js +90 -0
- package/node_modules/lodash-es/_metaMap.js +6 -0
- package/node_modules/lodash-es/_nativeCreate.js +6 -0
- package/node_modules/lodash-es/_nativeKeys.js +6 -0
- package/node_modules/lodash-es/_nativeKeysIn.js +20 -0
- package/node_modules/lodash-es/_nodeUtil.js +30 -0
- package/node_modules/lodash-es/_objectToString.js +22 -0
- package/node_modules/lodash-es/_overArg.js +15 -0
- package/node_modules/lodash-es/_overRest.js +36 -0
- package/node_modules/lodash-es/_parent.js +16 -0
- package/node_modules/lodash-es/_reEscape.js +4 -0
- package/node_modules/lodash-es/_reEvaluate.js +4 -0
- package/node_modules/lodash-es/_reInterpolate.js +4 -0
- package/node_modules/lodash-es/_realNames.js +4 -0
- package/node_modules/lodash-es/_reorder.js +29 -0
- package/node_modules/lodash-es/_replaceHolders.js +29 -0
- package/node_modules/lodash-es/_root.js +9 -0
- package/node_modules/lodash-es/_safeGet.js +21 -0
- package/node_modules/lodash-es/_setCacheAdd.js +19 -0
- package/node_modules/lodash-es/_setCacheHas.js +14 -0
- package/node_modules/lodash-es/_setData.js +20 -0
- package/node_modules/lodash-es/_setToArray.js +18 -0
- package/node_modules/lodash-es/_setToPairs.js +18 -0
- package/node_modules/lodash-es/_setToString.js +14 -0
- package/node_modules/lodash-es/_setWrapToString.js +21 -0
- package/node_modules/lodash-es/_shortOut.js +37 -0
- package/node_modules/lodash-es/_shuffleSelf.js +28 -0
- package/node_modules/lodash-es/_stackClear.js +15 -0
- package/node_modules/lodash-es/_stackDelete.js +18 -0
- package/node_modules/lodash-es/_stackGet.js +14 -0
- package/node_modules/lodash-es/_stackHas.js +14 -0
- package/node_modules/lodash-es/_stackSet.js +34 -0
- package/node_modules/lodash-es/_strictIndexOf.js +23 -0
- package/node_modules/lodash-es/_strictLastIndexOf.js +21 -0
- package/node_modules/lodash-es/_stringSize.js +18 -0
- package/node_modules/lodash-es/_stringToArray.js +18 -0
- package/node_modules/lodash-es/_stringToPath.js +27 -0
- package/node_modules/lodash-es/_toKey.js +21 -0
- package/node_modules/lodash-es/_toSource.js +26 -0
- package/node_modules/lodash-es/_trimmedEndIndex.js +19 -0
- package/node_modules/lodash-es/_unescapeHtmlChar.js +21 -0
- package/node_modules/lodash-es/_unicodeSize.js +44 -0
- package/node_modules/lodash-es/_unicodeToArray.js +40 -0
- package/node_modules/lodash-es/_unicodeWords.js +69 -0
- package/node_modules/lodash-es/_updateWrapDetails.js +46 -0
- package/node_modules/lodash-es/_wrapperClone.js +23 -0
- package/node_modules/lodash-es/add.js +22 -0
- package/node_modules/lodash-es/after.js +42 -0
- package/node_modules/lodash-es/array.default.js +81 -0
- package/node_modules/lodash-es/array.js +66 -0
- package/node_modules/lodash-es/ary.js +29 -0
- package/node_modules/lodash-es/assign.js +58 -0
- package/node_modules/lodash-es/assignIn.js +40 -0
- package/node_modules/lodash-es/assignInWith.js +38 -0
- package/node_modules/lodash-es/assignWith.js +37 -0
- package/node_modules/lodash-es/at.js +23 -0
- package/node_modules/lodash-es/attempt.js +35 -0
- package/node_modules/lodash-es/before.js +40 -0
- package/node_modules/lodash-es/bind.js +57 -0
- package/node_modules/lodash-es/bindAll.js +41 -0
- package/node_modules/lodash-es/bindKey.js +68 -0
- package/node_modules/lodash-es/camelCase.js +29 -0
- package/node_modules/lodash-es/capitalize.js +23 -0
- package/node_modules/lodash-es/castArray.js +44 -0
- package/node_modules/lodash-es/ceil.js +26 -0
- package/node_modules/lodash-es/chain.js +38 -0
- package/node_modules/lodash-es/chunk.js +50 -0
- package/node_modules/lodash-es/clamp.js +39 -0
- package/node_modules/lodash-es/clone.js +36 -0
- package/node_modules/lodash-es/cloneDeep.js +29 -0
- package/node_modules/lodash-es/cloneDeepWith.js +40 -0
- package/node_modules/lodash-es/cloneWith.js +42 -0
- package/node_modules/lodash-es/collection.default.js +37 -0
- package/node_modules/lodash-es/collection.js +29 -0
- package/node_modules/lodash-es/commit.js +33 -0
- package/node_modules/lodash-es/compact.js +31 -0
- package/node_modules/lodash-es/concat.js +43 -0
- package/node_modules/lodash-es/cond.js +60 -0
- package/node_modules/lodash-es/conforms.js +35 -0
- package/node_modules/lodash-es/conformsTo.js +32 -0
- package/node_modules/lodash-es/constant.js +26 -0
- package/node_modules/lodash-es/countBy.js +40 -0
- package/node_modules/lodash-es/create.js +43 -0
- package/node_modules/lodash-es/curry.js +57 -0
- package/node_modules/lodash-es/curryRight.js +54 -0
- package/node_modules/lodash-es/date.default.js +5 -0
- package/node_modules/lodash-es/date.js +2 -0
- package/node_modules/lodash-es/debounce.js +191 -0
- package/node_modules/lodash-es/deburr.js +45 -0
- package/node_modules/lodash-es/defaultTo.js +25 -0
- package/node_modules/lodash-es/defaults.js +64 -0
- package/node_modules/lodash-es/defaultsDeep.js +30 -0
- package/node_modules/lodash-es/defer.js +26 -0
- package/node_modules/lodash-es/delay.js +28 -0
- package/node_modules/lodash-es/difference.js +33 -0
- package/node_modules/lodash-es/differenceBy.js +44 -0
- package/node_modules/lodash-es/differenceWith.js +40 -0
- package/node_modules/lodash-es/divide.js +22 -0
- package/node_modules/lodash-es/drop.js +38 -0
- package/node_modules/lodash-es/dropRight.js +39 -0
- package/node_modules/lodash-es/dropRightWhile.js +45 -0
- package/node_modules/lodash-es/dropWhile.js +45 -0
- package/node_modules/lodash-es/each.js +1 -0
- package/node_modules/lodash-es/eachRight.js +1 -0
- package/node_modules/lodash-es/endsWith.js +43 -0
- package/node_modules/lodash-es/entries.js +1 -0
- package/node_modules/lodash-es/entriesIn.js +1 -0
- package/node_modules/lodash-es/eq.js +37 -0
- package/node_modules/lodash-es/escape.js +43 -0
- package/node_modules/lodash-es/escapeRegExp.js +32 -0
- package/node_modules/lodash-es/every.js +56 -0
- package/node_modules/lodash-es/extend.js +1 -0
- package/node_modules/lodash-es/extendWith.js +1 -0
- package/node_modules/lodash-es/fill.js +45 -0
- package/node_modules/lodash-es/filter.js +52 -0
- package/node_modules/lodash-es/find.js +42 -0
- package/node_modules/lodash-es/findIndex.js +55 -0
- package/node_modules/lodash-es/findKey.js +44 -0
- package/node_modules/lodash-es/findLast.js +25 -0
- package/node_modules/lodash-es/findLastIndex.js +59 -0
- package/node_modules/lodash-es/findLastKey.js +44 -0
- package/node_modules/lodash-es/first.js +1 -0
- package/node_modules/lodash-es/flake.lock +40 -0
- package/node_modules/lodash-es/flake.nix +20 -0
- package/node_modules/lodash-es/flatMap.js +29 -0
- package/node_modules/lodash-es/flatMapDeep.js +31 -0
- package/node_modules/lodash-es/flatMapDepth.js +31 -0
- package/node_modules/lodash-es/flatten.js +22 -0
- package/node_modules/lodash-es/flattenDeep.js +25 -0
- package/node_modules/lodash-es/flattenDepth.js +33 -0
- package/node_modules/lodash-es/flip.js +28 -0
- package/node_modules/lodash-es/floor.js +26 -0
- package/node_modules/lodash-es/flow.js +27 -0
- package/node_modules/lodash-es/flowRight.js +26 -0
- package/node_modules/lodash-es/forEach.js +41 -0
- package/node_modules/lodash-es/forEachRight.js +31 -0
- package/node_modules/lodash-es/forIn.js +39 -0
- package/node_modules/lodash-es/forInRight.js +37 -0
- package/node_modules/lodash-es/forOwn.js +36 -0
- package/node_modules/lodash-es/forOwnRight.js +34 -0
- package/node_modules/lodash-es/fromPairs.js +28 -0
- package/node_modules/lodash-es/function.default.js +31 -0
- package/node_modules/lodash-es/function.js +24 -0
- package/node_modules/lodash-es/functions.js +31 -0
- package/node_modules/lodash-es/functionsIn.js +31 -0
- package/node_modules/lodash-es/get.js +33 -0
- package/node_modules/lodash-es/groupBy.js +41 -0
- package/node_modules/lodash-es/gt.js +29 -0
- package/node_modules/lodash-es/gte.js +30 -0
- package/node_modules/lodash-es/has.js +35 -0
- package/node_modules/lodash-es/hasIn.js +34 -0
- package/node_modules/lodash-es/head.js +23 -0
- package/node_modules/lodash-es/identity.js +21 -0
- package/node_modules/lodash-es/inRange.js +55 -0
- package/node_modules/lodash-es/includes.js +53 -0
- package/node_modules/lodash-es/indexOf.js +42 -0
- package/node_modules/lodash-es/initial.js +22 -0
- package/node_modules/lodash-es/intersection.js +30 -0
- package/node_modules/lodash-es/intersectionBy.js +45 -0
- package/node_modules/lodash-es/intersectionWith.js +41 -0
- package/node_modules/lodash-es/invert.js +42 -0
- package/node_modules/lodash-es/invertBy.js +56 -0
- package/node_modules/lodash-es/invoke.js +24 -0
- package/node_modules/lodash-es/invokeMap.js +41 -0
- package/node_modules/lodash-es/isArguments.js +36 -0
- package/node_modules/lodash-es/isArray.js +26 -0
- package/node_modules/lodash-es/isArrayBuffer.js +27 -0
- package/node_modules/lodash-es/isArrayLike.js +33 -0
- package/node_modules/lodash-es/isArrayLikeObject.js +33 -0
- package/node_modules/lodash-es/isBoolean.js +29 -0
- package/node_modules/lodash-es/isBuffer.js +38 -0
- package/node_modules/lodash-es/isDate.js +27 -0
- package/node_modules/lodash-es/isElement.js +25 -0
- package/node_modules/lodash-es/isEmpty.js +77 -0
- package/node_modules/lodash-es/isEqual.js +35 -0
- package/node_modules/lodash-es/isEqualWith.js +41 -0
- package/node_modules/lodash-es/isError.js +36 -0
- package/node_modules/lodash-es/isFinite.js +36 -0
- package/node_modules/lodash-es/isFunction.js +37 -0
- package/node_modules/lodash-es/isInteger.js +33 -0
- package/node_modules/lodash-es/isLength.js +35 -0
- package/node_modules/lodash-es/isMap.js +27 -0
- package/node_modules/lodash-es/isMatch.js +36 -0
- package/node_modules/lodash-es/isMatchWith.js +41 -0
- package/node_modules/lodash-es/isNaN.js +38 -0
- package/node_modules/lodash-es/isNative.js +40 -0
- package/node_modules/lodash-es/isNil.js +25 -0
- package/node_modules/lodash-es/isNull.js +22 -0
- package/node_modules/lodash-es/isNumber.js +38 -0
- package/node_modules/lodash-es/isObject.js +31 -0
- package/node_modules/lodash-es/isObjectLike.js +29 -0
- package/node_modules/lodash-es/isPlainObject.js +62 -0
- package/node_modules/lodash-es/isRegExp.js +27 -0
- package/node_modules/lodash-es/isSafeInteger.js +37 -0
- package/node_modules/lodash-es/isSet.js +27 -0
- package/node_modules/lodash-es/isString.js +30 -0
- package/node_modules/lodash-es/isSymbol.js +29 -0
- package/node_modules/lodash-es/isTypedArray.js +27 -0
- package/node_modules/lodash-es/isUndefined.js +22 -0
- package/node_modules/lodash-es/isWeakMap.js +28 -0
- package/node_modules/lodash-es/isWeakSet.js +28 -0
- package/node_modules/lodash-es/iteratee.js +53 -0
- package/node_modules/lodash-es/join.js +26 -0
- package/node_modules/lodash-es/kebabCase.js +28 -0
- package/node_modules/lodash-es/keyBy.js +36 -0
- package/node_modules/lodash-es/keys.js +37 -0
- package/node_modules/lodash-es/keysIn.js +32 -0
- package/node_modules/lodash-es/lang.default.js +71 -0
- package/node_modules/lodash-es/lang.js +57 -0
- package/node_modules/lodash-es/last.js +20 -0
- package/node_modules/lodash-es/lastIndexOf.js +46 -0
- package/node_modules/lodash-es/lodash.default.js +643 -0
- package/node_modules/lodash-es/lodash.js +331 -0
- package/node_modules/lodash-es/lowerCase.js +27 -0
- package/node_modules/lodash-es/lowerFirst.js +22 -0
- package/node_modules/lodash-es/lt.js +29 -0
- package/node_modules/lodash-es/lte.js +30 -0
- package/node_modules/lodash-es/map.js +53 -0
- package/node_modules/lodash-es/mapKeys.js +36 -0
- package/node_modules/lodash-es/mapValues.js +43 -0
- package/node_modules/lodash-es/matches.js +46 -0
- package/node_modules/lodash-es/matchesProperty.js +44 -0
- package/node_modules/lodash-es/math.default.js +21 -0
- package/node_modules/lodash-es/math.js +16 -0
- package/node_modules/lodash-es/max.js +29 -0
- package/node_modules/lodash-es/maxBy.js +34 -0
- package/node_modules/lodash-es/mean.js +22 -0
- package/node_modules/lodash-es/meanBy.js +31 -0
- package/node_modules/lodash-es/memoize.js +73 -0
- package/node_modules/lodash-es/merge.js +39 -0
- package/node_modules/lodash-es/mergeWith.js +39 -0
- package/node_modules/lodash-es/method.js +34 -0
- package/node_modules/lodash-es/methodOf.js +33 -0
- package/node_modules/lodash-es/min.js +29 -0
- package/node_modules/lodash-es/minBy.js +34 -0
- package/node_modules/lodash-es/mixin.js +74 -0
- package/node_modules/lodash-es/multiply.js +22 -0
- package/node_modules/lodash-es/negate.js +40 -0
- package/node_modules/lodash-es/next.js +35 -0
- package/node_modules/lodash-es/noop.js +17 -0
- package/node_modules/lodash-es/now.js +23 -0
- package/node_modules/lodash-es/nth.js +29 -0
- package/node_modules/lodash-es/nthArg.js +32 -0
- package/node_modules/lodash-es/number.default.js +7 -0
- package/node_modules/lodash-es/number.js +4 -0
- package/node_modules/lodash-es/object.default.js +60 -0
- package/node_modules/lodash-es/object.js +48 -0
- package/node_modules/lodash-es/omit.js +57 -0
- package/node_modules/lodash-es/omitBy.js +29 -0
- package/node_modules/lodash-es/once.js +25 -0
- package/node_modules/lodash-es/orderBy.js +47 -0
- package/node_modules/lodash-es/over.js +24 -0
- package/node_modules/lodash-es/overArgs.js +61 -0
- package/node_modules/lodash-es/overEvery.js +34 -0
- package/node_modules/lodash-es/overSome.js +37 -0
- package/node_modules/lodash-es/package.json +21 -0
- package/node_modules/lodash-es/pad.js +49 -0
- package/node_modules/lodash-es/padEnd.js +39 -0
- package/node_modules/lodash-es/padStart.js +39 -0
- package/node_modules/lodash-es/parseInt.js +43 -0
- package/node_modules/lodash-es/partial.js +50 -0
- package/node_modules/lodash-es/partialRight.js +49 -0
- package/node_modules/lodash-es/partition.js +43 -0
- package/node_modules/lodash-es/pick.js +25 -0
- package/node_modules/lodash-es/pickBy.js +37 -0
- package/node_modules/lodash-es/plant.js +48 -0
- package/node_modules/lodash-es/property.js +32 -0
- package/node_modules/lodash-es/propertyOf.js +30 -0
- package/node_modules/lodash-es/pull.js +29 -0
- package/node_modules/lodash-es/pullAll.js +29 -0
- package/node_modules/lodash-es/pullAllBy.js +33 -0
- package/node_modules/lodash-es/pullAllWith.js +32 -0
- package/node_modules/lodash-es/pullAt.js +43 -0
- package/node_modules/lodash-es/random.js +82 -0
- package/node_modules/lodash-es/range.js +46 -0
- package/node_modules/lodash-es/rangeRight.js +41 -0
- package/node_modules/lodash-es/rearg.js +33 -0
- package/node_modules/lodash-es/reduce.js +51 -0
- package/node_modules/lodash-es/reduceRight.js +36 -0
- package/node_modules/lodash-es/reject.js +46 -0
- package/node_modules/lodash-es/release.md +48 -0
- package/node_modules/lodash-es/remove.js +53 -0
- package/node_modules/lodash-es/repeat.js +37 -0
- package/node_modules/lodash-es/replace.js +29 -0
- package/node_modules/lodash-es/rest.js +40 -0
- package/node_modules/lodash-es/result.js +56 -0
- package/node_modules/lodash-es/reverse.js +34 -0
- package/node_modules/lodash-es/round.js +26 -0
- package/node_modules/lodash-es/sample.js +24 -0
- package/node_modules/lodash-es/sampleSize.js +37 -0
- package/node_modules/lodash-es/seq.default.js +20 -0
- package/node_modules/lodash-es/seq.js +15 -0
- package/node_modules/lodash-es/set.js +35 -0
- package/node_modules/lodash-es/setWith.js +32 -0
- package/node_modules/lodash-es/shuffle.js +25 -0
- package/node_modules/lodash-es/size.js +46 -0
- package/node_modules/lodash-es/slice.js +37 -0
- package/node_modules/lodash-es/snakeCase.js +28 -0
- package/node_modules/lodash-es/some.js +51 -0
- package/node_modules/lodash-es/sortBy.js +48 -0
- package/node_modules/lodash-es/sortedIndex.js +24 -0
- package/node_modules/lodash-es/sortedIndexBy.js +33 -0
- package/node_modules/lodash-es/sortedIndexOf.js +31 -0
- package/node_modules/lodash-es/sortedLastIndex.js +25 -0
- package/node_modules/lodash-es/sortedLastIndexBy.js +33 -0
- package/node_modules/lodash-es/sortedLastIndexOf.js +31 -0
- package/node_modules/lodash-es/sortedUniq.js +24 -0
- package/node_modules/lodash-es/sortedUniqBy.js +26 -0
- package/node_modules/lodash-es/split.js +52 -0
- package/node_modules/lodash-es/spread.js +63 -0
- package/node_modules/lodash-es/startCase.js +29 -0
- package/node_modules/lodash-es/startsWith.js +39 -0
- package/node_modules/lodash-es/string.default.js +41 -0
- package/node_modules/lodash-es/string.js +32 -0
- package/node_modules/lodash-es/stubArray.js +23 -0
- package/node_modules/lodash-es/stubFalse.js +18 -0
- package/node_modules/lodash-es/stubObject.js +23 -0
- package/node_modules/lodash-es/stubString.js +18 -0
- package/node_modules/lodash-es/stubTrue.js +18 -0
- package/node_modules/lodash-es/subtract.js +22 -0
- package/node_modules/lodash-es/sum.js +24 -0
- package/node_modules/lodash-es/sumBy.js +33 -0
- package/node_modules/lodash-es/tail.js +22 -0
- package/node_modules/lodash-es/take.js +37 -0
- package/node_modules/lodash-es/takeRight.js +39 -0
- package/node_modules/lodash-es/takeRightWhile.js +45 -0
- package/node_modules/lodash-es/takeWhile.js +45 -0
- package/node_modules/lodash-es/tap.js +29 -0
- package/node_modules/lodash-es/template.js +272 -0
- package/node_modules/lodash-es/templateSettings.js +67 -0
- package/node_modules/lodash-es/throttle.js +69 -0
- package/node_modules/lodash-es/thru.js +28 -0
- package/node_modules/lodash-es/times.js +51 -0
- package/node_modules/lodash-es/toArray.js +58 -0
- package/node_modules/lodash-es/toFinite.js +42 -0
- package/node_modules/lodash-es/toInteger.js +36 -0
- package/node_modules/lodash-es/toIterator.js +23 -0
- package/node_modules/lodash-es/toJSON.js +1 -0
- package/node_modules/lodash-es/toLength.js +38 -0
- package/node_modules/lodash-es/toLower.js +28 -0
- package/node_modules/lodash-es/toNumber.js +64 -0
- package/node_modules/lodash-es/toPairs.js +30 -0
- package/node_modules/lodash-es/toPairsIn.js +30 -0
- package/node_modules/lodash-es/toPath.js +33 -0
- package/node_modules/lodash-es/toPlainObject.js +32 -0
- package/node_modules/lodash-es/toSafeInteger.js +37 -0
- package/node_modules/lodash-es/toString.js +28 -0
- package/node_modules/lodash-es/toUpper.js +28 -0
- package/node_modules/lodash-es/transform.js +65 -0
- package/node_modules/lodash-es/trim.js +47 -0
- package/node_modules/lodash-es/trimEnd.js +41 -0
- package/node_modules/lodash-es/trimStart.js +43 -0
- package/node_modules/lodash-es/truncate.js +111 -0
- package/node_modules/lodash-es/unary.js +22 -0
- package/node_modules/lodash-es/unescape.js +34 -0
- package/node_modules/lodash-es/union.js +26 -0
- package/node_modules/lodash-es/unionBy.js +39 -0
- package/node_modules/lodash-es/unionWith.js +34 -0
- package/node_modules/lodash-es/uniq.js +25 -0
- package/node_modules/lodash-es/uniqBy.js +31 -0
- package/node_modules/lodash-es/uniqWith.js +28 -0
- package/node_modules/lodash-es/uniqueId.js +28 -0
- package/node_modules/lodash-es/unset.js +34 -0
- package/node_modules/lodash-es/unzip.js +45 -0
- package/node_modules/lodash-es/unzipWith.js +39 -0
- package/node_modules/lodash-es/update.js +35 -0
- package/node_modules/lodash-es/updateWith.js +33 -0
- package/node_modules/lodash-es/upperCase.js +27 -0
- package/node_modules/lodash-es/upperFirst.js +22 -0
- package/node_modules/lodash-es/util.default.js +42 -0
- package/node_modules/lodash-es/util.js +33 -0
- package/node_modules/lodash-es/value.js +1 -0
- package/node_modules/lodash-es/valueOf.js +1 -0
- package/node_modules/lodash-es/values.js +34 -0
- package/node_modules/lodash-es/valuesIn.js +32 -0
- package/node_modules/lodash-es/without.js +31 -0
- package/node_modules/lodash-es/words.js +35 -0
- package/node_modules/lodash-es/wrap.js +30 -0
- package/node_modules/lodash-es/wrapperAt.js +48 -0
- package/node_modules/lodash-es/wrapperChain.js +34 -0
- package/node_modules/lodash-es/wrapperLodash.js +147 -0
- package/node_modules/lodash-es/wrapperReverse.js +44 -0
- package/node_modules/lodash-es/wrapperValue.js +21 -0
- package/node_modules/lodash-es/xor.js +28 -0
- package/node_modules/lodash-es/xorBy.js +39 -0
- package/node_modules/lodash-es/xorWith.js +34 -0
- package/node_modules/lodash-es/zip.js +22 -0
- package/node_modules/lodash-es/zipObject.js +24 -0
- package/node_modules/lodash-es/zipObjectDeep.js +23 -0
- package/node_modules/lodash-es/zipWith.js +32 -0
- package/node_modules/resize-observer-polyfill/LICENSE +21 -0
- package/node_modules/resize-observer-polyfill/README.md +112 -0
- package/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +928 -0
- package/node_modules/resize-observer-polyfill/dist/ResizeObserver.global.js +1034 -0
- package/node_modules/resize-observer-polyfill/dist/ResizeObserver.js +936 -0
- package/node_modules/resize-observer-polyfill/dist/ResizeObserver.js.flow +32 -0
- package/node_modules/resize-observer-polyfill/package.json +64 -0
- package/node_modules/resize-observer-polyfill/src/ResizeObservation.js +76 -0
- package/node_modules/resize-observer-polyfill/src/ResizeObserver.js +47 -0
- package/node_modules/resize-observer-polyfill/src/ResizeObserverController.js +238 -0
- package/node_modules/resize-observer-polyfill/src/ResizeObserverEntry.js +40 -0
- package/node_modules/resize-observer-polyfill/src/ResizeObserverSPI.js +203 -0
- package/node_modules/resize-observer-polyfill/src/index.d.ts +40 -0
- package/node_modules/resize-observer-polyfill/src/index.js +11 -0
- package/node_modules/resize-observer-polyfill/src/index.js.flow +32 -0
- package/node_modules/resize-observer-polyfill/src/shims/es6-collections.js +115 -0
- package/node_modules/resize-observer-polyfill/src/shims/global.js +17 -0
- package/node_modules/resize-observer-polyfill/src/shims/requestAnimationFrame.js +18 -0
- package/node_modules/resize-observer-polyfill/src/utils/defineConfigurable.js +19 -0
- package/node_modules/resize-observer-polyfill/src/utils/geometry.js +233 -0
- package/node_modules/resize-observer-polyfill/src/utils/getWindowOf.js +18 -0
- package/node_modules/resize-observer-polyfill/src/utils/isBrowser.js +4 -0
- package/node_modules/resize-observer-polyfill/src/utils/throttle.js +78 -0
- package/node_modules/uuid/CHANGELOG.md +335 -0
- package/node_modules/uuid/CONTRIBUTING.md +18 -0
- package/node_modules/uuid/LICENSE.md +9 -0
- package/node_modules/uuid/README.md +497 -0
- package/node_modules/uuid/dist/cjs/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs/index.js +31 -0
- package/node_modules/uuid/dist/cjs/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/max.js +3 -0
- package/node_modules/uuid/dist/cjs/md5.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/md5.js +13 -0
- package/node_modules/uuid/dist/cjs/native.d.ts +5 -0
- package/node_modules/uuid/dist/cjs/native.js +4 -0
- package/node_modules/uuid/dist/cjs/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/nil.js +3 -0
- package/node_modules/uuid/dist/cjs/package.json +1 -0
- package/node_modules/uuid/dist/cjs/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/parse.js +11 -0
- package/node_modules/uuid/dist/cjs/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/regex.js +3 -0
- package/node_modules/uuid/dist/cjs/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/rng.js +13 -0
- package/node_modules/uuid/dist/cjs/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/sha1.js +13 -0
- package/node_modules/uuid/dist/cjs/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs/stringify.js +38 -0
- package/node_modules/uuid/dist/cjs/test/parse.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/test/parse.test.js +50 -0
- package/node_modules/uuid/dist/cjs/test/rng.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/test/rng.test.js +14 -0
- package/node_modules/uuid/dist/cjs/test/stringify.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/test/stringify.test.js +23 -0
- package/node_modules/uuid/dist/cjs/test/test_constants.d.ts +33 -0
- package/node_modules/uuid/dist/cjs/test/test_constants.js +91 -0
- package/node_modules/uuid/dist/cjs/test/v1.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/test/v1.test.js +127 -0
- package/node_modules/uuid/dist/cjs/test/v35.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/test/v35.test.js +143 -0
- package/node_modules/uuid/dist/cjs/test/v4.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/test/v4.test.js +60 -0
- package/node_modules/uuid/dist/cjs/test/v6.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/test/v6.test.js +56 -0
- package/node_modules/uuid/dist/cjs/test/v7.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/test/v7.test.js +194 -0
- package/node_modules/uuid/dist/cjs/test/validate.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/test/validate.test.js +13 -0
- package/node_modules/uuid/dist/cjs/test/version.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/test/version.test.js +20 -0
- package/node_modules/uuid/dist/cjs/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs/types.js +2 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs/v1.js +78 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v3.js +14 -0
- package/node_modules/uuid/dist/cjs/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs/v35.js +41 -0
- package/node_modules/uuid/dist/cjs/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v4.js +23 -0
- package/node_modules/uuid/dist/cjs/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v5.js +14 -0
- package/node_modules/uuid/dist/cjs/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v6.js +19 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v7.js +60 -0
- package/node_modules/uuid/dist/cjs/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/validate.js +7 -0
- package/node_modules/uuid/dist/cjs/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/version.js +10 -0
- package/node_modules/uuid/dist/cjs-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs-browser/index.js +31 -0
- package/node_modules/uuid/dist/cjs-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/max.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/md5.js +137 -0
- package/node_modules/uuid/dist/cjs-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/native.js +4 -0
- package/node_modules/uuid/dist/cjs-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/nil.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/package.json +1 -0
- package/node_modules/uuid/dist/cjs-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/parse.js +11 -0
- package/node_modules/uuid/dist/cjs-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/regex.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/rng.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.js +38 -0
- package/node_modules/uuid/dist/cjs-browser/test/parse.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/test/parse.test.js +50 -0
- package/node_modules/uuid/dist/cjs-browser/test/rng.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/test/rng.test.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/test/stringify.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/test/stringify.test.js +23 -0
- package/node_modules/uuid/dist/cjs-browser/test/test_constants.d.ts +33 -0
- package/node_modules/uuid/dist/cjs-browser/test/test_constants.js +91 -0
- package/node_modules/uuid/dist/cjs-browser/test/v1.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/test/v1.test.js +127 -0
- package/node_modules/uuid/dist/cjs-browser/test/v35.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/test/v35.test.js +143 -0
- package/node_modules/uuid/dist/cjs-browser/test/v4.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/test/v4.test.js +60 -0
- package/node_modules/uuid/dist/cjs-browser/test/v6.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/test/v6.test.js +56 -0
- package/node_modules/uuid/dist/cjs-browser/test/v7.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/test/v7.test.js +194 -0
- package/node_modules/uuid/dist/cjs-browser/test/validate.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/test/validate.test.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/test/version.test.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/test/version.test.js +20 -0
- package/node_modules/uuid/dist/cjs-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs-browser/types.js +2 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs-browser/v1.js +78 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v3.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs-browser/v35.js +41 -0
- package/node_modules/uuid/dist/cjs-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v4.js +23 -0
- package/node_modules/uuid/dist/cjs-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v5.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v6.js +19 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v7.js +60 -0
- package/node_modules/uuid/dist/cjs-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/validate.js +7 -0
- package/node_modules/uuid/dist/cjs-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/version.js +10 -0
- package/node_modules/uuid/dist/esm/bin/uuid +2 -0
- package/node_modules/uuid/dist/esm/index.d.ts +15 -0
- package/node_modules/uuid/dist/esm/index.js +14 -0
- package/node_modules/uuid/dist/esm/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm/max.js +1 -0
- package/node_modules/uuid/dist/esm/md5.d.ts +2 -0
- package/node_modules/uuid/dist/esm/md5.js +11 -0
- package/node_modules/uuid/dist/esm/native.d.ts +5 -0
- package/node_modules/uuid/dist/esm/native.js +2 -0
- package/node_modules/uuid/dist/esm/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm/nil.js +1 -0
- package/node_modules/uuid/dist/esm/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm/parse.js +9 -0
- package/node_modules/uuid/dist/esm/regex.d.ts +2 -0
- package/node_modules/uuid/dist/esm/regex.js +1 -0
- package/node_modules/uuid/dist/esm/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm/rng.js +10 -0
- package/node_modules/uuid/dist/esm/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/esm/sha1.js +11 -0
- package/node_modules/uuid/dist/esm/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm/stringify.js +35 -0
- package/node_modules/uuid/dist/esm/test/parse.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm/test/parse.test.js +48 -0
- package/node_modules/uuid/dist/esm/test/rng.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm/test/rng.test.js +12 -0
- package/node_modules/uuid/dist/esm/test/stringify.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm/test/stringify.test.js +21 -0
- package/node_modules/uuid/dist/esm/test/test_constants.d.ts +33 -0
- package/node_modules/uuid/dist/esm/test/test_constants.js +88 -0
- package/node_modules/uuid/dist/esm/test/v1.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm/test/v1.test.js +125 -0
- package/node_modules/uuid/dist/esm/test/v35.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm/test/v35.test.js +141 -0
- package/node_modules/uuid/dist/esm/test/v4.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm/test/v4.test.js +58 -0
- package/node_modules/uuid/dist/esm/test/v6.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm/test/v6.test.js +54 -0
- package/node_modules/uuid/dist/esm/test/v7.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm/test/v7.test.js +192 -0
- package/node_modules/uuid/dist/esm/test/validate.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm/test/validate.test.js +11 -0
- package/node_modules/uuid/dist/esm/test/version.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm/test/version.test.js +18 -0
- package/node_modules/uuid/dist/esm/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm/types.js +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm/v1.js +75 -0
- package/node_modules/uuid/dist/esm/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v1ToV6.js +10 -0
- package/node_modules/uuid/dist/esm/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v3.js +9 -0
- package/node_modules/uuid/dist/esm/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm/v35.js +36 -0
- package/node_modules/uuid/dist/esm/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v4.js +21 -0
- package/node_modules/uuid/dist/esm/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v5.js +9 -0
- package/node_modules/uuid/dist/esm/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v6.js +17 -0
- package/node_modules/uuid/dist/esm/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v6ToV1.js +10 -0
- package/node_modules/uuid/dist/esm/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v7.js +57 -0
- package/node_modules/uuid/dist/esm/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm/validate.js +5 -0
- package/node_modules/uuid/dist/esm/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm/version.js +8 -0
- package/node_modules/uuid/dist/esm-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/esm-browser/index.js +14 -0
- package/node_modules/uuid/dist/esm-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/max.js +1 -0
- package/node_modules/uuid/dist/esm-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +135 -0
- package/node_modules/uuid/dist/esm-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/native.js +2 -0
- package/node_modules/uuid/dist/esm-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/uuid/dist/esm-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +9 -0
- package/node_modules/uuid/dist/esm-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +11 -0
- package/node_modules/uuid/dist/esm-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +70 -0
- package/node_modules/uuid/dist/esm-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +35 -0
- package/node_modules/uuid/dist/esm-browser/test/parse.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/test/parse.test.js +48 -0
- package/node_modules/uuid/dist/esm-browser/test/rng.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/test/rng.test.js +12 -0
- package/node_modules/uuid/dist/esm-browser/test/stringify.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/test/stringify.test.js +21 -0
- package/node_modules/uuid/dist/esm-browser/test/test_constants.d.ts +33 -0
- package/node_modules/uuid/dist/esm-browser/test/test_constants.js +88 -0
- package/node_modules/uuid/dist/esm-browser/test/v1.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/test/v1.test.js +125 -0
- package/node_modules/uuid/dist/esm-browser/test/v35.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/test/v35.test.js +141 -0
- package/node_modules/uuid/dist/esm-browser/test/v4.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/test/v4.test.js +58 -0
- package/node_modules/uuid/dist/esm-browser/test/v6.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/test/v6.test.js +54 -0
- package/node_modules/uuid/dist/esm-browser/test/v7.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/test/v7.test.js +192 -0
- package/node_modules/uuid/dist/esm-browser/test/validate.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/test/validate.test.js +11 -0
- package/node_modules/uuid/dist/esm-browser/test/version.test.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/test/version.test.js +18 -0
- package/node_modules/uuid/dist/esm-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm-browser/types.js +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm-browser/v1.js +75 -0
- package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v1ToV6.js +10 -0
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +9 -0
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +36 -0
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +21 -0
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +9 -0
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v6.js +17 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.js +10 -0
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v7.js +57 -0
- package/node_modules/uuid/dist/esm-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +5 -0
- package/node_modules/uuid/dist/esm-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/version.js +8 -0
- package/node_modules/uuid/package.json +134 -0
- package/node_modules/worker-timers/LICENSE +21 -0
- package/node_modules/worker-timers/README.md +71 -0
- package/node_modules/worker-timers/build/es2019/factories/load-or-return-broker.d.ts +2 -0
- package/node_modules/worker-timers/build/es2019/factories/load-or-return-broker.d.ts.map +1 -0
- package/node_modules/worker-timers/build/es2019/factories/load-or-return-broker.js +15 -0
- package/node_modules/worker-timers/build/es2019/factories/load-or-return-broker.js.map +1 -0
- package/node_modules/worker-timers/build/es2019/module.d.ts +6 -0
- package/node_modules/worker-timers/build/es2019/module.d.ts.map +1 -0
- package/node_modules/worker-timers/build/es2019/module.js +9 -0
- package/node_modules/worker-timers/build/es2019/module.js.map +1 -0
- package/node_modules/worker-timers/build/es2019/worker/worker.d.ts +2 -0
- package/node_modules/worker-timers/build/es2019/worker/worker.d.ts.map +1 -0
- package/node_modules/worker-timers/build/es2019/worker/worker.js +3 -0
- package/node_modules/worker-timers/build/es2019/worker/worker.js.map +1 -0
- package/node_modules/worker-timers/build/es5/bundle.js +50 -0
- package/node_modules/worker-timers/package.json +106 -0
- package/node_modules/worker-timers/src/factories/load-or-return-broker.ts +19 -0
- package/node_modules/worker-timers/src/module.ts +13 -0
- package/node_modules/worker-timers/src/tsconfig.json +6 -0
- package/node_modules/worker-timers/src/worker/worker.ts +2 -0
- package/package.json +9 -2
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import * as assert from 'assert';
|
|
2
|
+
import test, { describe } from 'node:test';
|
|
3
|
+
import parse from '../parse.js';
|
|
4
|
+
import stringify from '../stringify.js';
|
|
5
|
+
import v7, { updateV7State } from '../v7.js';
|
|
6
|
+
const RFC_V7 = '017f22e2-79b0-7cc3-98c4-dc0c0c07398f';
|
|
7
|
+
const RFC_V7_BYTES = parse('017f22e2-79b0-7cc3-98c4-dc0c0c07398f');
|
|
8
|
+
const RFC_MSECS = 0x17f22e279b0;
|
|
9
|
+
const RFC_SEQ = (0x0cc3 << 20) | (0x98c4dc >> 2);
|
|
10
|
+
const RFC_RANDOM = Uint8Array.of(0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0x0c, 0xc3, 0x18, 0xc4, 0x6c, 0x0c, 0x0c, 0x07, 0x39, 0x8f);
|
|
11
|
+
describe('v7', () => {
|
|
12
|
+
test('subsequent UUIDs are different', () => {
|
|
13
|
+
const id1 = v7();
|
|
14
|
+
const id2 = v7();
|
|
15
|
+
assert.ok(id1 !== id2);
|
|
16
|
+
});
|
|
17
|
+
test('explicit options.random and options.msecs produces expected result', () => {
|
|
18
|
+
const id = v7({
|
|
19
|
+
random: RFC_RANDOM,
|
|
20
|
+
msecs: RFC_MSECS,
|
|
21
|
+
seq: RFC_SEQ,
|
|
22
|
+
});
|
|
23
|
+
assert.strictEqual(id, RFC_V7);
|
|
24
|
+
});
|
|
25
|
+
test('explicit options.rng produces expected result', () => {
|
|
26
|
+
const id = v7({
|
|
27
|
+
rng: () => RFC_RANDOM,
|
|
28
|
+
msecs: RFC_MSECS,
|
|
29
|
+
seq: RFC_SEQ,
|
|
30
|
+
});
|
|
31
|
+
assert.strictEqual(id, RFC_V7);
|
|
32
|
+
});
|
|
33
|
+
test('explicit options.msecs produces expected result', () => {
|
|
34
|
+
const id = v7({
|
|
35
|
+
msecs: RFC_MSECS,
|
|
36
|
+
});
|
|
37
|
+
assert.strictEqual(id.indexOf('017f22e2'), 0);
|
|
38
|
+
});
|
|
39
|
+
test('fills one UUID into a buffer as expected', () => {
|
|
40
|
+
const buffer = new Uint8Array(16);
|
|
41
|
+
const result = v7({
|
|
42
|
+
random: RFC_RANDOM,
|
|
43
|
+
msecs: RFC_MSECS,
|
|
44
|
+
seq: RFC_SEQ,
|
|
45
|
+
}, buffer);
|
|
46
|
+
stringify(buffer);
|
|
47
|
+
assert.deepEqual(buffer, RFC_V7_BYTES);
|
|
48
|
+
assert.strictEqual(buffer, result);
|
|
49
|
+
});
|
|
50
|
+
test('fills two UUIDs into a buffer as expected', () => {
|
|
51
|
+
const buffer = new Uint8Array(32);
|
|
52
|
+
v7({
|
|
53
|
+
random: RFC_RANDOM,
|
|
54
|
+
msecs: RFC_MSECS,
|
|
55
|
+
seq: RFC_SEQ,
|
|
56
|
+
}, buffer, 0);
|
|
57
|
+
v7({
|
|
58
|
+
random: RFC_RANDOM,
|
|
59
|
+
msecs: RFC_MSECS,
|
|
60
|
+
seq: RFC_SEQ,
|
|
61
|
+
}, buffer, 16);
|
|
62
|
+
const expected = new Uint8Array(32);
|
|
63
|
+
expected.set(RFC_V7_BYTES);
|
|
64
|
+
expected.set(RFC_V7_BYTES, 16);
|
|
65
|
+
assert.deepEqual(buffer, expected);
|
|
66
|
+
});
|
|
67
|
+
test('lexicographical sorting is preserved', () => {
|
|
68
|
+
let id;
|
|
69
|
+
let prior;
|
|
70
|
+
let msecs = RFC_MSECS;
|
|
71
|
+
for (let i = 0; i < 20000; ++i) {
|
|
72
|
+
if (i % 1500 === 0) {
|
|
73
|
+
msecs += 1;
|
|
74
|
+
}
|
|
75
|
+
id = v7({ msecs, seq: i });
|
|
76
|
+
if (prior !== undefined) {
|
|
77
|
+
assert.ok(prior < id, `${prior} < ${id}`);
|
|
78
|
+
}
|
|
79
|
+
prior = id;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
test('can supply seq', () => {
|
|
83
|
+
let seq = 0x12345;
|
|
84
|
+
let uuid = v7({
|
|
85
|
+
msecs: RFC_MSECS,
|
|
86
|
+
seq,
|
|
87
|
+
});
|
|
88
|
+
assert.strictEqual(uuid.substr(0, 25), '017f22e2-79b0-7000-848d-1');
|
|
89
|
+
seq = 0x6fffffff;
|
|
90
|
+
uuid = v7({
|
|
91
|
+
msecs: RFC_MSECS,
|
|
92
|
+
seq,
|
|
93
|
+
});
|
|
94
|
+
assert.strictEqual(uuid.substring(0, 25), '017f22e2-79b0-76ff-bfff-f');
|
|
95
|
+
});
|
|
96
|
+
test('internal seq is reset upon timestamp change', () => {
|
|
97
|
+
v7({
|
|
98
|
+
msecs: RFC_MSECS,
|
|
99
|
+
seq: 0x6fffffff,
|
|
100
|
+
});
|
|
101
|
+
const uuid = v7({
|
|
102
|
+
msecs: RFC_MSECS + 1,
|
|
103
|
+
});
|
|
104
|
+
assert.ok(uuid.indexOf('fff') !== 15);
|
|
105
|
+
});
|
|
106
|
+
test('v7() state transitions', () => {
|
|
107
|
+
const tests = [
|
|
108
|
+
{
|
|
109
|
+
title: 'new time interval',
|
|
110
|
+
state: { msecs: 1, seq: 123 },
|
|
111
|
+
now: 2,
|
|
112
|
+
expected: {
|
|
113
|
+
msecs: 2,
|
|
114
|
+
seq: 0x6c318c4,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
title: 'same time interval',
|
|
119
|
+
state: { msecs: 1, seq: 123 },
|
|
120
|
+
now: 1,
|
|
121
|
+
expected: {
|
|
122
|
+
msecs: 1,
|
|
123
|
+
seq: 124,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
title: 'same time interval (sequence rollover)',
|
|
128
|
+
state: { msecs: 1, seq: 0xffffffff },
|
|
129
|
+
now: 1,
|
|
130
|
+
expected: {
|
|
131
|
+
msecs: 2,
|
|
132
|
+
seq: 0,
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
title: 'time regression',
|
|
137
|
+
state: { msecs: 2, seq: 123 },
|
|
138
|
+
now: 1,
|
|
139
|
+
expected: {
|
|
140
|
+
msecs: 2,
|
|
141
|
+
seq: 124,
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
title: 'time regression (sequence rollover)',
|
|
146
|
+
state: { msecs: 2, seq: 0xffffffff },
|
|
147
|
+
now: 1,
|
|
148
|
+
expected: {
|
|
149
|
+
msecs: 3,
|
|
150
|
+
seq: 0,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
];
|
|
154
|
+
for (const { title, state, now, expected } of tests) {
|
|
155
|
+
assert.deepStrictEqual(updateV7State(state, now, RFC_RANDOM), expected, `Failed: ${title}`);
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
test('flipping bits changes the result', () => {
|
|
159
|
+
const asBigInt = (buf) => buf.reduce((acc, v) => (acc << 8n) | BigInt(v), 0n);
|
|
160
|
+
const asNumber = (bits, data) => Number(BigInt.asUintN(bits, data));
|
|
161
|
+
const flip = (data, n) => data ^ (1n << BigInt(127 - n));
|
|
162
|
+
const optionsFrom = (data) => {
|
|
163
|
+
const ms = asNumber(48, data >> 80n);
|
|
164
|
+
const hi = asNumber(12, data >> 64n);
|
|
165
|
+
const lo = asNumber(20, data >> 42n);
|
|
166
|
+
const r = BigInt.asUintN(42, data);
|
|
167
|
+
return {
|
|
168
|
+
msecs: ms,
|
|
169
|
+
seq: (hi << 20) | lo,
|
|
170
|
+
random: Uint8Array.from([
|
|
171
|
+
...Array(10).fill(0),
|
|
172
|
+
...Array(6)
|
|
173
|
+
.fill(0)
|
|
174
|
+
.map((_, i) => asNumber(8, r >> (BigInt(i) * 8n)))
|
|
175
|
+
.reverse(),
|
|
176
|
+
]),
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
const buf = new Uint8Array(16);
|
|
180
|
+
const data = asBigInt(v7({}, buf));
|
|
181
|
+
const id = stringify(buf);
|
|
182
|
+
const reserved = [48, 49, 50, 51, 64, 65];
|
|
183
|
+
for (let i = 0; i < 128; ++i) {
|
|
184
|
+
if (reserved.includes(i)) {
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
const flipped = flip(data, i);
|
|
188
|
+
assert.strictEqual(asBigInt(v7(optionsFrom(flipped), buf)).toString(16), flipped.toString(16), `Unequal uuids at bit ${i}`);
|
|
189
|
+
assert.notStrictEqual(stringify(buf), id);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as assert from 'assert';
|
|
2
|
+
import test, { describe } from 'node:test';
|
|
3
|
+
import validate from '../validate.js';
|
|
4
|
+
import { TESTS } from './test_constants.js';
|
|
5
|
+
describe('validate()', () => {
|
|
6
|
+
test('TESTS cases', () => {
|
|
7
|
+
for (const { value, expectedValidate } of TESTS) {
|
|
8
|
+
assert.strictEqual(validate(value), expectedValidate, `validate(${value}) should be ${expectedValidate}`);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as assert from 'assert';
|
|
2
|
+
import test, { describe } from 'node:test';
|
|
3
|
+
import version from '../version.js';
|
|
4
|
+
import { TESTS } from './test_constants.js';
|
|
5
|
+
describe('version()', () => {
|
|
6
|
+
test('TESTS cases', () => {
|
|
7
|
+
for (const { value, expectedValidate, expectedVersion } of TESTS) {
|
|
8
|
+
try {
|
|
9
|
+
const actualVersion = version(value);
|
|
10
|
+
assert.ok(expectedValidate, `version(${value}) should throw`);
|
|
11
|
+
assert.strictEqual(actualVersion, expectedVersion);
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
assert.ok(!expectedValidate, `version(${value}) threw unexpectedly`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type UUIDTypes = string | Uint8Array;
|
|
2
|
+
export type Version1Options = {
|
|
3
|
+
node?: Uint8Array;
|
|
4
|
+
clockseq?: number;
|
|
5
|
+
random?: Uint8Array;
|
|
6
|
+
rng?: () => Uint8Array;
|
|
7
|
+
msecs?: number;
|
|
8
|
+
nsecs?: number;
|
|
9
|
+
_v6?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type Version4Options = {
|
|
12
|
+
random?: Uint8Array;
|
|
13
|
+
rng?: () => Uint8Array;
|
|
14
|
+
};
|
|
15
|
+
export type Version6Options = Version1Options;
|
|
16
|
+
export type Version7Options = {
|
|
17
|
+
random?: Uint8Array;
|
|
18
|
+
msecs?: number;
|
|
19
|
+
seq?: number;
|
|
20
|
+
rng?: () => Uint8Array;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import * as assert from 'assert';
|
|
2
|
+
import v1 from './v1.js';
|
|
3
|
+
import v3 from './v3.js';
|
|
4
|
+
import v4 from './v4.js';
|
|
5
|
+
import v5 from './v5.js';
|
|
6
|
+
import v6 from './v6.js';
|
|
7
|
+
import v7 from './v7.js';
|
|
8
|
+
function usage() {
|
|
9
|
+
console.log('Usage:');
|
|
10
|
+
console.log(' uuid');
|
|
11
|
+
console.log(' uuid v1');
|
|
12
|
+
console.log(' uuid v3 <name> <namespace uuid>');
|
|
13
|
+
console.log(' uuid v4');
|
|
14
|
+
console.log(' uuid v5 <name> <namespace uuid>');
|
|
15
|
+
console.log(' uuid v6');
|
|
16
|
+
console.log(' uuid v7');
|
|
17
|
+
console.log(' uuid --help');
|
|
18
|
+
console.log('\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC9562');
|
|
19
|
+
}
|
|
20
|
+
const args = process.argv.slice(2);
|
|
21
|
+
if (args.indexOf('--help') >= 0) {
|
|
22
|
+
usage();
|
|
23
|
+
process.exit(0);
|
|
24
|
+
}
|
|
25
|
+
const version = args.shift() || 'v4';
|
|
26
|
+
switch (version) {
|
|
27
|
+
case 'v1':
|
|
28
|
+
console.log(v1());
|
|
29
|
+
break;
|
|
30
|
+
case 'v3': {
|
|
31
|
+
const name = args.shift();
|
|
32
|
+
let namespace = args.shift();
|
|
33
|
+
assert.ok(name != null, 'v3 name not specified');
|
|
34
|
+
assert.ok(namespace != null, 'v3 namespace not specified');
|
|
35
|
+
if (namespace === 'URL') {
|
|
36
|
+
namespace = v3.URL;
|
|
37
|
+
}
|
|
38
|
+
if (namespace === 'DNS') {
|
|
39
|
+
namespace = v3.DNS;
|
|
40
|
+
}
|
|
41
|
+
console.log(v3(name, namespace));
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
case 'v4':
|
|
45
|
+
console.log(v4());
|
|
46
|
+
break;
|
|
47
|
+
case 'v5': {
|
|
48
|
+
const name = args.shift();
|
|
49
|
+
let namespace = args.shift();
|
|
50
|
+
assert.ok(name != null, 'v5 name not specified');
|
|
51
|
+
assert.ok(namespace != null, 'v5 namespace not specified');
|
|
52
|
+
if (namespace === 'URL') {
|
|
53
|
+
namespace = v5.URL;
|
|
54
|
+
}
|
|
55
|
+
if (namespace === 'DNS') {
|
|
56
|
+
namespace = v5.DNS;
|
|
57
|
+
}
|
|
58
|
+
console.log(v5(name, namespace));
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
case 'v6':
|
|
62
|
+
console.log(v6());
|
|
63
|
+
break;
|
|
64
|
+
case 'v7':
|
|
65
|
+
console.log(v7());
|
|
66
|
+
break;
|
|
67
|
+
default:
|
|
68
|
+
usage();
|
|
69
|
+
process.exit(1);
|
|
70
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Version1Options } from './types.js';
|
|
2
|
+
type V1State = {
|
|
3
|
+
node?: Uint8Array;
|
|
4
|
+
clockseq?: number;
|
|
5
|
+
msecs?: number;
|
|
6
|
+
nsecs?: number;
|
|
7
|
+
};
|
|
8
|
+
declare function v1(options?: Version1Options, buf?: undefined, offset?: number): string;
|
|
9
|
+
declare function v1(options: Version1Options | undefined, buf: Uint8Array, offset?: number): Uint8Array;
|
|
10
|
+
export declare function updateV1State(state: V1State, now: number, rnds: Uint8Array): V1State;
|
|
11
|
+
export default v1;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import rng from './rng.js';
|
|
2
|
+
import { unsafeStringify } from './stringify.js';
|
|
3
|
+
const _state = {};
|
|
4
|
+
function v1(options, buf, offset) {
|
|
5
|
+
let bytes;
|
|
6
|
+
const isV6 = options?._v6 ?? false;
|
|
7
|
+
if (options) {
|
|
8
|
+
const optionsKeys = Object.keys(options);
|
|
9
|
+
if (optionsKeys.length === 1 && optionsKeys[0] === '_v6') {
|
|
10
|
+
options = undefined;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
if (options) {
|
|
14
|
+
bytes = v1Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
const now = Date.now();
|
|
18
|
+
const rnds = rng();
|
|
19
|
+
updateV1State(_state, now, rnds);
|
|
20
|
+
bytes = v1Bytes(rnds, _state.msecs, _state.nsecs, isV6 ? undefined : _state.clockseq, isV6 ? undefined : _state.node, buf, offset);
|
|
21
|
+
}
|
|
22
|
+
return buf ? bytes : unsafeStringify(bytes);
|
|
23
|
+
}
|
|
24
|
+
export function updateV1State(state, now, rnds) {
|
|
25
|
+
state.msecs ??= -Infinity;
|
|
26
|
+
state.nsecs ??= 0;
|
|
27
|
+
if (now === state.msecs) {
|
|
28
|
+
state.nsecs++;
|
|
29
|
+
if (state.nsecs >= 10000) {
|
|
30
|
+
state.node = undefined;
|
|
31
|
+
state.nsecs = 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
else if (now > state.msecs) {
|
|
35
|
+
state.nsecs = 0;
|
|
36
|
+
}
|
|
37
|
+
else if (now < state.msecs) {
|
|
38
|
+
state.node = undefined;
|
|
39
|
+
}
|
|
40
|
+
if (!state.node) {
|
|
41
|
+
state.node = rnds.slice(10, 16);
|
|
42
|
+
state.node[0] |= 0x01;
|
|
43
|
+
state.clockseq = ((rnds[8] << 8) | rnds[9]) & 0x3fff;
|
|
44
|
+
}
|
|
45
|
+
state.msecs = now;
|
|
46
|
+
return state;
|
|
47
|
+
}
|
|
48
|
+
function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) {
|
|
49
|
+
if (!buf) {
|
|
50
|
+
buf = new Uint8Array(16);
|
|
51
|
+
offset = 0;
|
|
52
|
+
}
|
|
53
|
+
msecs ??= Date.now();
|
|
54
|
+
nsecs ??= 0;
|
|
55
|
+
clockseq ??= ((rnds[8] << 8) | rnds[9]) & 0x3fff;
|
|
56
|
+
node ??= rnds.slice(10, 16);
|
|
57
|
+
msecs += 12219292800000;
|
|
58
|
+
const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
|
59
|
+
buf[offset++] = (tl >>> 24) & 0xff;
|
|
60
|
+
buf[offset++] = (tl >>> 16) & 0xff;
|
|
61
|
+
buf[offset++] = (tl >>> 8) & 0xff;
|
|
62
|
+
buf[offset++] = tl & 0xff;
|
|
63
|
+
const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff;
|
|
64
|
+
buf[offset++] = (tmh >>> 8) & 0xff;
|
|
65
|
+
buf[offset++] = tmh & 0xff;
|
|
66
|
+
buf[offset++] = ((tmh >>> 24) & 0xf) | 0x10;
|
|
67
|
+
buf[offset++] = (tmh >>> 16) & 0xff;
|
|
68
|
+
buf[offset++] = (clockseq >>> 8) | 0x80;
|
|
69
|
+
buf[offset++] = clockseq & 0xff;
|
|
70
|
+
for (let n = 0; n < 6; ++n) {
|
|
71
|
+
buf[offset++] = node[n];
|
|
72
|
+
}
|
|
73
|
+
return buf;
|
|
74
|
+
}
|
|
75
|
+
export default v1;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import parse from './parse.js';
|
|
2
|
+
import { unsafeStringify } from './stringify.js';
|
|
3
|
+
export default function v1ToV6(uuid) {
|
|
4
|
+
const v1Bytes = typeof uuid === 'string' ? parse(uuid) : uuid;
|
|
5
|
+
const v6Bytes = _v1ToV6(v1Bytes);
|
|
6
|
+
return typeof uuid === 'string' ? unsafeStringify(v6Bytes) : v6Bytes;
|
|
7
|
+
}
|
|
8
|
+
function _v1ToV6(v1Bytes) {
|
|
9
|
+
return Uint8Array.of(((v1Bytes[6] & 0x0f) << 4) | ((v1Bytes[7] >> 4) & 0x0f), ((v1Bytes[7] & 0x0f) << 4) | ((v1Bytes[4] & 0xf0) >> 4), ((v1Bytes[4] & 0x0f) << 4) | ((v1Bytes[5] & 0xf0) >> 4), ((v1Bytes[5] & 0x0f) << 4) | ((v1Bytes[0] & 0xf0) >> 4), ((v1Bytes[0] & 0x0f) << 4) | ((v1Bytes[1] & 0xf0) >> 4), ((v1Bytes[1] & 0x0f) << 4) | ((v1Bytes[2] & 0xf0) >> 4), 0x60 | (v1Bytes[2] & 0x0f), v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]);
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UUIDTypes } from './types.js';
|
|
2
|
+
export { DNS, URL } from './v35.js';
|
|
3
|
+
declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string;
|
|
4
|
+
declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf: Uint8Array, offset?: number): Uint8Array;
|
|
5
|
+
declare namespace v3 {
|
|
6
|
+
var DNS: string;
|
|
7
|
+
var URL: string;
|
|
8
|
+
}
|
|
9
|
+
export default v3;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import md5 from './md5.js';
|
|
2
|
+
import v35, { DNS, URL } from './v35.js';
|
|
3
|
+
export { DNS, URL } from './v35.js';
|
|
4
|
+
function v3(value, namespace, buf, offset) {
|
|
5
|
+
return v35(0x30, md5, value, namespace, buf, offset);
|
|
6
|
+
}
|
|
7
|
+
v3.DNS = DNS;
|
|
8
|
+
v3.URL = URL;
|
|
9
|
+
export default v3;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UUIDTypes } from './types.js';
|
|
2
|
+
export declare function stringToBytes(str: string): Uint8Array;
|
|
3
|
+
export declare const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
|
|
4
|
+
export declare const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
5
|
+
type HashFunction = (bytes: Uint8Array) => Uint8Array;
|
|
6
|
+
export default function v35(version: 0x30 | 0x50, hash: HashFunction, value: string | Uint8Array, namespace: UUIDTypes, buf?: Uint8Array, offset?: number): string | Uint8Array;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import parse from './parse.js';
|
|
2
|
+
import { unsafeStringify } from './stringify.js';
|
|
3
|
+
export function stringToBytes(str) {
|
|
4
|
+
str = unescape(encodeURIComponent(str));
|
|
5
|
+
const bytes = new Uint8Array(str.length);
|
|
6
|
+
for (let i = 0; i < str.length; ++i) {
|
|
7
|
+
bytes[i] = str.charCodeAt(i);
|
|
8
|
+
}
|
|
9
|
+
return bytes;
|
|
10
|
+
}
|
|
11
|
+
export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
|
12
|
+
export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
|
|
13
|
+
export default function v35(version, hash, value, namespace, buf, offset) {
|
|
14
|
+
const valueBytes = typeof value === 'string' ? stringToBytes(value) : value;
|
|
15
|
+
const namespaceBytes = typeof namespace === 'string' ? parse(namespace) : namespace;
|
|
16
|
+
if (typeof namespace === 'string') {
|
|
17
|
+
namespace = parse(namespace);
|
|
18
|
+
}
|
|
19
|
+
if (namespace?.length !== 16) {
|
|
20
|
+
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
|
|
21
|
+
}
|
|
22
|
+
let bytes = new Uint8Array(16 + valueBytes.length);
|
|
23
|
+
bytes.set(namespaceBytes);
|
|
24
|
+
bytes.set(valueBytes, namespaceBytes.length);
|
|
25
|
+
bytes = hash(bytes);
|
|
26
|
+
bytes[6] = (bytes[6] & 0x0f) | version;
|
|
27
|
+
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
|
28
|
+
if (buf) {
|
|
29
|
+
offset = offset || 0;
|
|
30
|
+
for (let i = 0; i < 16; ++i) {
|
|
31
|
+
buf[offset + i] = bytes[i];
|
|
32
|
+
}
|
|
33
|
+
return buf;
|
|
34
|
+
}
|
|
35
|
+
return unsafeStringify(bytes);
|
|
36
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import native from './native.js';
|
|
2
|
+
import rng from './rng.js';
|
|
3
|
+
import { unsafeStringify } from './stringify.js';
|
|
4
|
+
function v4(options, buf, offset) {
|
|
5
|
+
if (native.randomUUID && !buf && !options) {
|
|
6
|
+
return native.randomUUID();
|
|
7
|
+
}
|
|
8
|
+
options = options || {};
|
|
9
|
+
const rnds = options.random || (options.rng || rng)();
|
|
10
|
+
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
11
|
+
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
12
|
+
if (buf) {
|
|
13
|
+
offset = offset || 0;
|
|
14
|
+
for (let i = 0; i < 16; ++i) {
|
|
15
|
+
buf[offset + i] = rnds[i];
|
|
16
|
+
}
|
|
17
|
+
return buf;
|
|
18
|
+
}
|
|
19
|
+
return unsafeStringify(rnds);
|
|
20
|
+
}
|
|
21
|
+
export default v4;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UUIDTypes } from './types.js';
|
|
2
|
+
export { DNS, URL } from './v35.js';
|
|
3
|
+
declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string;
|
|
4
|
+
declare function v5(value: string | Uint8Array, namespace: UUIDTypes, buf: Uint8Array, offset?: number): Uint8Array;
|
|
5
|
+
declare namespace v5 {
|
|
6
|
+
var DNS: string;
|
|
7
|
+
var URL: string;
|
|
8
|
+
}
|
|
9
|
+
export default v5;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import sha1 from './sha1.js';
|
|
2
|
+
import v35, { DNS, URL } from './v35.js';
|
|
3
|
+
export { DNS, URL } from './v35.js';
|
|
4
|
+
function v5(value, namespace, buf, offset) {
|
|
5
|
+
return v35(0x50, sha1, value, namespace, buf, offset);
|
|
6
|
+
}
|
|
7
|
+
v5.DNS = DNS;
|
|
8
|
+
v5.URL = URL;
|
|
9
|
+
export default v5;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { unsafeStringify } from './stringify.js';
|
|
2
|
+
import v1 from './v1.js';
|
|
3
|
+
import v1ToV6 from './v1ToV6.js';
|
|
4
|
+
function v6(options, buf, offset) {
|
|
5
|
+
options ??= {};
|
|
6
|
+
offset ??= 0;
|
|
7
|
+
let bytes = v1({ ...options, _v6: true }, new Uint8Array(16));
|
|
8
|
+
bytes = v1ToV6(bytes);
|
|
9
|
+
if (buf) {
|
|
10
|
+
for (let i = 0; i < 16; i++) {
|
|
11
|
+
buf[offset + i] = bytes[i];
|
|
12
|
+
}
|
|
13
|
+
return buf;
|
|
14
|
+
}
|
|
15
|
+
return unsafeStringify(bytes);
|
|
16
|
+
}
|
|
17
|
+
export default v6;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import parse from './parse.js';
|
|
2
|
+
import { unsafeStringify } from './stringify.js';
|
|
3
|
+
export default function v6ToV1(uuid) {
|
|
4
|
+
const v6Bytes = typeof uuid === 'string' ? parse(uuid) : uuid;
|
|
5
|
+
const v1Bytes = _v6ToV1(v6Bytes);
|
|
6
|
+
return typeof uuid === 'string' ? unsafeStringify(v1Bytes) : v1Bytes;
|
|
7
|
+
}
|
|
8
|
+
function _v6ToV1(v6Bytes) {
|
|
9
|
+
return Uint8Array.of(((v6Bytes[3] & 0x0f) << 4) | ((v6Bytes[4] >> 4) & 0x0f), ((v6Bytes[4] & 0x0f) << 4) | ((v6Bytes[5] & 0xf0) >> 4), ((v6Bytes[5] & 0x0f) << 4) | (v6Bytes[6] & 0x0f), v6Bytes[7], ((v6Bytes[1] & 0x0f) << 4) | ((v6Bytes[2] & 0xf0) >> 4), ((v6Bytes[2] & 0x0f) << 4) | ((v6Bytes[3] & 0xf0) >> 4), 0x10 | ((v6Bytes[0] & 0xf0) >> 4), ((v6Bytes[0] & 0x0f) << 4) | ((v6Bytes[1] & 0xf0) >> 4), v6Bytes[8], v6Bytes[9], v6Bytes[10], v6Bytes[11], v6Bytes[12], v6Bytes[13], v6Bytes[14], v6Bytes[15]);
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Version7Options } from './types.js';
|
|
2
|
+
type V7State = {
|
|
3
|
+
msecs?: number;
|
|
4
|
+
seq?: number;
|
|
5
|
+
};
|
|
6
|
+
declare function v7(options?: Version7Options, buf?: undefined, offset?: number): string;
|
|
7
|
+
declare function v7(options: Version7Options | undefined, buf: Uint8Array, offset?: number): Uint8Array;
|
|
8
|
+
export declare function updateV7State(state: V7State, now: number, rnds: Uint8Array): V7State;
|
|
9
|
+
export default v7;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import rng from './rng.js';
|
|
2
|
+
import { unsafeStringify } from './stringify.js';
|
|
3
|
+
const _state = {};
|
|
4
|
+
function v7(options, buf, offset) {
|
|
5
|
+
let bytes;
|
|
6
|
+
if (options) {
|
|
7
|
+
bytes = v7Bytes(options.random ?? options.rng?.() ?? rng(), options.msecs, options.seq, buf, offset);
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
const now = Date.now();
|
|
11
|
+
const rnds = rng();
|
|
12
|
+
updateV7State(_state, now, rnds);
|
|
13
|
+
bytes = v7Bytes(rnds, _state.msecs, _state.seq, buf, offset);
|
|
14
|
+
}
|
|
15
|
+
return buf ? bytes : unsafeStringify(bytes);
|
|
16
|
+
}
|
|
17
|
+
export function updateV7State(state, now, rnds) {
|
|
18
|
+
state.msecs ??= -Infinity;
|
|
19
|
+
state.seq ??= 0;
|
|
20
|
+
if (now > state.msecs) {
|
|
21
|
+
state.seq = (rnds[6] << 23) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];
|
|
22
|
+
state.msecs = now;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
state.seq = (state.seq + 1) | 0;
|
|
26
|
+
if (state.seq === 0) {
|
|
27
|
+
state.msecs++;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return state;
|
|
31
|
+
}
|
|
32
|
+
function v7Bytes(rnds, msecs, seq, buf, offset = 0) {
|
|
33
|
+
if (!buf) {
|
|
34
|
+
buf = new Uint8Array(16);
|
|
35
|
+
offset = 0;
|
|
36
|
+
}
|
|
37
|
+
msecs ??= Date.now();
|
|
38
|
+
seq ??= ((rnds[6] * 0x7f) << 24) | (rnds[7] << 16) | (rnds[8] << 8) | rnds[9];
|
|
39
|
+
buf[offset++] = (msecs / 0x10000000000) & 0xff;
|
|
40
|
+
buf[offset++] = (msecs / 0x100000000) & 0xff;
|
|
41
|
+
buf[offset++] = (msecs / 0x1000000) & 0xff;
|
|
42
|
+
buf[offset++] = (msecs / 0x10000) & 0xff;
|
|
43
|
+
buf[offset++] = (msecs / 0x100) & 0xff;
|
|
44
|
+
buf[offset++] = msecs & 0xff;
|
|
45
|
+
buf[offset++] = 0x70 | ((seq >>> 28) & 0x0f);
|
|
46
|
+
buf[offset++] = (seq >>> 20) & 0xff;
|
|
47
|
+
buf[offset++] = 0x80 | ((seq >>> 14) & 0x3f);
|
|
48
|
+
buf[offset++] = (seq >>> 6) & 0xff;
|
|
49
|
+
buf[offset++] = ((seq << 2) & 0xff) | (rnds[10] & 0x03);
|
|
50
|
+
buf[offset++] = rnds[11];
|
|
51
|
+
buf[offset++] = rnds[12];
|
|
52
|
+
buf[offset++] = rnds[13];
|
|
53
|
+
buf[offset++] = rnds[14];
|
|
54
|
+
buf[offset++] = rnds[15];
|
|
55
|
+
return buf;
|
|
56
|
+
}
|
|
57
|
+
export default v7;
|