@stryke/prisma-trpc-generator 0.11.11 → 0.12.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/README.md +1 -1
- package/dist/generator.cjs +2045 -2139
- package/dist/generator.js +2015 -2109
- package/dist/index.cjs +2045 -2139
- package/dist/index.js +2015 -2109
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -34,9 +34,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
mod
|
|
35
35
|
));
|
|
36
36
|
|
|
37
|
-
// ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.
|
|
37
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.30__@swc+core@1.11.9_@swc+_1a2de6809bc5b79e36a8d4bf1aad64d8/node_modules/tsup/assets/esm_shims.js
|
|
38
38
|
var init_esm_shims = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.
|
|
39
|
+
"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.30__@swc+core@1.11.9_@swc+_1a2de6809bc5b79e36a8d4bf1aad64d8/node_modules/tsup/assets/esm_shims.js"() {
|
|
40
40
|
"use strict";
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -672,1794 +672,81 @@ var require_pluralize = __commonJS({
|
|
|
672
672
|
}
|
|
673
673
|
});
|
|
674
674
|
|
|
675
|
-
// ../../node_modules/.pnpm/
|
|
676
|
-
|
|
677
|
-
"
|
|
678
|
-
|
|
679
|
-
init_esm_shims();
|
|
680
|
-
exports.byteLength = byteLength;
|
|
681
|
-
exports.toByteArray = toByteArray;
|
|
682
|
-
exports.fromByteArray = fromByteArray;
|
|
683
|
-
var lookup = [];
|
|
684
|
-
var revLookup = [];
|
|
685
|
-
var Arr = typeof Uint8Array !== "undefined" ? Uint8Array : Array;
|
|
686
|
-
var code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
687
|
-
for (i = 0, len = code.length; i < len; ++i) {
|
|
688
|
-
lookup[i] = code[i];
|
|
689
|
-
revLookup[code.charCodeAt(i)] = i;
|
|
690
|
-
}
|
|
691
|
-
var i;
|
|
692
|
-
var len;
|
|
693
|
-
revLookup["-".charCodeAt(0)] = 62;
|
|
694
|
-
revLookup["_".charCodeAt(0)] = 63;
|
|
695
|
-
function getLens(b64) {
|
|
696
|
-
var len2 = b64.length;
|
|
697
|
-
if (len2 % 4 > 0) {
|
|
698
|
-
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
699
|
-
}
|
|
700
|
-
var validLen = b64.indexOf("=");
|
|
701
|
-
if (validLen === -1) validLen = len2;
|
|
702
|
-
var placeHoldersLen = validLen === len2 ? 0 : 4 - validLen % 4;
|
|
703
|
-
return [
|
|
704
|
-
validLen,
|
|
705
|
-
placeHoldersLen
|
|
706
|
-
];
|
|
707
|
-
}
|
|
708
|
-
__name(getLens, "getLens");
|
|
709
|
-
function byteLength(b64) {
|
|
710
|
-
var lens = getLens(b64);
|
|
711
|
-
var validLen = lens[0];
|
|
712
|
-
var placeHoldersLen = lens[1];
|
|
713
|
-
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
714
|
-
}
|
|
715
|
-
__name(byteLength, "byteLength");
|
|
716
|
-
function _byteLength(b64, validLen, placeHoldersLen) {
|
|
717
|
-
return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;
|
|
718
|
-
}
|
|
719
|
-
__name(_byteLength, "_byteLength");
|
|
720
|
-
function toByteArray(b64) {
|
|
721
|
-
var tmp;
|
|
722
|
-
var lens = getLens(b64);
|
|
723
|
-
var validLen = lens[0];
|
|
724
|
-
var placeHoldersLen = lens[1];
|
|
725
|
-
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));
|
|
726
|
-
var curByte = 0;
|
|
727
|
-
var len2 = placeHoldersLen > 0 ? validLen - 4 : validLen;
|
|
728
|
-
var i2;
|
|
729
|
-
for (i2 = 0; i2 < len2; i2 += 4) {
|
|
730
|
-
tmp = revLookup[b64.charCodeAt(i2)] << 18 | revLookup[b64.charCodeAt(i2 + 1)] << 12 | revLookup[b64.charCodeAt(i2 + 2)] << 6 | revLookup[b64.charCodeAt(i2 + 3)];
|
|
731
|
-
arr[curByte++] = tmp >> 16 & 255;
|
|
732
|
-
arr[curByte++] = tmp >> 8 & 255;
|
|
733
|
-
arr[curByte++] = tmp & 255;
|
|
734
|
-
}
|
|
735
|
-
if (placeHoldersLen === 2) {
|
|
736
|
-
tmp = revLookup[b64.charCodeAt(i2)] << 2 | revLookup[b64.charCodeAt(i2 + 1)] >> 4;
|
|
737
|
-
arr[curByte++] = tmp & 255;
|
|
738
|
-
}
|
|
739
|
-
if (placeHoldersLen === 1) {
|
|
740
|
-
tmp = revLookup[b64.charCodeAt(i2)] << 10 | revLookup[b64.charCodeAt(i2 + 1)] << 4 | revLookup[b64.charCodeAt(i2 + 2)] >> 2;
|
|
741
|
-
arr[curByte++] = tmp >> 8 & 255;
|
|
742
|
-
arr[curByte++] = tmp & 255;
|
|
743
|
-
}
|
|
744
|
-
return arr;
|
|
745
|
-
}
|
|
746
|
-
__name(toByteArray, "toByteArray");
|
|
747
|
-
function tripletToBase64(num) {
|
|
748
|
-
return lookup[num >> 18 & 63] + lookup[num >> 12 & 63] + lookup[num >> 6 & 63] + lookup[num & 63];
|
|
749
|
-
}
|
|
750
|
-
__name(tripletToBase64, "tripletToBase64");
|
|
751
|
-
function encodeChunk(uint8, start, end) {
|
|
752
|
-
var tmp;
|
|
753
|
-
var output = [];
|
|
754
|
-
for (var i2 = start; i2 < end; i2 += 3) {
|
|
755
|
-
tmp = (uint8[i2] << 16 & 16711680) + (uint8[i2 + 1] << 8 & 65280) + (uint8[i2 + 2] & 255);
|
|
756
|
-
output.push(tripletToBase64(tmp));
|
|
757
|
-
}
|
|
758
|
-
return output.join("");
|
|
759
|
-
}
|
|
760
|
-
__name(encodeChunk, "encodeChunk");
|
|
761
|
-
function fromByteArray(uint8) {
|
|
762
|
-
var tmp;
|
|
763
|
-
var len2 = uint8.length;
|
|
764
|
-
var extraBytes = len2 % 3;
|
|
765
|
-
var parts = [];
|
|
766
|
-
var maxChunkLength = 16383;
|
|
767
|
-
for (var i2 = 0, len22 = len2 - extraBytes; i2 < len22; i2 += maxChunkLength) {
|
|
768
|
-
parts.push(encodeChunk(uint8, i2, i2 + maxChunkLength > len22 ? len22 : i2 + maxChunkLength));
|
|
769
|
-
}
|
|
770
|
-
if (extraBytes === 1) {
|
|
771
|
-
tmp = uint8[len2 - 1];
|
|
772
|
-
parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 63] + "==");
|
|
773
|
-
} else if (extraBytes === 2) {
|
|
774
|
-
tmp = (uint8[len2 - 2] << 8) + uint8[len2 - 1];
|
|
775
|
-
parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 63] + lookup[tmp << 2 & 63] + "=");
|
|
776
|
-
}
|
|
777
|
-
return parts.join("");
|
|
778
|
-
}
|
|
779
|
-
__name(fromByteArray, "fromByteArray");
|
|
675
|
+
// ../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs
|
|
676
|
+
function isPlainObject(value) {
|
|
677
|
+
if (value === null || typeof value !== "object") {
|
|
678
|
+
return false;
|
|
780
679
|
}
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
var require_ieee754 = __commonJS({
|
|
785
|
-
"../../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js"(exports) {
|
|
786
|
-
"use strict";
|
|
787
|
-
init_esm_shims();
|
|
788
|
-
exports.read = function(buffer, offset, isLE, mLen, nBytes) {
|
|
789
|
-
var e, m;
|
|
790
|
-
var eLen = nBytes * 8 - mLen - 1;
|
|
791
|
-
var eMax = (1 << eLen) - 1;
|
|
792
|
-
var eBias = eMax >> 1;
|
|
793
|
-
var nBits = -7;
|
|
794
|
-
var i = isLE ? nBytes - 1 : 0;
|
|
795
|
-
var d = isLE ? -1 : 1;
|
|
796
|
-
var s = buffer[offset + i];
|
|
797
|
-
i += d;
|
|
798
|
-
e = s & (1 << -nBits) - 1;
|
|
799
|
-
s >>= -nBits;
|
|
800
|
-
nBits += eLen;
|
|
801
|
-
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {
|
|
802
|
-
}
|
|
803
|
-
m = e & (1 << -nBits) - 1;
|
|
804
|
-
e >>= -nBits;
|
|
805
|
-
nBits += mLen;
|
|
806
|
-
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {
|
|
807
|
-
}
|
|
808
|
-
if (e === 0) {
|
|
809
|
-
e = 1 - eBias;
|
|
810
|
-
} else if (e === eMax) {
|
|
811
|
-
return m ? NaN : (s ? -1 : 1) * Infinity;
|
|
812
|
-
} else {
|
|
813
|
-
m = m + Math.pow(2, mLen);
|
|
814
|
-
e = e - eBias;
|
|
815
|
-
}
|
|
816
|
-
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
|
|
817
|
-
};
|
|
818
|
-
exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
|
|
819
|
-
var e, m, c;
|
|
820
|
-
var eLen = nBytes * 8 - mLen - 1;
|
|
821
|
-
var eMax = (1 << eLen) - 1;
|
|
822
|
-
var eBias = eMax >> 1;
|
|
823
|
-
var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
|
|
824
|
-
var i = isLE ? 0 : nBytes - 1;
|
|
825
|
-
var d = isLE ? 1 : -1;
|
|
826
|
-
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
|
827
|
-
value = Math.abs(value);
|
|
828
|
-
if (isNaN(value) || value === Infinity) {
|
|
829
|
-
m = isNaN(value) ? 1 : 0;
|
|
830
|
-
e = eMax;
|
|
831
|
-
} else {
|
|
832
|
-
e = Math.floor(Math.log(value) / Math.LN2);
|
|
833
|
-
if (value * (c = Math.pow(2, -e)) < 1) {
|
|
834
|
-
e--;
|
|
835
|
-
c *= 2;
|
|
836
|
-
}
|
|
837
|
-
if (e + eBias >= 1) {
|
|
838
|
-
value += rt / c;
|
|
839
|
-
} else {
|
|
840
|
-
value += rt * Math.pow(2, 1 - eBias);
|
|
841
|
-
}
|
|
842
|
-
if (value * c >= 2) {
|
|
843
|
-
e++;
|
|
844
|
-
c /= 2;
|
|
845
|
-
}
|
|
846
|
-
if (e + eBias >= eMax) {
|
|
847
|
-
m = 0;
|
|
848
|
-
e = eMax;
|
|
849
|
-
} else if (e + eBias >= 1) {
|
|
850
|
-
m = (value * c - 1) * Math.pow(2, mLen);
|
|
851
|
-
e = e + eBias;
|
|
852
|
-
} else {
|
|
853
|
-
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
|
854
|
-
e = 0;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
for (; mLen >= 8; buffer[offset + i] = m & 255, i += d, m /= 256, mLen -= 8) {
|
|
858
|
-
}
|
|
859
|
-
e = e << mLen | m;
|
|
860
|
-
eLen += mLen;
|
|
861
|
-
for (; eLen > 0; buffer[offset + i] = e & 255, i += d, e /= 256, eLen -= 8) {
|
|
862
|
-
}
|
|
863
|
-
buffer[offset + i - d] |= s * 128;
|
|
864
|
-
};
|
|
680
|
+
const prototype = Object.getPrototypeOf(value);
|
|
681
|
+
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
|
|
682
|
+
return false;
|
|
865
683
|
}
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
if (!Buffer3.TYPED_ARRAY_SUPPORT && typeof console !== "undefined" && typeof console.error === "function") {
|
|
883
|
-
console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
|
|
884
|
-
}
|
|
885
|
-
function typedArraySupport() {
|
|
886
|
-
try {
|
|
887
|
-
const arr = new Uint8Array(1);
|
|
888
|
-
const proto = {
|
|
889
|
-
foo: /* @__PURE__ */ __name(function() {
|
|
890
|
-
return 42;
|
|
891
|
-
}, "foo")
|
|
892
|
-
};
|
|
893
|
-
Object.setPrototypeOf(proto, Uint8Array.prototype);
|
|
894
|
-
Object.setPrototypeOf(arr, proto);
|
|
895
|
-
return arr.foo() === 42;
|
|
896
|
-
} catch (e) {
|
|
897
|
-
return false;
|
|
898
|
-
}
|
|
899
|
-
}
|
|
900
|
-
__name(typedArraySupport, "typedArraySupport");
|
|
901
|
-
Object.defineProperty(Buffer3.prototype, "parent", {
|
|
902
|
-
enumerable: true,
|
|
903
|
-
get: /* @__PURE__ */ __name(function() {
|
|
904
|
-
if (!Buffer3.isBuffer(this)) return void 0;
|
|
905
|
-
return this.buffer;
|
|
906
|
-
}, "get")
|
|
907
|
-
});
|
|
908
|
-
Object.defineProperty(Buffer3.prototype, "offset", {
|
|
909
|
-
enumerable: true,
|
|
910
|
-
get: /* @__PURE__ */ __name(function() {
|
|
911
|
-
if (!Buffer3.isBuffer(this)) return void 0;
|
|
912
|
-
return this.byteOffset;
|
|
913
|
-
}, "get")
|
|
914
|
-
});
|
|
915
|
-
function createBuffer(length) {
|
|
916
|
-
if (length > K_MAX_LENGTH) {
|
|
917
|
-
throw new RangeError('The value "' + length + '" is invalid for option "size"');
|
|
918
|
-
}
|
|
919
|
-
const buf = new Uint8Array(length);
|
|
920
|
-
Object.setPrototypeOf(buf, Buffer3.prototype);
|
|
921
|
-
return buf;
|
|
922
|
-
}
|
|
923
|
-
__name(createBuffer, "createBuffer");
|
|
924
|
-
function Buffer3(arg, encodingOrOffset, length) {
|
|
925
|
-
if (typeof arg === "number") {
|
|
926
|
-
if (typeof encodingOrOffset === "string") {
|
|
927
|
-
throw new TypeError('The "string" argument must be of type string. Received type number');
|
|
928
|
-
}
|
|
929
|
-
return allocUnsafe(arg);
|
|
930
|
-
}
|
|
931
|
-
return from(arg, encodingOrOffset, length);
|
|
932
|
-
}
|
|
933
|
-
__name(Buffer3, "Buffer");
|
|
934
|
-
Buffer3.poolSize = 8192;
|
|
935
|
-
function from(value, encodingOrOffset, length) {
|
|
936
|
-
if (typeof value === "string") {
|
|
937
|
-
return fromString(value, encodingOrOffset);
|
|
938
|
-
}
|
|
939
|
-
if (ArrayBuffer.isView(value)) {
|
|
940
|
-
return fromArrayView(value);
|
|
941
|
-
}
|
|
942
|
-
if (value == null) {
|
|
943
|
-
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
|
|
944
|
-
}
|
|
945
|
-
if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
|
|
946
|
-
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
947
|
-
}
|
|
948
|
-
if (typeof SharedArrayBuffer !== "undefined" && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
|
|
949
|
-
return fromArrayBuffer(value, encodingOrOffset, length);
|
|
950
|
-
}
|
|
951
|
-
if (typeof value === "number") {
|
|
952
|
-
throw new TypeError('The "value" argument must not be of type number. Received type number');
|
|
953
|
-
}
|
|
954
|
-
const valueOf = value.valueOf && value.valueOf();
|
|
955
|
-
if (valueOf != null && valueOf !== value) {
|
|
956
|
-
return Buffer3.from(valueOf, encodingOrOffset, length);
|
|
957
|
-
}
|
|
958
|
-
const b = fromObject(value);
|
|
959
|
-
if (b) return b;
|
|
960
|
-
if (typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === "function") {
|
|
961
|
-
return Buffer3.from(value[Symbol.toPrimitive]("string"), encodingOrOffset, length);
|
|
962
|
-
}
|
|
963
|
-
throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value);
|
|
964
|
-
}
|
|
965
|
-
__name(from, "from");
|
|
966
|
-
Buffer3.from = function(value, encodingOrOffset, length) {
|
|
967
|
-
return from(value, encodingOrOffset, length);
|
|
968
|
-
};
|
|
969
|
-
Object.setPrototypeOf(Buffer3.prototype, Uint8Array.prototype);
|
|
970
|
-
Object.setPrototypeOf(Buffer3, Uint8Array);
|
|
971
|
-
function assertSize(size) {
|
|
972
|
-
if (typeof size !== "number") {
|
|
973
|
-
throw new TypeError('"size" argument must be of type number');
|
|
974
|
-
} else if (size < 0) {
|
|
975
|
-
throw new RangeError('The value "' + size + '" is invalid for option "size"');
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
__name(assertSize, "assertSize");
|
|
979
|
-
function alloc(size, fill, encoding) {
|
|
980
|
-
assertSize(size);
|
|
981
|
-
if (size <= 0) {
|
|
982
|
-
return createBuffer(size);
|
|
983
|
-
}
|
|
984
|
-
if (fill !== void 0) {
|
|
985
|
-
return typeof encoding === "string" ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
|
|
986
|
-
}
|
|
987
|
-
return createBuffer(size);
|
|
988
|
-
}
|
|
989
|
-
__name(alloc, "alloc");
|
|
990
|
-
Buffer3.alloc = function(size, fill, encoding) {
|
|
991
|
-
return alloc(size, fill, encoding);
|
|
992
|
-
};
|
|
993
|
-
function allocUnsafe(size) {
|
|
994
|
-
assertSize(size);
|
|
995
|
-
return createBuffer(size < 0 ? 0 : checked(size) | 0);
|
|
684
|
+
if (Symbol.iterator in value) {
|
|
685
|
+
return false;
|
|
686
|
+
}
|
|
687
|
+
if (Symbol.toStringTag in value) {
|
|
688
|
+
return Object.prototype.toString.call(value) === "[object Module]";
|
|
689
|
+
}
|
|
690
|
+
return true;
|
|
691
|
+
}
|
|
692
|
+
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
693
|
+
if (!isPlainObject(defaults)) {
|
|
694
|
+
return _defu(baseObject, {}, namespace, merger);
|
|
695
|
+
}
|
|
696
|
+
const object = Object.assign({}, defaults);
|
|
697
|
+
for (const key in baseObject) {
|
|
698
|
+
if (key === "__proto__" || key === "constructor") {
|
|
699
|
+
continue;
|
|
996
700
|
}
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
};
|
|
1001
|
-
Buffer3.allocUnsafeSlow = function(size) {
|
|
1002
|
-
return allocUnsafe(size);
|
|
1003
|
-
};
|
|
1004
|
-
function fromString(string, encoding) {
|
|
1005
|
-
if (typeof encoding !== "string" || encoding === "") {
|
|
1006
|
-
encoding = "utf8";
|
|
1007
|
-
}
|
|
1008
|
-
if (!Buffer3.isEncoding(encoding)) {
|
|
1009
|
-
throw new TypeError("Unknown encoding: " + encoding);
|
|
1010
|
-
}
|
|
1011
|
-
const length = byteLength(string, encoding) | 0;
|
|
1012
|
-
let buf = createBuffer(length);
|
|
1013
|
-
const actual = buf.write(string, encoding);
|
|
1014
|
-
if (actual !== length) {
|
|
1015
|
-
buf = buf.slice(0, actual);
|
|
1016
|
-
}
|
|
1017
|
-
return buf;
|
|
1018
|
-
}
|
|
1019
|
-
__name(fromString, "fromString");
|
|
1020
|
-
function fromArrayLike(array) {
|
|
1021
|
-
const length = array.length < 0 ? 0 : checked(array.length) | 0;
|
|
1022
|
-
const buf = createBuffer(length);
|
|
1023
|
-
for (let i = 0; i < length; i += 1) {
|
|
1024
|
-
buf[i] = array[i] & 255;
|
|
1025
|
-
}
|
|
1026
|
-
return buf;
|
|
1027
|
-
}
|
|
1028
|
-
__name(fromArrayLike, "fromArrayLike");
|
|
1029
|
-
function fromArrayView(arrayView) {
|
|
1030
|
-
if (isInstance(arrayView, Uint8Array)) {
|
|
1031
|
-
const copy2 = new Uint8Array(arrayView);
|
|
1032
|
-
return fromArrayBuffer(copy2.buffer, copy2.byteOffset, copy2.byteLength);
|
|
1033
|
-
}
|
|
1034
|
-
return fromArrayLike(arrayView);
|
|
1035
|
-
}
|
|
1036
|
-
__name(fromArrayView, "fromArrayView");
|
|
1037
|
-
function fromArrayBuffer(array, byteOffset, length) {
|
|
1038
|
-
if (byteOffset < 0 || array.byteLength < byteOffset) {
|
|
1039
|
-
throw new RangeError('"offset" is outside of buffer bounds');
|
|
1040
|
-
}
|
|
1041
|
-
if (array.byteLength < byteOffset + (length || 0)) {
|
|
1042
|
-
throw new RangeError('"length" is outside of buffer bounds');
|
|
1043
|
-
}
|
|
1044
|
-
let buf;
|
|
1045
|
-
if (byteOffset === void 0 && length === void 0) {
|
|
1046
|
-
buf = new Uint8Array(array);
|
|
1047
|
-
} else if (length === void 0) {
|
|
1048
|
-
buf = new Uint8Array(array, byteOffset);
|
|
1049
|
-
} else {
|
|
1050
|
-
buf = new Uint8Array(array, byteOffset, length);
|
|
1051
|
-
}
|
|
1052
|
-
Object.setPrototypeOf(buf, Buffer3.prototype);
|
|
1053
|
-
return buf;
|
|
1054
|
-
}
|
|
1055
|
-
__name(fromArrayBuffer, "fromArrayBuffer");
|
|
1056
|
-
function fromObject(obj) {
|
|
1057
|
-
if (Buffer3.isBuffer(obj)) {
|
|
1058
|
-
const len = checked(obj.length) | 0;
|
|
1059
|
-
const buf = createBuffer(len);
|
|
1060
|
-
if (buf.length === 0) {
|
|
1061
|
-
return buf;
|
|
1062
|
-
}
|
|
1063
|
-
obj.copy(buf, 0, 0, len);
|
|
1064
|
-
return buf;
|
|
1065
|
-
}
|
|
1066
|
-
if (obj.length !== void 0) {
|
|
1067
|
-
if (typeof obj.length !== "number" || numberIsNaN(obj.length)) {
|
|
1068
|
-
return createBuffer(0);
|
|
1069
|
-
}
|
|
1070
|
-
return fromArrayLike(obj);
|
|
1071
|
-
}
|
|
1072
|
-
if (obj.type === "Buffer" && Array.isArray(obj.data)) {
|
|
1073
|
-
return fromArrayLike(obj.data);
|
|
1074
|
-
}
|
|
1075
|
-
}
|
|
1076
|
-
__name(fromObject, "fromObject");
|
|
1077
|
-
function checked(length) {
|
|
1078
|
-
if (length >= K_MAX_LENGTH) {
|
|
1079
|
-
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + K_MAX_LENGTH.toString(16) + " bytes");
|
|
1080
|
-
}
|
|
1081
|
-
return length | 0;
|
|
1082
|
-
}
|
|
1083
|
-
__name(checked, "checked");
|
|
1084
|
-
function SlowBuffer(length) {
|
|
1085
|
-
if (+length != length) {
|
|
1086
|
-
length = 0;
|
|
1087
|
-
}
|
|
1088
|
-
return Buffer3.alloc(+length);
|
|
1089
|
-
}
|
|
1090
|
-
__name(SlowBuffer, "SlowBuffer");
|
|
1091
|
-
Buffer3.isBuffer = /* @__PURE__ */ __name(function isBuffer(b) {
|
|
1092
|
-
return b != null && b._isBuffer === true && b !== Buffer3.prototype;
|
|
1093
|
-
}, "isBuffer");
|
|
1094
|
-
Buffer3.compare = /* @__PURE__ */ __name(function compare(a, b) {
|
|
1095
|
-
if (isInstance(a, Uint8Array)) a = Buffer3.from(a, a.offset, a.byteLength);
|
|
1096
|
-
if (isInstance(b, Uint8Array)) b = Buffer3.from(b, b.offset, b.byteLength);
|
|
1097
|
-
if (!Buffer3.isBuffer(a) || !Buffer3.isBuffer(b)) {
|
|
1098
|
-
throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
|
|
1099
|
-
}
|
|
1100
|
-
if (a === b) return 0;
|
|
1101
|
-
let x = a.length;
|
|
1102
|
-
let y = b.length;
|
|
1103
|
-
for (let i = 0, len = Math.min(x, y); i < len; ++i) {
|
|
1104
|
-
if (a[i] !== b[i]) {
|
|
1105
|
-
x = a[i];
|
|
1106
|
-
y = b[i];
|
|
1107
|
-
break;
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
if (x < y) return -1;
|
|
1111
|
-
if (y < x) return 1;
|
|
1112
|
-
return 0;
|
|
1113
|
-
}, "compare");
|
|
1114
|
-
Buffer3.isEncoding = /* @__PURE__ */ __name(function isEncoding(encoding) {
|
|
1115
|
-
switch (String(encoding).toLowerCase()) {
|
|
1116
|
-
case "hex":
|
|
1117
|
-
case "utf8":
|
|
1118
|
-
case "utf-8":
|
|
1119
|
-
case "ascii":
|
|
1120
|
-
case "latin1":
|
|
1121
|
-
case "binary":
|
|
1122
|
-
case "base64":
|
|
1123
|
-
case "ucs2":
|
|
1124
|
-
case "ucs-2":
|
|
1125
|
-
case "utf16le":
|
|
1126
|
-
case "utf-16le":
|
|
1127
|
-
return true;
|
|
1128
|
-
default:
|
|
1129
|
-
return false;
|
|
1130
|
-
}
|
|
1131
|
-
}, "isEncoding");
|
|
1132
|
-
Buffer3.concat = /* @__PURE__ */ __name(function concat(list, length) {
|
|
1133
|
-
if (!Array.isArray(list)) {
|
|
1134
|
-
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
1135
|
-
}
|
|
1136
|
-
if (list.length === 0) {
|
|
1137
|
-
return Buffer3.alloc(0);
|
|
1138
|
-
}
|
|
1139
|
-
let i;
|
|
1140
|
-
if (length === void 0) {
|
|
1141
|
-
length = 0;
|
|
1142
|
-
for (i = 0; i < list.length; ++i) {
|
|
1143
|
-
length += list[i].length;
|
|
1144
|
-
}
|
|
1145
|
-
}
|
|
1146
|
-
const buffer = Buffer3.allocUnsafe(length);
|
|
1147
|
-
let pos = 0;
|
|
1148
|
-
for (i = 0; i < list.length; ++i) {
|
|
1149
|
-
let buf = list[i];
|
|
1150
|
-
if (isInstance(buf, Uint8Array)) {
|
|
1151
|
-
if (pos + buf.length > buffer.length) {
|
|
1152
|
-
if (!Buffer3.isBuffer(buf)) buf = Buffer3.from(buf);
|
|
1153
|
-
buf.copy(buffer, pos);
|
|
1154
|
-
} else {
|
|
1155
|
-
Uint8Array.prototype.set.call(buffer, buf, pos);
|
|
1156
|
-
}
|
|
1157
|
-
} else if (!Buffer3.isBuffer(buf)) {
|
|
1158
|
-
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
1159
|
-
} else {
|
|
1160
|
-
buf.copy(buffer, pos);
|
|
1161
|
-
}
|
|
1162
|
-
pos += buf.length;
|
|
1163
|
-
}
|
|
1164
|
-
return buffer;
|
|
1165
|
-
}, "concat");
|
|
1166
|
-
function byteLength(string, encoding) {
|
|
1167
|
-
if (Buffer3.isBuffer(string)) {
|
|
1168
|
-
return string.length;
|
|
1169
|
-
}
|
|
1170
|
-
if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
|
|
1171
|
-
return string.byteLength;
|
|
1172
|
-
}
|
|
1173
|
-
if (typeof string !== "string") {
|
|
1174
|
-
throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof string);
|
|
1175
|
-
}
|
|
1176
|
-
const len = string.length;
|
|
1177
|
-
const mustMatch = arguments.length > 2 && arguments[2] === true;
|
|
1178
|
-
if (!mustMatch && len === 0) return 0;
|
|
1179
|
-
let loweredCase = false;
|
|
1180
|
-
for (; ; ) {
|
|
1181
|
-
switch (encoding) {
|
|
1182
|
-
case "ascii":
|
|
1183
|
-
case "latin1":
|
|
1184
|
-
case "binary":
|
|
1185
|
-
return len;
|
|
1186
|
-
case "utf8":
|
|
1187
|
-
case "utf-8":
|
|
1188
|
-
return utf8ToBytes(string).length;
|
|
1189
|
-
case "ucs2":
|
|
1190
|
-
case "ucs-2":
|
|
1191
|
-
case "utf16le":
|
|
1192
|
-
case "utf-16le":
|
|
1193
|
-
return len * 2;
|
|
1194
|
-
case "hex":
|
|
1195
|
-
return len >>> 1;
|
|
1196
|
-
case "base64":
|
|
1197
|
-
return base64ToBytes(string).length;
|
|
1198
|
-
default:
|
|
1199
|
-
if (loweredCase) {
|
|
1200
|
-
return mustMatch ? -1 : utf8ToBytes(string).length;
|
|
1201
|
-
}
|
|
1202
|
-
encoding = ("" + encoding).toLowerCase();
|
|
1203
|
-
loweredCase = true;
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
701
|
+
const value = baseObject[key];
|
|
702
|
+
if (value === null || value === void 0) {
|
|
703
|
+
continue;
|
|
1206
704
|
}
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
function slowToString(encoding, start, end) {
|
|
1210
|
-
let loweredCase = false;
|
|
1211
|
-
if (start === void 0 || start < 0) {
|
|
1212
|
-
start = 0;
|
|
1213
|
-
}
|
|
1214
|
-
if (start > this.length) {
|
|
1215
|
-
return "";
|
|
1216
|
-
}
|
|
1217
|
-
if (end === void 0 || end > this.length) {
|
|
1218
|
-
end = this.length;
|
|
1219
|
-
}
|
|
1220
|
-
if (end <= 0) {
|
|
1221
|
-
return "";
|
|
1222
|
-
}
|
|
1223
|
-
end >>>= 0;
|
|
1224
|
-
start >>>= 0;
|
|
1225
|
-
if (end <= start) {
|
|
1226
|
-
return "";
|
|
1227
|
-
}
|
|
1228
|
-
if (!encoding) encoding = "utf8";
|
|
1229
|
-
while (true) {
|
|
1230
|
-
switch (encoding) {
|
|
1231
|
-
case "hex":
|
|
1232
|
-
return hexSlice(this, start, end);
|
|
1233
|
-
case "utf8":
|
|
1234
|
-
case "utf-8":
|
|
1235
|
-
return utf8Slice(this, start, end);
|
|
1236
|
-
case "ascii":
|
|
1237
|
-
return asciiSlice(this, start, end);
|
|
1238
|
-
case "latin1":
|
|
1239
|
-
case "binary":
|
|
1240
|
-
return latin1Slice(this, start, end);
|
|
1241
|
-
case "base64":
|
|
1242
|
-
return base64Slice(this, start, end);
|
|
1243
|
-
case "ucs2":
|
|
1244
|
-
case "ucs-2":
|
|
1245
|
-
case "utf16le":
|
|
1246
|
-
case "utf-16le":
|
|
1247
|
-
return utf16leSlice(this, start, end);
|
|
1248
|
-
default:
|
|
1249
|
-
if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
|
|
1250
|
-
encoding = (encoding + "").toLowerCase();
|
|
1251
|
-
loweredCase = true;
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
705
|
+
if (merger && merger(object, key, value, namespace)) {
|
|
706
|
+
continue;
|
|
1254
707
|
}
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
1267
|
-
}
|
|
1268
|
-
for (let i = 0; i < len; i += 2) {
|
|
1269
|
-
swap(this, i, i + 1);
|
|
1270
|
-
}
|
|
1271
|
-
return this;
|
|
1272
|
-
}, "swap16");
|
|
1273
|
-
Buffer3.prototype.swap32 = /* @__PURE__ */ __name(function swap32() {
|
|
1274
|
-
const len = this.length;
|
|
1275
|
-
if (len % 4 !== 0) {
|
|
1276
|
-
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
1277
|
-
}
|
|
1278
|
-
for (let i = 0; i < len; i += 4) {
|
|
1279
|
-
swap(this, i, i + 3);
|
|
1280
|
-
swap(this, i + 1, i + 2);
|
|
1281
|
-
}
|
|
1282
|
-
return this;
|
|
1283
|
-
}, "swap32");
|
|
1284
|
-
Buffer3.prototype.swap64 = /* @__PURE__ */ __name(function swap64() {
|
|
1285
|
-
const len = this.length;
|
|
1286
|
-
if (len % 8 !== 0) {
|
|
1287
|
-
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
1288
|
-
}
|
|
1289
|
-
for (let i = 0; i < len; i += 8) {
|
|
1290
|
-
swap(this, i, i + 7);
|
|
1291
|
-
swap(this, i + 1, i + 6);
|
|
1292
|
-
swap(this, i + 2, i + 5);
|
|
1293
|
-
swap(this, i + 3, i + 4);
|
|
1294
|
-
}
|
|
1295
|
-
return this;
|
|
1296
|
-
}, "swap64");
|
|
1297
|
-
Buffer3.prototype.toString = /* @__PURE__ */ __name(function toString() {
|
|
1298
|
-
const length = this.length;
|
|
1299
|
-
if (length === 0) return "";
|
|
1300
|
-
if (arguments.length === 0) return utf8Slice(this, 0, length);
|
|
1301
|
-
return slowToString.apply(this, arguments);
|
|
1302
|
-
}, "toString");
|
|
1303
|
-
Buffer3.prototype.toLocaleString = Buffer3.prototype.toString;
|
|
1304
|
-
Buffer3.prototype.equals = /* @__PURE__ */ __name(function equals(b) {
|
|
1305
|
-
if (!Buffer3.isBuffer(b)) throw new TypeError("Argument must be a Buffer");
|
|
1306
|
-
if (this === b) return true;
|
|
1307
|
-
return Buffer3.compare(this, b) === 0;
|
|
1308
|
-
}, "equals");
|
|
1309
|
-
Buffer3.prototype.inspect = /* @__PURE__ */ __name(function inspect() {
|
|
1310
|
-
let str = "";
|
|
1311
|
-
const max = exports.INSPECT_MAX_BYTES;
|
|
1312
|
-
str = this.toString("hex", 0, max).replace(/(.{2})/g, "$1 ").trim();
|
|
1313
|
-
if (this.length > max) str += " ... ";
|
|
1314
|
-
return "<Buffer " + str + ">";
|
|
1315
|
-
}, "inspect");
|
|
1316
|
-
if (customInspectSymbol) {
|
|
1317
|
-
Buffer3.prototype[customInspectSymbol] = Buffer3.prototype.inspect;
|
|
1318
|
-
}
|
|
1319
|
-
Buffer3.prototype.compare = /* @__PURE__ */ __name(function compare(target, start, end, thisStart, thisEnd) {
|
|
1320
|
-
if (isInstance(target, Uint8Array)) {
|
|
1321
|
-
target = Buffer3.from(target, target.offset, target.byteLength);
|
|
1322
|
-
}
|
|
1323
|
-
if (!Buffer3.isBuffer(target)) {
|
|
1324
|
-
throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof target);
|
|
1325
|
-
}
|
|
1326
|
-
if (start === void 0) {
|
|
1327
|
-
start = 0;
|
|
1328
|
-
}
|
|
1329
|
-
if (end === void 0) {
|
|
1330
|
-
end = target ? target.length : 0;
|
|
1331
|
-
}
|
|
1332
|
-
if (thisStart === void 0) {
|
|
1333
|
-
thisStart = 0;
|
|
1334
|
-
}
|
|
1335
|
-
if (thisEnd === void 0) {
|
|
1336
|
-
thisEnd = this.length;
|
|
1337
|
-
}
|
|
1338
|
-
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
|
|
1339
|
-
throw new RangeError("out of range index");
|
|
1340
|
-
}
|
|
1341
|
-
if (thisStart >= thisEnd && start >= end) {
|
|
1342
|
-
return 0;
|
|
1343
|
-
}
|
|
1344
|
-
if (thisStart >= thisEnd) {
|
|
1345
|
-
return -1;
|
|
1346
|
-
}
|
|
1347
|
-
if (start >= end) {
|
|
1348
|
-
return 1;
|
|
1349
|
-
}
|
|
1350
|
-
start >>>= 0;
|
|
1351
|
-
end >>>= 0;
|
|
1352
|
-
thisStart >>>= 0;
|
|
1353
|
-
thisEnd >>>= 0;
|
|
1354
|
-
if (this === target) return 0;
|
|
1355
|
-
let x = thisEnd - thisStart;
|
|
1356
|
-
let y = end - start;
|
|
1357
|
-
const len = Math.min(x, y);
|
|
1358
|
-
const thisCopy = this.slice(thisStart, thisEnd);
|
|
1359
|
-
const targetCopy = target.slice(start, end);
|
|
1360
|
-
for (let i = 0; i < len; ++i) {
|
|
1361
|
-
if (thisCopy[i] !== targetCopy[i]) {
|
|
1362
|
-
x = thisCopy[i];
|
|
1363
|
-
y = targetCopy[i];
|
|
1364
|
-
break;
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
if (x < y) return -1;
|
|
1368
|
-
if (y < x) return 1;
|
|
1369
|
-
return 0;
|
|
1370
|
-
}, "compare");
|
|
1371
|
-
function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
|
|
1372
|
-
if (buffer.length === 0) return -1;
|
|
1373
|
-
if (typeof byteOffset === "string") {
|
|
1374
|
-
encoding = byteOffset;
|
|
1375
|
-
byteOffset = 0;
|
|
1376
|
-
} else if (byteOffset > 2147483647) {
|
|
1377
|
-
byteOffset = 2147483647;
|
|
1378
|
-
} else if (byteOffset < -2147483648) {
|
|
1379
|
-
byteOffset = -2147483648;
|
|
1380
|
-
}
|
|
1381
|
-
byteOffset = +byteOffset;
|
|
1382
|
-
if (numberIsNaN(byteOffset)) {
|
|
1383
|
-
byteOffset = dir ? 0 : buffer.length - 1;
|
|
1384
|
-
}
|
|
1385
|
-
if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
|
|
1386
|
-
if (byteOffset >= buffer.length) {
|
|
1387
|
-
if (dir) return -1;
|
|
1388
|
-
else byteOffset = buffer.length - 1;
|
|
1389
|
-
} else if (byteOffset < 0) {
|
|
1390
|
-
if (dir) byteOffset = 0;
|
|
1391
|
-
else return -1;
|
|
1392
|
-
}
|
|
1393
|
-
if (typeof val === "string") {
|
|
1394
|
-
val = Buffer3.from(val, encoding);
|
|
1395
|
-
}
|
|
1396
|
-
if (Buffer3.isBuffer(val)) {
|
|
1397
|
-
if (val.length === 0) {
|
|
1398
|
-
return -1;
|
|
1399
|
-
}
|
|
1400
|
-
return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
|
|
1401
|
-
} else if (typeof val === "number") {
|
|
1402
|
-
val = val & 255;
|
|
1403
|
-
if (typeof Uint8Array.prototype.indexOf === "function") {
|
|
1404
|
-
if (dir) {
|
|
1405
|
-
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
|
|
1406
|
-
} else {
|
|
1407
|
-
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
return arrayIndexOf(buffer, [
|
|
1411
|
-
val
|
|
1412
|
-
], byteOffset, encoding, dir);
|
|
1413
|
-
}
|
|
1414
|
-
throw new TypeError("val must be string, number or Buffer");
|
|
1415
|
-
}
|
|
1416
|
-
__name(bidirectionalIndexOf, "bidirectionalIndexOf");
|
|
1417
|
-
function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
|
|
1418
|
-
let indexSize = 1;
|
|
1419
|
-
let arrLength = arr.length;
|
|
1420
|
-
let valLength = val.length;
|
|
1421
|
-
if (encoding !== void 0) {
|
|
1422
|
-
encoding = String(encoding).toLowerCase();
|
|
1423
|
-
if (encoding === "ucs2" || encoding === "ucs-2" || encoding === "utf16le" || encoding === "utf-16le") {
|
|
1424
|
-
if (arr.length < 2 || val.length < 2) {
|
|
1425
|
-
return -1;
|
|
1426
|
-
}
|
|
1427
|
-
indexSize = 2;
|
|
1428
|
-
arrLength /= 2;
|
|
1429
|
-
valLength /= 2;
|
|
1430
|
-
byteOffset /= 2;
|
|
1431
|
-
}
|
|
1432
|
-
}
|
|
1433
|
-
function read(buf, i2) {
|
|
1434
|
-
if (indexSize === 1) {
|
|
1435
|
-
return buf[i2];
|
|
1436
|
-
} else {
|
|
1437
|
-
return buf.readUInt16BE(i2 * indexSize);
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
__name(read, "read");
|
|
1441
|
-
let i;
|
|
1442
|
-
if (dir) {
|
|
1443
|
-
let foundIndex = -1;
|
|
1444
|
-
for (i = byteOffset; i < arrLength; i++) {
|
|
1445
|
-
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
|
|
1446
|
-
if (foundIndex === -1) foundIndex = i;
|
|
1447
|
-
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
|
|
1448
|
-
} else {
|
|
1449
|
-
if (foundIndex !== -1) i -= i - foundIndex;
|
|
1450
|
-
foundIndex = -1;
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
} else {
|
|
1454
|
-
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
|
|
1455
|
-
for (i = byteOffset; i >= 0; i--) {
|
|
1456
|
-
let found = true;
|
|
1457
|
-
for (let j = 0; j < valLength; j++) {
|
|
1458
|
-
if (read(arr, i + j) !== read(val, j)) {
|
|
1459
|
-
found = false;
|
|
1460
|
-
break;
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
if (found) return i;
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
return -1;
|
|
1467
|
-
}
|
|
1468
|
-
__name(arrayIndexOf, "arrayIndexOf");
|
|
1469
|
-
Buffer3.prototype.includes = /* @__PURE__ */ __name(function includes2(val, byteOffset, encoding) {
|
|
1470
|
-
return this.indexOf(val, byteOffset, encoding) !== -1;
|
|
1471
|
-
}, "includes");
|
|
1472
|
-
Buffer3.prototype.indexOf = /* @__PURE__ */ __name(function indexOf(val, byteOffset, encoding) {
|
|
1473
|
-
return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
|
|
1474
|
-
}, "indexOf");
|
|
1475
|
-
Buffer3.prototype.lastIndexOf = /* @__PURE__ */ __name(function lastIndexOf(val, byteOffset, encoding) {
|
|
1476
|
-
return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
|
|
1477
|
-
}, "lastIndexOf");
|
|
1478
|
-
function hexWrite(buf, string, offset, length) {
|
|
1479
|
-
offset = Number(offset) || 0;
|
|
1480
|
-
const remaining = buf.length - offset;
|
|
1481
|
-
if (!length) {
|
|
1482
|
-
length = remaining;
|
|
1483
|
-
} else {
|
|
1484
|
-
length = Number(length);
|
|
1485
|
-
if (length > remaining) {
|
|
1486
|
-
length = remaining;
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
const strLen = string.length;
|
|
1490
|
-
if (length > strLen / 2) {
|
|
1491
|
-
length = strLen / 2;
|
|
1492
|
-
}
|
|
1493
|
-
let i;
|
|
1494
|
-
for (i = 0; i < length; ++i) {
|
|
1495
|
-
const parsed = parseInt(string.substr(i * 2, 2), 16);
|
|
1496
|
-
if (numberIsNaN(parsed)) return i;
|
|
1497
|
-
buf[offset + i] = parsed;
|
|
1498
|
-
}
|
|
1499
|
-
return i;
|
|
1500
|
-
}
|
|
1501
|
-
__name(hexWrite, "hexWrite");
|
|
1502
|
-
function utf8Write(buf, string, offset, length) {
|
|
1503
|
-
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
|
|
1504
|
-
}
|
|
1505
|
-
__name(utf8Write, "utf8Write");
|
|
1506
|
-
function asciiWrite(buf, string, offset, length) {
|
|
1507
|
-
return blitBuffer(asciiToBytes(string), buf, offset, length);
|
|
1508
|
-
}
|
|
1509
|
-
__name(asciiWrite, "asciiWrite");
|
|
1510
|
-
function base64Write(buf, string, offset, length) {
|
|
1511
|
-
return blitBuffer(base64ToBytes(string), buf, offset, length);
|
|
1512
|
-
}
|
|
1513
|
-
__name(base64Write, "base64Write");
|
|
1514
|
-
function ucs2Write(buf, string, offset, length) {
|
|
1515
|
-
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
|
|
1516
|
-
}
|
|
1517
|
-
__name(ucs2Write, "ucs2Write");
|
|
1518
|
-
Buffer3.prototype.write = /* @__PURE__ */ __name(function write(string, offset, length, encoding) {
|
|
1519
|
-
if (offset === void 0) {
|
|
1520
|
-
encoding = "utf8";
|
|
1521
|
-
length = this.length;
|
|
1522
|
-
offset = 0;
|
|
1523
|
-
} else if (length === void 0 && typeof offset === "string") {
|
|
1524
|
-
encoding = offset;
|
|
1525
|
-
length = this.length;
|
|
1526
|
-
offset = 0;
|
|
1527
|
-
} else if (isFinite(offset)) {
|
|
1528
|
-
offset = offset >>> 0;
|
|
1529
|
-
if (isFinite(length)) {
|
|
1530
|
-
length = length >>> 0;
|
|
1531
|
-
if (encoding === void 0) encoding = "utf8";
|
|
1532
|
-
} else {
|
|
1533
|
-
encoding = length;
|
|
1534
|
-
length = void 0;
|
|
1535
|
-
}
|
|
1536
|
-
} else {
|
|
1537
|
-
throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
|
|
1538
|
-
}
|
|
1539
|
-
const remaining = this.length - offset;
|
|
1540
|
-
if (length === void 0 || length > remaining) length = remaining;
|
|
1541
|
-
if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
|
|
1542
|
-
throw new RangeError("Attempt to write outside buffer bounds");
|
|
1543
|
-
}
|
|
1544
|
-
if (!encoding) encoding = "utf8";
|
|
1545
|
-
let loweredCase = false;
|
|
1546
|
-
for (; ; ) {
|
|
1547
|
-
switch (encoding) {
|
|
1548
|
-
case "hex":
|
|
1549
|
-
return hexWrite(this, string, offset, length);
|
|
1550
|
-
case "utf8":
|
|
1551
|
-
case "utf-8":
|
|
1552
|
-
return utf8Write(this, string, offset, length);
|
|
1553
|
-
case "ascii":
|
|
1554
|
-
case "latin1":
|
|
1555
|
-
case "binary":
|
|
1556
|
-
return asciiWrite(this, string, offset, length);
|
|
1557
|
-
case "base64":
|
|
1558
|
-
return base64Write(this, string, offset, length);
|
|
1559
|
-
case "ucs2":
|
|
1560
|
-
case "ucs-2":
|
|
1561
|
-
case "utf16le":
|
|
1562
|
-
case "utf-16le":
|
|
1563
|
-
return ucs2Write(this, string, offset, length);
|
|
1564
|
-
default:
|
|
1565
|
-
if (loweredCase) throw new TypeError("Unknown encoding: " + encoding);
|
|
1566
|
-
encoding = ("" + encoding).toLowerCase();
|
|
1567
|
-
loweredCase = true;
|
|
1568
|
-
}
|
|
1569
|
-
}
|
|
1570
|
-
}, "write");
|
|
1571
|
-
Buffer3.prototype.toJSON = /* @__PURE__ */ __name(function toJSON() {
|
|
1572
|
-
return {
|
|
1573
|
-
type: "Buffer",
|
|
1574
|
-
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
1575
|
-
};
|
|
1576
|
-
}, "toJSON");
|
|
1577
|
-
function base64Slice(buf, start, end) {
|
|
1578
|
-
if (start === 0 && end === buf.length) {
|
|
1579
|
-
return base64.fromByteArray(buf);
|
|
1580
|
-
} else {
|
|
1581
|
-
return base64.fromByteArray(buf.slice(start, end));
|
|
1582
|
-
}
|
|
1583
|
-
}
|
|
1584
|
-
__name(base64Slice, "base64Slice");
|
|
1585
|
-
function utf8Slice(buf, start, end) {
|
|
1586
|
-
end = Math.min(buf.length, end);
|
|
1587
|
-
const res = [];
|
|
1588
|
-
let i = start;
|
|
1589
|
-
while (i < end) {
|
|
1590
|
-
const firstByte = buf[i];
|
|
1591
|
-
let codePoint = null;
|
|
1592
|
-
let bytesPerSequence = firstByte > 239 ? 4 : firstByte > 223 ? 3 : firstByte > 191 ? 2 : 1;
|
|
1593
|
-
if (i + bytesPerSequence <= end) {
|
|
1594
|
-
let secondByte, thirdByte, fourthByte, tempCodePoint;
|
|
1595
|
-
switch (bytesPerSequence) {
|
|
1596
|
-
case 1:
|
|
1597
|
-
if (firstByte < 128) {
|
|
1598
|
-
codePoint = firstByte;
|
|
1599
|
-
}
|
|
1600
|
-
break;
|
|
1601
|
-
case 2:
|
|
1602
|
-
secondByte = buf[i + 1];
|
|
1603
|
-
if ((secondByte & 192) === 128) {
|
|
1604
|
-
tempCodePoint = (firstByte & 31) << 6 | secondByte & 63;
|
|
1605
|
-
if (tempCodePoint > 127) {
|
|
1606
|
-
codePoint = tempCodePoint;
|
|
1607
|
-
}
|
|
1608
|
-
}
|
|
1609
|
-
break;
|
|
1610
|
-
case 3:
|
|
1611
|
-
secondByte = buf[i + 1];
|
|
1612
|
-
thirdByte = buf[i + 2];
|
|
1613
|
-
if ((secondByte & 192) === 128 && (thirdByte & 192) === 128) {
|
|
1614
|
-
tempCodePoint = (firstByte & 15) << 12 | (secondByte & 63) << 6 | thirdByte & 63;
|
|
1615
|
-
if (tempCodePoint > 2047 && (tempCodePoint < 55296 || tempCodePoint > 57343)) {
|
|
1616
|
-
codePoint = tempCodePoint;
|
|
1617
|
-
}
|
|
1618
|
-
}
|
|
1619
|
-
break;
|
|
1620
|
-
case 4:
|
|
1621
|
-
secondByte = buf[i + 1];
|
|
1622
|
-
thirdByte = buf[i + 2];
|
|
1623
|
-
fourthByte = buf[i + 3];
|
|
1624
|
-
if ((secondByte & 192) === 128 && (thirdByte & 192) === 128 && (fourthByte & 192) === 128) {
|
|
1625
|
-
tempCodePoint = (firstByte & 15) << 18 | (secondByte & 63) << 12 | (thirdByte & 63) << 6 | fourthByte & 63;
|
|
1626
|
-
if (tempCodePoint > 65535 && tempCodePoint < 1114112) {
|
|
1627
|
-
codePoint = tempCodePoint;
|
|
1628
|
-
}
|
|
1629
|
-
}
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
if (codePoint === null) {
|
|
1633
|
-
codePoint = 65533;
|
|
1634
|
-
bytesPerSequence = 1;
|
|
1635
|
-
} else if (codePoint > 65535) {
|
|
1636
|
-
codePoint -= 65536;
|
|
1637
|
-
res.push(codePoint >>> 10 & 1023 | 55296);
|
|
1638
|
-
codePoint = 56320 | codePoint & 1023;
|
|
1639
|
-
}
|
|
1640
|
-
res.push(codePoint);
|
|
1641
|
-
i += bytesPerSequence;
|
|
1642
|
-
}
|
|
1643
|
-
return decodeCodePointsArray(res);
|
|
1644
|
-
}
|
|
1645
|
-
__name(utf8Slice, "utf8Slice");
|
|
1646
|
-
var MAX_ARGUMENTS_LENGTH = 4096;
|
|
1647
|
-
function decodeCodePointsArray(codePoints) {
|
|
1648
|
-
const len = codePoints.length;
|
|
1649
|
-
if (len <= MAX_ARGUMENTS_LENGTH) {
|
|
1650
|
-
return String.fromCharCode.apply(String, codePoints);
|
|
1651
|
-
}
|
|
1652
|
-
let res = "";
|
|
1653
|
-
let i = 0;
|
|
1654
|
-
while (i < len) {
|
|
1655
|
-
res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
|
|
1656
|
-
}
|
|
1657
|
-
return res;
|
|
1658
|
-
}
|
|
1659
|
-
__name(decodeCodePointsArray, "decodeCodePointsArray");
|
|
1660
|
-
function asciiSlice(buf, start, end) {
|
|
1661
|
-
let ret = "";
|
|
1662
|
-
end = Math.min(buf.length, end);
|
|
1663
|
-
for (let i = start; i < end; ++i) {
|
|
1664
|
-
ret += String.fromCharCode(buf[i] & 127);
|
|
1665
|
-
}
|
|
1666
|
-
return ret;
|
|
1667
|
-
}
|
|
1668
|
-
__name(asciiSlice, "asciiSlice");
|
|
1669
|
-
function latin1Slice(buf, start, end) {
|
|
1670
|
-
let ret = "";
|
|
1671
|
-
end = Math.min(buf.length, end);
|
|
1672
|
-
for (let i = start; i < end; ++i) {
|
|
1673
|
-
ret += String.fromCharCode(buf[i]);
|
|
1674
|
-
}
|
|
1675
|
-
return ret;
|
|
1676
|
-
}
|
|
1677
|
-
__name(latin1Slice, "latin1Slice");
|
|
1678
|
-
function hexSlice(buf, start, end) {
|
|
1679
|
-
const len = buf.length;
|
|
1680
|
-
if (!start || start < 0) start = 0;
|
|
1681
|
-
if (!end || end < 0 || end > len) end = len;
|
|
1682
|
-
let out = "";
|
|
1683
|
-
for (let i = start; i < end; ++i) {
|
|
1684
|
-
out += hexSliceLookupTable[buf[i]];
|
|
1685
|
-
}
|
|
1686
|
-
return out;
|
|
1687
|
-
}
|
|
1688
|
-
__name(hexSlice, "hexSlice");
|
|
1689
|
-
function utf16leSlice(buf, start, end) {
|
|
1690
|
-
const bytes = buf.slice(start, end);
|
|
1691
|
-
let res = "";
|
|
1692
|
-
for (let i = 0; i < bytes.length - 1; i += 2) {
|
|
1693
|
-
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
|
|
1694
|
-
}
|
|
1695
|
-
return res;
|
|
1696
|
-
}
|
|
1697
|
-
__name(utf16leSlice, "utf16leSlice");
|
|
1698
|
-
Buffer3.prototype.slice = /* @__PURE__ */ __name(function slice(start, end) {
|
|
1699
|
-
const len = this.length;
|
|
1700
|
-
start = ~~start;
|
|
1701
|
-
end = end === void 0 ? len : ~~end;
|
|
1702
|
-
if (start < 0) {
|
|
1703
|
-
start += len;
|
|
1704
|
-
if (start < 0) start = 0;
|
|
1705
|
-
} else if (start > len) {
|
|
1706
|
-
start = len;
|
|
1707
|
-
}
|
|
1708
|
-
if (end < 0) {
|
|
1709
|
-
end += len;
|
|
1710
|
-
if (end < 0) end = 0;
|
|
1711
|
-
} else if (end > len) {
|
|
1712
|
-
end = len;
|
|
1713
|
-
}
|
|
1714
|
-
if (end < start) end = start;
|
|
1715
|
-
const newBuf = this.subarray(start, end);
|
|
1716
|
-
Object.setPrototypeOf(newBuf, Buffer3.prototype);
|
|
1717
|
-
return newBuf;
|
|
1718
|
-
}, "slice");
|
|
1719
|
-
function checkOffset(offset, ext, length) {
|
|
1720
|
-
if (offset % 1 !== 0 || offset < 0) throw new RangeError("offset is not uint");
|
|
1721
|
-
if (offset + ext > length) throw new RangeError("Trying to access beyond buffer length");
|
|
1722
|
-
}
|
|
1723
|
-
__name(checkOffset, "checkOffset");
|
|
1724
|
-
Buffer3.prototype.readUintLE = Buffer3.prototype.readUIntLE = /* @__PURE__ */ __name(function readUIntLE(offset, byteLength2, noAssert) {
|
|
1725
|
-
offset = offset >>> 0;
|
|
1726
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1727
|
-
if (!noAssert) checkOffset(offset, byteLength2, this.length);
|
|
1728
|
-
let val = this[offset];
|
|
1729
|
-
let mul = 1;
|
|
1730
|
-
let i = 0;
|
|
1731
|
-
while (++i < byteLength2 && (mul *= 256)) {
|
|
1732
|
-
val += this[offset + i] * mul;
|
|
1733
|
-
}
|
|
1734
|
-
return val;
|
|
1735
|
-
}, "readUIntLE");
|
|
1736
|
-
Buffer3.prototype.readUintBE = Buffer3.prototype.readUIntBE = /* @__PURE__ */ __name(function readUIntBE(offset, byteLength2, noAssert) {
|
|
1737
|
-
offset = offset >>> 0;
|
|
1738
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1739
|
-
if (!noAssert) {
|
|
1740
|
-
checkOffset(offset, byteLength2, this.length);
|
|
1741
|
-
}
|
|
1742
|
-
let val = this[offset + --byteLength2];
|
|
1743
|
-
let mul = 1;
|
|
1744
|
-
while (byteLength2 > 0 && (mul *= 256)) {
|
|
1745
|
-
val += this[offset + --byteLength2] * mul;
|
|
1746
|
-
}
|
|
1747
|
-
return val;
|
|
1748
|
-
}, "readUIntBE");
|
|
1749
|
-
Buffer3.prototype.readUint8 = Buffer3.prototype.readUInt8 = /* @__PURE__ */ __name(function readUInt8(offset, noAssert) {
|
|
1750
|
-
offset = offset >>> 0;
|
|
1751
|
-
if (!noAssert) checkOffset(offset, 1, this.length);
|
|
1752
|
-
return this[offset];
|
|
1753
|
-
}, "readUInt8");
|
|
1754
|
-
Buffer3.prototype.readUint16LE = Buffer3.prototype.readUInt16LE = /* @__PURE__ */ __name(function readUInt16LE(offset, noAssert) {
|
|
1755
|
-
offset = offset >>> 0;
|
|
1756
|
-
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
1757
|
-
return this[offset] | this[offset + 1] << 8;
|
|
1758
|
-
}, "readUInt16LE");
|
|
1759
|
-
Buffer3.prototype.readUint16BE = Buffer3.prototype.readUInt16BE = /* @__PURE__ */ __name(function readUInt16BE(offset, noAssert) {
|
|
1760
|
-
offset = offset >>> 0;
|
|
1761
|
-
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
1762
|
-
return this[offset] << 8 | this[offset + 1];
|
|
1763
|
-
}, "readUInt16BE");
|
|
1764
|
-
Buffer3.prototype.readUint32LE = Buffer3.prototype.readUInt32LE = /* @__PURE__ */ __name(function readUInt32LE(offset, noAssert) {
|
|
1765
|
-
offset = offset >>> 0;
|
|
1766
|
-
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1767
|
-
return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 16777216;
|
|
1768
|
-
}, "readUInt32LE");
|
|
1769
|
-
Buffer3.prototype.readUint32BE = Buffer3.prototype.readUInt32BE = /* @__PURE__ */ __name(function readUInt32BE(offset, noAssert) {
|
|
1770
|
-
offset = offset >>> 0;
|
|
1771
|
-
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1772
|
-
return this[offset] * 16777216 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
|
|
1773
|
-
}, "readUInt32BE");
|
|
1774
|
-
Buffer3.prototype.readBigUInt64LE = defineBigIntMethod(/* @__PURE__ */ __name(function readBigUInt64LE(offset) {
|
|
1775
|
-
offset = offset >>> 0;
|
|
1776
|
-
validateNumber(offset, "offset");
|
|
1777
|
-
const first = this[offset];
|
|
1778
|
-
const last = this[offset + 7];
|
|
1779
|
-
if (first === void 0 || last === void 0) {
|
|
1780
|
-
boundsError(offset, this.length - 8);
|
|
1781
|
-
}
|
|
1782
|
-
const lo = first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24;
|
|
1783
|
-
const hi = this[++offset] + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + last * 2 ** 24;
|
|
1784
|
-
return BigInt(lo) + (BigInt(hi) << BigInt(32));
|
|
1785
|
-
}, "readBigUInt64LE"));
|
|
1786
|
-
Buffer3.prototype.readBigUInt64BE = defineBigIntMethod(/* @__PURE__ */ __name(function readBigUInt64BE(offset) {
|
|
1787
|
-
offset = offset >>> 0;
|
|
1788
|
-
validateNumber(offset, "offset");
|
|
1789
|
-
const first = this[offset];
|
|
1790
|
-
const last = this[offset + 7];
|
|
1791
|
-
if (first === void 0 || last === void 0) {
|
|
1792
|
-
boundsError(offset, this.length - 8);
|
|
1793
|
-
}
|
|
1794
|
-
const hi = first * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
|
|
1795
|
-
const lo = this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last;
|
|
1796
|
-
return (BigInt(hi) << BigInt(32)) + BigInt(lo);
|
|
1797
|
-
}, "readBigUInt64BE"));
|
|
1798
|
-
Buffer3.prototype.readIntLE = /* @__PURE__ */ __name(function readIntLE(offset, byteLength2, noAssert) {
|
|
1799
|
-
offset = offset >>> 0;
|
|
1800
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1801
|
-
if (!noAssert) checkOffset(offset, byteLength2, this.length);
|
|
1802
|
-
let val = this[offset];
|
|
1803
|
-
let mul = 1;
|
|
1804
|
-
let i = 0;
|
|
1805
|
-
while (++i < byteLength2 && (mul *= 256)) {
|
|
1806
|
-
val += this[offset + i] * mul;
|
|
1807
|
-
}
|
|
1808
|
-
mul *= 128;
|
|
1809
|
-
if (val >= mul) val -= Math.pow(2, 8 * byteLength2);
|
|
1810
|
-
return val;
|
|
1811
|
-
}, "readIntLE");
|
|
1812
|
-
Buffer3.prototype.readIntBE = /* @__PURE__ */ __name(function readIntBE(offset, byteLength2, noAssert) {
|
|
1813
|
-
offset = offset >>> 0;
|
|
1814
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1815
|
-
if (!noAssert) checkOffset(offset, byteLength2, this.length);
|
|
1816
|
-
let i = byteLength2;
|
|
1817
|
-
let mul = 1;
|
|
1818
|
-
let val = this[offset + --i];
|
|
1819
|
-
while (i > 0 && (mul *= 256)) {
|
|
1820
|
-
val += this[offset + --i] * mul;
|
|
1821
|
-
}
|
|
1822
|
-
mul *= 128;
|
|
1823
|
-
if (val >= mul) val -= Math.pow(2, 8 * byteLength2);
|
|
1824
|
-
return val;
|
|
1825
|
-
}, "readIntBE");
|
|
1826
|
-
Buffer3.prototype.readInt8 = /* @__PURE__ */ __name(function readInt8(offset, noAssert) {
|
|
1827
|
-
offset = offset >>> 0;
|
|
1828
|
-
if (!noAssert) checkOffset(offset, 1, this.length);
|
|
1829
|
-
if (!(this[offset] & 128)) return this[offset];
|
|
1830
|
-
return (255 - this[offset] + 1) * -1;
|
|
1831
|
-
}, "readInt8");
|
|
1832
|
-
Buffer3.prototype.readInt16LE = /* @__PURE__ */ __name(function readInt16LE(offset, noAssert) {
|
|
1833
|
-
offset = offset >>> 0;
|
|
1834
|
-
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
1835
|
-
const val = this[offset] | this[offset + 1] << 8;
|
|
1836
|
-
return val & 32768 ? val | 4294901760 : val;
|
|
1837
|
-
}, "readInt16LE");
|
|
1838
|
-
Buffer3.prototype.readInt16BE = /* @__PURE__ */ __name(function readInt16BE(offset, noAssert) {
|
|
1839
|
-
offset = offset >>> 0;
|
|
1840
|
-
if (!noAssert) checkOffset(offset, 2, this.length);
|
|
1841
|
-
const val = this[offset + 1] | this[offset] << 8;
|
|
1842
|
-
return val & 32768 ? val | 4294901760 : val;
|
|
1843
|
-
}, "readInt16BE");
|
|
1844
|
-
Buffer3.prototype.readInt32LE = /* @__PURE__ */ __name(function readInt32LE(offset, noAssert) {
|
|
1845
|
-
offset = offset >>> 0;
|
|
1846
|
-
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1847
|
-
return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
|
|
1848
|
-
}, "readInt32LE");
|
|
1849
|
-
Buffer3.prototype.readInt32BE = /* @__PURE__ */ __name(function readInt32BE(offset, noAssert) {
|
|
1850
|
-
offset = offset >>> 0;
|
|
1851
|
-
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1852
|
-
return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
|
|
1853
|
-
}, "readInt32BE");
|
|
1854
|
-
Buffer3.prototype.readBigInt64LE = defineBigIntMethod(/* @__PURE__ */ __name(function readBigInt64LE(offset) {
|
|
1855
|
-
offset = offset >>> 0;
|
|
1856
|
-
validateNumber(offset, "offset");
|
|
1857
|
-
const first = this[offset];
|
|
1858
|
-
const last = this[offset + 7];
|
|
1859
|
-
if (first === void 0 || last === void 0) {
|
|
1860
|
-
boundsError(offset, this.length - 8);
|
|
1861
|
-
}
|
|
1862
|
-
const val = this[offset + 4] + this[offset + 5] * 2 ** 8 + this[offset + 6] * 2 ** 16 + (last << 24);
|
|
1863
|
-
return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * 2 ** 8 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 24);
|
|
1864
|
-
}, "readBigInt64LE"));
|
|
1865
|
-
Buffer3.prototype.readBigInt64BE = defineBigIntMethod(/* @__PURE__ */ __name(function readBigInt64BE(offset) {
|
|
1866
|
-
offset = offset >>> 0;
|
|
1867
|
-
validateNumber(offset, "offset");
|
|
1868
|
-
const first = this[offset];
|
|
1869
|
-
const last = this[offset + 7];
|
|
1870
|
-
if (first === void 0 || last === void 0) {
|
|
1871
|
-
boundsError(offset, this.length - 8);
|
|
1872
|
-
}
|
|
1873
|
-
const val = (first << 24) + // Overflow
|
|
1874
|
-
this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + this[++offset];
|
|
1875
|
-
return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * 2 ** 24 + this[++offset] * 2 ** 16 + this[++offset] * 2 ** 8 + last);
|
|
1876
|
-
}, "readBigInt64BE"));
|
|
1877
|
-
Buffer3.prototype.readFloatLE = /* @__PURE__ */ __name(function readFloatLE(offset, noAssert) {
|
|
1878
|
-
offset = offset >>> 0;
|
|
1879
|
-
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1880
|
-
return ieee754.read(this, offset, true, 23, 4);
|
|
1881
|
-
}, "readFloatLE");
|
|
1882
|
-
Buffer3.prototype.readFloatBE = /* @__PURE__ */ __name(function readFloatBE(offset, noAssert) {
|
|
1883
|
-
offset = offset >>> 0;
|
|
1884
|
-
if (!noAssert) checkOffset(offset, 4, this.length);
|
|
1885
|
-
return ieee754.read(this, offset, false, 23, 4);
|
|
1886
|
-
}, "readFloatBE");
|
|
1887
|
-
Buffer3.prototype.readDoubleLE = /* @__PURE__ */ __name(function readDoubleLE(offset, noAssert) {
|
|
1888
|
-
offset = offset >>> 0;
|
|
1889
|
-
if (!noAssert) checkOffset(offset, 8, this.length);
|
|
1890
|
-
return ieee754.read(this, offset, true, 52, 8);
|
|
1891
|
-
}, "readDoubleLE");
|
|
1892
|
-
Buffer3.prototype.readDoubleBE = /* @__PURE__ */ __name(function readDoubleBE(offset, noAssert) {
|
|
1893
|
-
offset = offset >>> 0;
|
|
1894
|
-
if (!noAssert) checkOffset(offset, 8, this.length);
|
|
1895
|
-
return ieee754.read(this, offset, false, 52, 8);
|
|
1896
|
-
}, "readDoubleBE");
|
|
1897
|
-
function checkInt(buf, value, offset, ext, max, min) {
|
|
1898
|
-
if (!Buffer3.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
1899
|
-
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
|
|
1900
|
-
if (offset + ext > buf.length) throw new RangeError("Index out of range");
|
|
1901
|
-
}
|
|
1902
|
-
__name(checkInt, "checkInt");
|
|
1903
|
-
Buffer3.prototype.writeUintLE = Buffer3.prototype.writeUIntLE = /* @__PURE__ */ __name(function writeUIntLE(value, offset, byteLength2, noAssert) {
|
|
1904
|
-
value = +value;
|
|
1905
|
-
offset = offset >>> 0;
|
|
1906
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1907
|
-
if (!noAssert) {
|
|
1908
|
-
const maxBytes = Math.pow(2, 8 * byteLength2) - 1;
|
|
1909
|
-
checkInt(this, value, offset, byteLength2, maxBytes, 0);
|
|
1910
|
-
}
|
|
1911
|
-
let mul = 1;
|
|
1912
|
-
let i = 0;
|
|
1913
|
-
this[offset] = value & 255;
|
|
1914
|
-
while (++i < byteLength2 && (mul *= 256)) {
|
|
1915
|
-
this[offset + i] = value / mul & 255;
|
|
1916
|
-
}
|
|
1917
|
-
return offset + byteLength2;
|
|
1918
|
-
}, "writeUIntLE");
|
|
1919
|
-
Buffer3.prototype.writeUintBE = Buffer3.prototype.writeUIntBE = /* @__PURE__ */ __name(function writeUIntBE(value, offset, byteLength2, noAssert) {
|
|
1920
|
-
value = +value;
|
|
1921
|
-
offset = offset >>> 0;
|
|
1922
|
-
byteLength2 = byteLength2 >>> 0;
|
|
1923
|
-
if (!noAssert) {
|
|
1924
|
-
const maxBytes = Math.pow(2, 8 * byteLength2) - 1;
|
|
1925
|
-
checkInt(this, value, offset, byteLength2, maxBytes, 0);
|
|
1926
|
-
}
|
|
1927
|
-
let i = byteLength2 - 1;
|
|
1928
|
-
let mul = 1;
|
|
1929
|
-
this[offset + i] = value & 255;
|
|
1930
|
-
while (--i >= 0 && (mul *= 256)) {
|
|
1931
|
-
this[offset + i] = value / mul & 255;
|
|
1932
|
-
}
|
|
1933
|
-
return offset + byteLength2;
|
|
1934
|
-
}, "writeUIntBE");
|
|
1935
|
-
Buffer3.prototype.writeUint8 = Buffer3.prototype.writeUInt8 = /* @__PURE__ */ __name(function writeUInt8(value, offset, noAssert) {
|
|
1936
|
-
value = +value;
|
|
1937
|
-
offset = offset >>> 0;
|
|
1938
|
-
if (!noAssert) checkInt(this, value, offset, 1, 255, 0);
|
|
1939
|
-
this[offset] = value & 255;
|
|
1940
|
-
return offset + 1;
|
|
1941
|
-
}, "writeUInt8");
|
|
1942
|
-
Buffer3.prototype.writeUint16LE = Buffer3.prototype.writeUInt16LE = /* @__PURE__ */ __name(function writeUInt16LE(value, offset, noAssert) {
|
|
1943
|
-
value = +value;
|
|
1944
|
-
offset = offset >>> 0;
|
|
1945
|
-
if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
|
|
1946
|
-
this[offset] = value & 255;
|
|
1947
|
-
this[offset + 1] = value >>> 8;
|
|
1948
|
-
return offset + 2;
|
|
1949
|
-
}, "writeUInt16LE");
|
|
1950
|
-
Buffer3.prototype.writeUint16BE = Buffer3.prototype.writeUInt16BE = /* @__PURE__ */ __name(function writeUInt16BE(value, offset, noAssert) {
|
|
1951
|
-
value = +value;
|
|
1952
|
-
offset = offset >>> 0;
|
|
1953
|
-
if (!noAssert) checkInt(this, value, offset, 2, 65535, 0);
|
|
1954
|
-
this[offset] = value >>> 8;
|
|
1955
|
-
this[offset + 1] = value & 255;
|
|
1956
|
-
return offset + 2;
|
|
1957
|
-
}, "writeUInt16BE");
|
|
1958
|
-
Buffer3.prototype.writeUint32LE = Buffer3.prototype.writeUInt32LE = /* @__PURE__ */ __name(function writeUInt32LE(value, offset, noAssert) {
|
|
1959
|
-
value = +value;
|
|
1960
|
-
offset = offset >>> 0;
|
|
1961
|
-
if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
|
|
1962
|
-
this[offset + 3] = value >>> 24;
|
|
1963
|
-
this[offset + 2] = value >>> 16;
|
|
1964
|
-
this[offset + 1] = value >>> 8;
|
|
1965
|
-
this[offset] = value & 255;
|
|
1966
|
-
return offset + 4;
|
|
1967
|
-
}, "writeUInt32LE");
|
|
1968
|
-
Buffer3.prototype.writeUint32BE = Buffer3.prototype.writeUInt32BE = /* @__PURE__ */ __name(function writeUInt32BE(value, offset, noAssert) {
|
|
1969
|
-
value = +value;
|
|
1970
|
-
offset = offset >>> 0;
|
|
1971
|
-
if (!noAssert) checkInt(this, value, offset, 4, 4294967295, 0);
|
|
1972
|
-
this[offset] = value >>> 24;
|
|
1973
|
-
this[offset + 1] = value >>> 16;
|
|
1974
|
-
this[offset + 2] = value >>> 8;
|
|
1975
|
-
this[offset + 3] = value & 255;
|
|
1976
|
-
return offset + 4;
|
|
1977
|
-
}, "writeUInt32BE");
|
|
1978
|
-
function wrtBigUInt64LE(buf, value, offset, min, max) {
|
|
1979
|
-
checkIntBI(value, min, max, buf, offset, 7);
|
|
1980
|
-
let lo = Number(value & BigInt(4294967295));
|
|
1981
|
-
buf[offset++] = lo;
|
|
1982
|
-
lo = lo >> 8;
|
|
1983
|
-
buf[offset++] = lo;
|
|
1984
|
-
lo = lo >> 8;
|
|
1985
|
-
buf[offset++] = lo;
|
|
1986
|
-
lo = lo >> 8;
|
|
1987
|
-
buf[offset++] = lo;
|
|
1988
|
-
let hi = Number(value >> BigInt(32) & BigInt(4294967295));
|
|
1989
|
-
buf[offset++] = hi;
|
|
1990
|
-
hi = hi >> 8;
|
|
1991
|
-
buf[offset++] = hi;
|
|
1992
|
-
hi = hi >> 8;
|
|
1993
|
-
buf[offset++] = hi;
|
|
1994
|
-
hi = hi >> 8;
|
|
1995
|
-
buf[offset++] = hi;
|
|
1996
|
-
return offset;
|
|
1997
|
-
}
|
|
1998
|
-
__name(wrtBigUInt64LE, "wrtBigUInt64LE");
|
|
1999
|
-
function wrtBigUInt64BE(buf, value, offset, min, max) {
|
|
2000
|
-
checkIntBI(value, min, max, buf, offset, 7);
|
|
2001
|
-
let lo = Number(value & BigInt(4294967295));
|
|
2002
|
-
buf[offset + 7] = lo;
|
|
2003
|
-
lo = lo >> 8;
|
|
2004
|
-
buf[offset + 6] = lo;
|
|
2005
|
-
lo = lo >> 8;
|
|
2006
|
-
buf[offset + 5] = lo;
|
|
2007
|
-
lo = lo >> 8;
|
|
2008
|
-
buf[offset + 4] = lo;
|
|
2009
|
-
let hi = Number(value >> BigInt(32) & BigInt(4294967295));
|
|
2010
|
-
buf[offset + 3] = hi;
|
|
2011
|
-
hi = hi >> 8;
|
|
2012
|
-
buf[offset + 2] = hi;
|
|
2013
|
-
hi = hi >> 8;
|
|
2014
|
-
buf[offset + 1] = hi;
|
|
2015
|
-
hi = hi >> 8;
|
|
2016
|
-
buf[offset] = hi;
|
|
2017
|
-
return offset + 8;
|
|
2018
|
-
}
|
|
2019
|
-
__name(wrtBigUInt64BE, "wrtBigUInt64BE");
|
|
2020
|
-
Buffer3.prototype.writeBigUInt64LE = defineBigIntMethod(/* @__PURE__ */ __name(function writeBigUInt64LE(value, offset = 0) {
|
|
2021
|
-
return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
2022
|
-
}, "writeBigUInt64LE"));
|
|
2023
|
-
Buffer3.prototype.writeBigUInt64BE = defineBigIntMethod(/* @__PURE__ */ __name(function writeBigUInt64BE(value, offset = 0) {
|
|
2024
|
-
return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
2025
|
-
}, "writeBigUInt64BE"));
|
|
2026
|
-
Buffer3.prototype.writeIntLE = /* @__PURE__ */ __name(function writeIntLE(value, offset, byteLength2, noAssert) {
|
|
2027
|
-
value = +value;
|
|
2028
|
-
offset = offset >>> 0;
|
|
2029
|
-
if (!noAssert) {
|
|
2030
|
-
const limit = Math.pow(2, 8 * byteLength2 - 1);
|
|
2031
|
-
checkInt(this, value, offset, byteLength2, limit - 1, -limit);
|
|
2032
|
-
}
|
|
2033
|
-
let i = 0;
|
|
2034
|
-
let mul = 1;
|
|
2035
|
-
let sub = 0;
|
|
2036
|
-
this[offset] = value & 255;
|
|
2037
|
-
while (++i < byteLength2 && (mul *= 256)) {
|
|
2038
|
-
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
|
|
2039
|
-
sub = 1;
|
|
2040
|
-
}
|
|
2041
|
-
this[offset + i] = (value / mul >> 0) - sub & 255;
|
|
2042
|
-
}
|
|
2043
|
-
return offset + byteLength2;
|
|
2044
|
-
}, "writeIntLE");
|
|
2045
|
-
Buffer3.prototype.writeIntBE = /* @__PURE__ */ __name(function writeIntBE(value, offset, byteLength2, noAssert) {
|
|
2046
|
-
value = +value;
|
|
2047
|
-
offset = offset >>> 0;
|
|
2048
|
-
if (!noAssert) {
|
|
2049
|
-
const limit = Math.pow(2, 8 * byteLength2 - 1);
|
|
2050
|
-
checkInt(this, value, offset, byteLength2, limit - 1, -limit);
|
|
2051
|
-
}
|
|
2052
|
-
let i = byteLength2 - 1;
|
|
2053
|
-
let mul = 1;
|
|
2054
|
-
let sub = 0;
|
|
2055
|
-
this[offset + i] = value & 255;
|
|
2056
|
-
while (--i >= 0 && (mul *= 256)) {
|
|
2057
|
-
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
|
|
2058
|
-
sub = 1;
|
|
2059
|
-
}
|
|
2060
|
-
this[offset + i] = (value / mul >> 0) - sub & 255;
|
|
2061
|
-
}
|
|
2062
|
-
return offset + byteLength2;
|
|
2063
|
-
}, "writeIntBE");
|
|
2064
|
-
Buffer3.prototype.writeInt8 = /* @__PURE__ */ __name(function writeInt8(value, offset, noAssert) {
|
|
2065
|
-
value = +value;
|
|
2066
|
-
offset = offset >>> 0;
|
|
2067
|
-
if (!noAssert) checkInt(this, value, offset, 1, 127, -128);
|
|
2068
|
-
if (value < 0) value = 255 + value + 1;
|
|
2069
|
-
this[offset] = value & 255;
|
|
2070
|
-
return offset + 1;
|
|
2071
|
-
}, "writeInt8");
|
|
2072
|
-
Buffer3.prototype.writeInt16LE = /* @__PURE__ */ __name(function writeInt16LE(value, offset, noAssert) {
|
|
2073
|
-
value = +value;
|
|
2074
|
-
offset = offset >>> 0;
|
|
2075
|
-
if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
|
|
2076
|
-
this[offset] = value & 255;
|
|
2077
|
-
this[offset + 1] = value >>> 8;
|
|
2078
|
-
return offset + 2;
|
|
2079
|
-
}, "writeInt16LE");
|
|
2080
|
-
Buffer3.prototype.writeInt16BE = /* @__PURE__ */ __name(function writeInt16BE(value, offset, noAssert) {
|
|
2081
|
-
value = +value;
|
|
2082
|
-
offset = offset >>> 0;
|
|
2083
|
-
if (!noAssert) checkInt(this, value, offset, 2, 32767, -32768);
|
|
2084
|
-
this[offset] = value >>> 8;
|
|
2085
|
-
this[offset + 1] = value & 255;
|
|
2086
|
-
return offset + 2;
|
|
2087
|
-
}, "writeInt16BE");
|
|
2088
|
-
Buffer3.prototype.writeInt32LE = /* @__PURE__ */ __name(function writeInt32LE(value, offset, noAssert) {
|
|
2089
|
-
value = +value;
|
|
2090
|
-
offset = offset >>> 0;
|
|
2091
|
-
if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
2092
|
-
this[offset] = value & 255;
|
|
2093
|
-
this[offset + 1] = value >>> 8;
|
|
2094
|
-
this[offset + 2] = value >>> 16;
|
|
2095
|
-
this[offset + 3] = value >>> 24;
|
|
2096
|
-
return offset + 4;
|
|
2097
|
-
}, "writeInt32LE");
|
|
2098
|
-
Buffer3.prototype.writeInt32BE = /* @__PURE__ */ __name(function writeInt32BE(value, offset, noAssert) {
|
|
2099
|
-
value = +value;
|
|
2100
|
-
offset = offset >>> 0;
|
|
2101
|
-
if (!noAssert) checkInt(this, value, offset, 4, 2147483647, -2147483648);
|
|
2102
|
-
if (value < 0) value = 4294967295 + value + 1;
|
|
2103
|
-
this[offset] = value >>> 24;
|
|
2104
|
-
this[offset + 1] = value >>> 16;
|
|
2105
|
-
this[offset + 2] = value >>> 8;
|
|
2106
|
-
this[offset + 3] = value & 255;
|
|
2107
|
-
return offset + 4;
|
|
2108
|
-
}, "writeInt32BE");
|
|
2109
|
-
Buffer3.prototype.writeBigInt64LE = defineBigIntMethod(/* @__PURE__ */ __name(function writeBigInt64LE(value, offset = 0) {
|
|
2110
|
-
return wrtBigUInt64LE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
2111
|
-
}, "writeBigInt64LE"));
|
|
2112
|
-
Buffer3.prototype.writeBigInt64BE = defineBigIntMethod(/* @__PURE__ */ __name(function writeBigInt64BE(value, offset = 0) {
|
|
2113
|
-
return wrtBigUInt64BE(this, value, offset, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
2114
|
-
}, "writeBigInt64BE"));
|
|
2115
|
-
function checkIEEE754(buf, value, offset, ext, max, min) {
|
|
2116
|
-
if (offset + ext > buf.length) throw new RangeError("Index out of range");
|
|
2117
|
-
if (offset < 0) throw new RangeError("Index out of range");
|
|
2118
|
-
}
|
|
2119
|
-
__name(checkIEEE754, "checkIEEE754");
|
|
2120
|
-
function writeFloat(buf, value, offset, littleEndian, noAssert) {
|
|
2121
|
-
value = +value;
|
|
2122
|
-
offset = offset >>> 0;
|
|
2123
|
-
if (!noAssert) {
|
|
2124
|
-
checkIEEE754(buf, value, offset, 4, 34028234663852886e22, -34028234663852886e22);
|
|
2125
|
-
}
|
|
2126
|
-
ieee754.write(buf, value, offset, littleEndian, 23, 4);
|
|
2127
|
-
return offset + 4;
|
|
2128
|
-
}
|
|
2129
|
-
__name(writeFloat, "writeFloat");
|
|
2130
|
-
Buffer3.prototype.writeFloatLE = /* @__PURE__ */ __name(function writeFloatLE(value, offset, noAssert) {
|
|
2131
|
-
return writeFloat(this, value, offset, true, noAssert);
|
|
2132
|
-
}, "writeFloatLE");
|
|
2133
|
-
Buffer3.prototype.writeFloatBE = /* @__PURE__ */ __name(function writeFloatBE(value, offset, noAssert) {
|
|
2134
|
-
return writeFloat(this, value, offset, false, noAssert);
|
|
2135
|
-
}, "writeFloatBE");
|
|
2136
|
-
function writeDouble(buf, value, offset, littleEndian, noAssert) {
|
|
2137
|
-
value = +value;
|
|
2138
|
-
offset = offset >>> 0;
|
|
2139
|
-
if (!noAssert) {
|
|
2140
|
-
checkIEEE754(buf, value, offset, 8, 17976931348623157e292, -17976931348623157e292);
|
|
2141
|
-
}
|
|
2142
|
-
ieee754.write(buf, value, offset, littleEndian, 52, 8);
|
|
2143
|
-
return offset + 8;
|
|
2144
|
-
}
|
|
2145
|
-
__name(writeDouble, "writeDouble");
|
|
2146
|
-
Buffer3.prototype.writeDoubleLE = /* @__PURE__ */ __name(function writeDoubleLE(value, offset, noAssert) {
|
|
2147
|
-
return writeDouble(this, value, offset, true, noAssert);
|
|
2148
|
-
}, "writeDoubleLE");
|
|
2149
|
-
Buffer3.prototype.writeDoubleBE = /* @__PURE__ */ __name(function writeDoubleBE(value, offset, noAssert) {
|
|
2150
|
-
return writeDouble(this, value, offset, false, noAssert);
|
|
2151
|
-
}, "writeDoubleBE");
|
|
2152
|
-
Buffer3.prototype.copy = /* @__PURE__ */ __name(function copy2(target, targetStart, start, end) {
|
|
2153
|
-
if (!Buffer3.isBuffer(target)) throw new TypeError("argument should be a Buffer");
|
|
2154
|
-
if (!start) start = 0;
|
|
2155
|
-
if (!end && end !== 0) end = this.length;
|
|
2156
|
-
if (targetStart >= target.length) targetStart = target.length;
|
|
2157
|
-
if (!targetStart) targetStart = 0;
|
|
2158
|
-
if (end > 0 && end < start) end = start;
|
|
2159
|
-
if (end === start) return 0;
|
|
2160
|
-
if (target.length === 0 || this.length === 0) return 0;
|
|
2161
|
-
if (targetStart < 0) {
|
|
2162
|
-
throw new RangeError("targetStart out of bounds");
|
|
2163
|
-
}
|
|
2164
|
-
if (start < 0 || start >= this.length) throw new RangeError("Index out of range");
|
|
2165
|
-
if (end < 0) throw new RangeError("sourceEnd out of bounds");
|
|
2166
|
-
if (end > this.length) end = this.length;
|
|
2167
|
-
if (target.length - targetStart < end - start) {
|
|
2168
|
-
end = target.length - targetStart + start;
|
|
2169
|
-
}
|
|
2170
|
-
const len = end - start;
|
|
2171
|
-
if (this === target && typeof Uint8Array.prototype.copyWithin === "function") {
|
|
2172
|
-
this.copyWithin(targetStart, start, end);
|
|
2173
|
-
} else {
|
|
2174
|
-
Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);
|
|
2175
|
-
}
|
|
2176
|
-
return len;
|
|
2177
|
-
}, "copy");
|
|
2178
|
-
Buffer3.prototype.fill = /* @__PURE__ */ __name(function fill(val, start, end, encoding) {
|
|
2179
|
-
if (typeof val === "string") {
|
|
2180
|
-
if (typeof start === "string") {
|
|
2181
|
-
encoding = start;
|
|
2182
|
-
start = 0;
|
|
2183
|
-
end = this.length;
|
|
2184
|
-
} else if (typeof end === "string") {
|
|
2185
|
-
encoding = end;
|
|
2186
|
-
end = this.length;
|
|
2187
|
-
}
|
|
2188
|
-
if (encoding !== void 0 && typeof encoding !== "string") {
|
|
2189
|
-
throw new TypeError("encoding must be a string");
|
|
2190
|
-
}
|
|
2191
|
-
if (typeof encoding === "string" && !Buffer3.isEncoding(encoding)) {
|
|
2192
|
-
throw new TypeError("Unknown encoding: " + encoding);
|
|
2193
|
-
}
|
|
2194
|
-
if (val.length === 1) {
|
|
2195
|
-
const code = val.charCodeAt(0);
|
|
2196
|
-
if (encoding === "utf8" && code < 128 || encoding === "latin1") {
|
|
2197
|
-
val = code;
|
|
2198
|
-
}
|
|
2199
|
-
}
|
|
2200
|
-
} else if (typeof val === "number") {
|
|
2201
|
-
val = val & 255;
|
|
2202
|
-
} else if (typeof val === "boolean") {
|
|
2203
|
-
val = Number(val);
|
|
2204
|
-
}
|
|
2205
|
-
if (start < 0 || this.length < start || this.length < end) {
|
|
2206
|
-
throw new RangeError("Out of range index");
|
|
2207
|
-
}
|
|
2208
|
-
if (end <= start) {
|
|
2209
|
-
return this;
|
|
2210
|
-
}
|
|
2211
|
-
start = start >>> 0;
|
|
2212
|
-
end = end === void 0 ? this.length : end >>> 0;
|
|
2213
|
-
if (!val) val = 0;
|
|
2214
|
-
let i;
|
|
2215
|
-
if (typeof val === "number") {
|
|
2216
|
-
for (i = start; i < end; ++i) {
|
|
2217
|
-
this[i] = val;
|
|
2218
|
-
}
|
|
2219
|
-
} else {
|
|
2220
|
-
const bytes = Buffer3.isBuffer(val) ? val : Buffer3.from(val, encoding);
|
|
2221
|
-
const len = bytes.length;
|
|
2222
|
-
if (len === 0) {
|
|
2223
|
-
throw new TypeError('The value "' + val + '" is invalid for argument "value"');
|
|
2224
|
-
}
|
|
2225
|
-
for (i = 0; i < end - start; ++i) {
|
|
2226
|
-
this[i + start] = bytes[i % len];
|
|
2227
|
-
}
|
|
2228
|
-
}
|
|
2229
|
-
return this;
|
|
2230
|
-
}, "fill");
|
|
2231
|
-
var errors = {};
|
|
2232
|
-
function E(sym, getMessage, Base) {
|
|
2233
|
-
errors[sym] = class NodeError extends Base {
|
|
2234
|
-
static {
|
|
2235
|
-
__name(this, "NodeError");
|
|
2236
|
-
}
|
|
2237
|
-
constructor() {
|
|
2238
|
-
super();
|
|
2239
|
-
Object.defineProperty(this, "message", {
|
|
2240
|
-
value: getMessage.apply(this, arguments),
|
|
2241
|
-
writable: true,
|
|
2242
|
-
configurable: true
|
|
2243
|
-
});
|
|
2244
|
-
this.name = `${this.name} [${sym}]`;
|
|
2245
|
-
this.stack;
|
|
2246
|
-
delete this.name;
|
|
2247
|
-
}
|
|
2248
|
-
get code() {
|
|
2249
|
-
return sym;
|
|
2250
|
-
}
|
|
2251
|
-
set code(value) {
|
|
2252
|
-
Object.defineProperty(this, "code", {
|
|
2253
|
-
configurable: true,
|
|
2254
|
-
enumerable: true,
|
|
2255
|
-
value,
|
|
2256
|
-
writable: true
|
|
2257
|
-
});
|
|
2258
|
-
}
|
|
2259
|
-
toString() {
|
|
2260
|
-
return `${this.name} [${sym}]: ${this.message}`;
|
|
2261
|
-
}
|
|
2262
|
-
};
|
|
708
|
+
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
709
|
+
object[key] = [...value, ...object[key]];
|
|
710
|
+
} else if (isPlainObject(value) && isPlainObject(object[key])) {
|
|
711
|
+
object[key] = _defu(
|
|
712
|
+
value,
|
|
713
|
+
object[key],
|
|
714
|
+
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
715
|
+
merger
|
|
716
|
+
);
|
|
717
|
+
} else {
|
|
718
|
+
object[key] = value;
|
|
2263
719
|
}
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
msg += ` It must be ${range}. Received ${received}`;
|
|
2287
|
-
return msg;
|
|
2288
|
-
}, RangeError);
|
|
2289
|
-
function addNumericalSeparator(val) {
|
|
2290
|
-
let res = "";
|
|
2291
|
-
let i = val.length;
|
|
2292
|
-
const start = val[0] === "-" ? 1 : 0;
|
|
2293
|
-
for (; i >= start + 4; i -= 3) {
|
|
2294
|
-
res = `_${val.slice(i - 3, i)}${res}`;
|
|
2295
|
-
}
|
|
2296
|
-
return `${val.slice(0, i)}${res}`;
|
|
2297
|
-
}
|
|
2298
|
-
__name(addNumericalSeparator, "addNumericalSeparator");
|
|
2299
|
-
function checkBounds(buf, offset, byteLength2) {
|
|
2300
|
-
validateNumber(offset, "offset");
|
|
2301
|
-
if (buf[offset] === void 0 || buf[offset + byteLength2] === void 0) {
|
|
2302
|
-
boundsError(offset, buf.length - (byteLength2 + 1));
|
|
2303
|
-
}
|
|
2304
|
-
}
|
|
2305
|
-
__name(checkBounds, "checkBounds");
|
|
2306
|
-
function checkIntBI(value, min, max, buf, offset, byteLength2) {
|
|
2307
|
-
if (value > max || value < min) {
|
|
2308
|
-
const n = typeof min === "bigint" ? "n" : "";
|
|
2309
|
-
let range;
|
|
2310
|
-
if (byteLength2 > 3) {
|
|
2311
|
-
if (min === 0 || min === BigInt(0)) {
|
|
2312
|
-
range = `>= 0${n} and < 2${n} ** ${(byteLength2 + 1) * 8}${n}`;
|
|
2313
|
-
} else {
|
|
2314
|
-
range = `>= -(2${n} ** ${(byteLength2 + 1) * 8 - 1}${n}) and < 2 ** ${(byteLength2 + 1) * 8 - 1}${n}`;
|
|
2315
|
-
}
|
|
2316
|
-
} else {
|
|
2317
|
-
range = `>= ${min}${n} and <= ${max}${n}`;
|
|
2318
|
-
}
|
|
2319
|
-
throw new errors.ERR_OUT_OF_RANGE("value", range, value);
|
|
2320
|
-
}
|
|
2321
|
-
checkBounds(buf, offset, byteLength2);
|
|
2322
|
-
}
|
|
2323
|
-
__name(checkIntBI, "checkIntBI");
|
|
2324
|
-
function validateNumber(value, name) {
|
|
2325
|
-
if (typeof value !== "number") {
|
|
2326
|
-
throw new errors.ERR_INVALID_ARG_TYPE(name, "number", value);
|
|
2327
|
-
}
|
|
2328
|
-
}
|
|
2329
|
-
__name(validateNumber, "validateNumber");
|
|
2330
|
-
function boundsError(value, length, type) {
|
|
2331
|
-
if (Math.floor(value) !== value) {
|
|
2332
|
-
validateNumber(value, type);
|
|
2333
|
-
throw new errors.ERR_OUT_OF_RANGE(type || "offset", "an integer", value);
|
|
2334
|
-
}
|
|
2335
|
-
if (length < 0) {
|
|
2336
|
-
throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
|
|
2337
|
-
}
|
|
2338
|
-
throw new errors.ERR_OUT_OF_RANGE(type || "offset", `>= ${type ? 1 : 0} and <= ${length}`, value);
|
|
2339
|
-
}
|
|
2340
|
-
__name(boundsError, "boundsError");
|
|
2341
|
-
var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
|
|
2342
|
-
function base64clean(str) {
|
|
2343
|
-
str = str.split("=")[0];
|
|
2344
|
-
str = str.trim().replace(INVALID_BASE64_RE, "");
|
|
2345
|
-
if (str.length < 2) return "";
|
|
2346
|
-
while (str.length % 4 !== 0) {
|
|
2347
|
-
str = str + "=";
|
|
2348
|
-
}
|
|
2349
|
-
return str;
|
|
2350
|
-
}
|
|
2351
|
-
__name(base64clean, "base64clean");
|
|
2352
|
-
function utf8ToBytes(string, units) {
|
|
2353
|
-
units = units || Infinity;
|
|
2354
|
-
let codePoint;
|
|
2355
|
-
const length = string.length;
|
|
2356
|
-
let leadSurrogate = null;
|
|
2357
|
-
const bytes = [];
|
|
2358
|
-
for (let i = 0; i < length; ++i) {
|
|
2359
|
-
codePoint = string.charCodeAt(i);
|
|
2360
|
-
if (codePoint > 55295 && codePoint < 57344) {
|
|
2361
|
-
if (!leadSurrogate) {
|
|
2362
|
-
if (codePoint > 56319) {
|
|
2363
|
-
if ((units -= 3) > -1) bytes.push(239, 191, 189);
|
|
2364
|
-
continue;
|
|
2365
|
-
} else if (i + 1 === length) {
|
|
2366
|
-
if ((units -= 3) > -1) bytes.push(239, 191, 189);
|
|
2367
|
-
continue;
|
|
2368
|
-
}
|
|
2369
|
-
leadSurrogate = codePoint;
|
|
2370
|
-
continue;
|
|
2371
|
-
}
|
|
2372
|
-
if (codePoint < 56320) {
|
|
2373
|
-
if ((units -= 3) > -1) bytes.push(239, 191, 189);
|
|
2374
|
-
leadSurrogate = codePoint;
|
|
2375
|
-
continue;
|
|
2376
|
-
}
|
|
2377
|
-
codePoint = (leadSurrogate - 55296 << 10 | codePoint - 56320) + 65536;
|
|
2378
|
-
} else if (leadSurrogate) {
|
|
2379
|
-
if ((units -= 3) > -1) bytes.push(239, 191, 189);
|
|
2380
|
-
}
|
|
2381
|
-
leadSurrogate = null;
|
|
2382
|
-
if (codePoint < 128) {
|
|
2383
|
-
if ((units -= 1) < 0) break;
|
|
2384
|
-
bytes.push(codePoint);
|
|
2385
|
-
} else if (codePoint < 2048) {
|
|
2386
|
-
if ((units -= 2) < 0) break;
|
|
2387
|
-
bytes.push(codePoint >> 6 | 192, codePoint & 63 | 128);
|
|
2388
|
-
} else if (codePoint < 65536) {
|
|
2389
|
-
if ((units -= 3) < 0) break;
|
|
2390
|
-
bytes.push(codePoint >> 12 | 224, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
|
|
2391
|
-
} else if (codePoint < 1114112) {
|
|
2392
|
-
if ((units -= 4) < 0) break;
|
|
2393
|
-
bytes.push(codePoint >> 18 | 240, codePoint >> 12 & 63 | 128, codePoint >> 6 & 63 | 128, codePoint & 63 | 128);
|
|
2394
|
-
} else {
|
|
2395
|
-
throw new Error("Invalid code point");
|
|
2396
|
-
}
|
|
720
|
+
}
|
|
721
|
+
return object;
|
|
722
|
+
}
|
|
723
|
+
function createDefu(merger) {
|
|
724
|
+
return (...arguments_) => (
|
|
725
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
|
726
|
+
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
var defu, defuFn, defuArrayFn;
|
|
730
|
+
var init_defu = __esm({
|
|
731
|
+
"../../node_modules/.pnpm/defu@6.1.4/node_modules/defu/dist/defu.mjs"() {
|
|
732
|
+
"use strict";
|
|
733
|
+
init_esm_shims();
|
|
734
|
+
__name(isPlainObject, "isPlainObject");
|
|
735
|
+
__name(_defu, "_defu");
|
|
736
|
+
__name(createDefu, "createDefu");
|
|
737
|
+
defu = createDefu();
|
|
738
|
+
defuFn = createDefu((object, key, currentValue) => {
|
|
739
|
+
if (object[key] !== void 0 && typeof currentValue === "function") {
|
|
740
|
+
object[key] = currentValue(object[key]);
|
|
741
|
+
return true;
|
|
2397
742
|
}
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
for (let i = 0; i < str.length; ++i) {
|
|
2404
|
-
byteArray.push(str.charCodeAt(i) & 255);
|
|
2405
|
-
}
|
|
2406
|
-
return byteArray;
|
|
2407
|
-
}
|
|
2408
|
-
__name(asciiToBytes, "asciiToBytes");
|
|
2409
|
-
function utf16leToBytes(str, units) {
|
|
2410
|
-
let c, hi, lo;
|
|
2411
|
-
const byteArray = [];
|
|
2412
|
-
for (let i = 0; i < str.length; ++i) {
|
|
2413
|
-
if ((units -= 2) < 0) break;
|
|
2414
|
-
c = str.charCodeAt(i);
|
|
2415
|
-
hi = c >> 8;
|
|
2416
|
-
lo = c % 256;
|
|
2417
|
-
byteArray.push(lo);
|
|
2418
|
-
byteArray.push(hi);
|
|
2419
|
-
}
|
|
2420
|
-
return byteArray;
|
|
2421
|
-
}
|
|
2422
|
-
__name(utf16leToBytes, "utf16leToBytes");
|
|
2423
|
-
function base64ToBytes(str) {
|
|
2424
|
-
return base64.toByteArray(base64clean(str));
|
|
2425
|
-
}
|
|
2426
|
-
__name(base64ToBytes, "base64ToBytes");
|
|
2427
|
-
function blitBuffer(src, dst, offset, length) {
|
|
2428
|
-
let i;
|
|
2429
|
-
for (i = 0; i < length; ++i) {
|
|
2430
|
-
if (i + offset >= dst.length || i >= src.length) break;
|
|
2431
|
-
dst[i + offset] = src[i];
|
|
2432
|
-
}
|
|
2433
|
-
return i;
|
|
2434
|
-
}
|
|
2435
|
-
__name(blitBuffer, "blitBuffer");
|
|
2436
|
-
function isInstance(obj, type) {
|
|
2437
|
-
return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
|
|
2438
|
-
}
|
|
2439
|
-
__name(isInstance, "isInstance");
|
|
2440
|
-
function numberIsNaN(obj) {
|
|
2441
|
-
return obj !== obj;
|
|
2442
|
-
}
|
|
2443
|
-
__name(numberIsNaN, "numberIsNaN");
|
|
2444
|
-
var hexSliceLookupTable = function() {
|
|
2445
|
-
const alphabet = "0123456789abcdef";
|
|
2446
|
-
const table = new Array(256);
|
|
2447
|
-
for (let i = 0; i < 16; ++i) {
|
|
2448
|
-
const i16 = i * 16;
|
|
2449
|
-
for (let j = 0; j < 16; ++j) {
|
|
2450
|
-
table[i16 + j] = alphabet[i] + alphabet[j];
|
|
2451
|
-
}
|
|
743
|
+
});
|
|
744
|
+
defuArrayFn = createDefu((object, key, currentValue) => {
|
|
745
|
+
if (Array.isArray(object[key]) && typeof currentValue === "function") {
|
|
746
|
+
object[key] = currentValue(object[key]);
|
|
747
|
+
return true;
|
|
2452
748
|
}
|
|
2453
|
-
|
|
2454
|
-
}();
|
|
2455
|
-
function defineBigIntMethod(fn) {
|
|
2456
|
-
return typeof BigInt === "undefined" ? BufferBigIntNotDefined : fn;
|
|
2457
|
-
}
|
|
2458
|
-
__name(defineBigIntMethod, "defineBigIntMethod");
|
|
2459
|
-
function BufferBigIntNotDefined() {
|
|
2460
|
-
throw new Error("BigInt not supported");
|
|
2461
|
-
}
|
|
2462
|
-
__name(BufferBigIntNotDefined, "BufferBigIntNotDefined");
|
|
749
|
+
});
|
|
2463
750
|
}
|
|
2464
751
|
});
|
|
2465
752
|
|
|
@@ -2681,13 +968,13 @@ var util;
|
|
|
2681
968
|
});
|
|
2682
969
|
};
|
|
2683
970
|
util2.objectKeys = typeof Object.keys === "function" ? (obj) => Object.keys(obj) : (object) => {
|
|
2684
|
-
const
|
|
971
|
+
const keys2 = [];
|
|
2685
972
|
for (const key in object) {
|
|
2686
973
|
if (Object.prototype.hasOwnProperty.call(object, key)) {
|
|
2687
|
-
|
|
974
|
+
keys2.push(key);
|
|
2688
975
|
}
|
|
2689
976
|
}
|
|
2690
|
-
return
|
|
977
|
+
return keys2;
|
|
2691
978
|
};
|
|
2692
979
|
util2.find = (arr, checker) => {
|
|
2693
980
|
for (const item of arr) {
|
|
@@ -3079,9 +1366,9 @@ var ParseStatus = class _ParseStatus {
|
|
|
3079
1366
|
}
|
|
3080
1367
|
return { status: status.value, value: arrayValue };
|
|
3081
1368
|
}
|
|
3082
|
-
static async mergeObjectAsync(status,
|
|
1369
|
+
static async mergeObjectAsync(status, pairs2) {
|
|
3083
1370
|
const syncPairs = [];
|
|
3084
|
-
for (const pair of
|
|
1371
|
+
for (const pair of pairs2) {
|
|
3085
1372
|
const key = await pair.key;
|
|
3086
1373
|
const value = await pair.value;
|
|
3087
1374
|
syncPairs.push({
|
|
@@ -3091,9 +1378,9 @@ var ParseStatus = class _ParseStatus {
|
|
|
3091
1378
|
}
|
|
3092
1379
|
return _ParseStatus.mergeObjectSync(status, syncPairs);
|
|
3093
1380
|
}
|
|
3094
|
-
static mergeObjectSync(status,
|
|
1381
|
+
static mergeObjectSync(status, pairs2) {
|
|
3095
1382
|
const finalObject = {};
|
|
3096
|
-
for (const pair of
|
|
1383
|
+
for (const pair of pairs2) {
|
|
3097
1384
|
const { key, value } = pair;
|
|
3098
1385
|
if (key.status === "aborted")
|
|
3099
1386
|
return INVALID;
|
|
@@ -4981,8 +3268,8 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
4981
3268
|
if (this._cached !== null)
|
|
4982
3269
|
return this._cached;
|
|
4983
3270
|
const shape = this._def.shape();
|
|
4984
|
-
const
|
|
4985
|
-
return this._cached = { shape, keys };
|
|
3271
|
+
const keys2 = util.objectKeys(shape);
|
|
3272
|
+
return this._cached = { shape, keys: keys2 };
|
|
4986
3273
|
}
|
|
4987
3274
|
_parse(input) {
|
|
4988
3275
|
const parsedType = this._getType(input);
|
|
@@ -5005,11 +3292,11 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
5005
3292
|
}
|
|
5006
3293
|
}
|
|
5007
3294
|
}
|
|
5008
|
-
const
|
|
3295
|
+
const pairs2 = [];
|
|
5009
3296
|
for (const key of shapeKeys) {
|
|
5010
3297
|
const keyValidator = shape[key];
|
|
5011
3298
|
const value = ctx.data[key];
|
|
5012
|
-
|
|
3299
|
+
pairs2.push({
|
|
5013
3300
|
key: { status: "valid", value: key },
|
|
5014
3301
|
value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),
|
|
5015
3302
|
alwaysSet: key in ctx.data
|
|
@@ -5019,7 +3306,7 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
5019
3306
|
const unknownKeys = this._def.unknownKeys;
|
|
5020
3307
|
if (unknownKeys === "passthrough") {
|
|
5021
3308
|
for (const key of extraKeys) {
|
|
5022
|
-
|
|
3309
|
+
pairs2.push({
|
|
5023
3310
|
key: { status: "valid", value: key },
|
|
5024
3311
|
value: { status: "valid", value: ctx.data[key] }
|
|
5025
3312
|
});
|
|
@@ -5040,7 +3327,7 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
5040
3327
|
const catchall = this._def.catchall;
|
|
5041
3328
|
for (const key of extraKeys) {
|
|
5042
3329
|
const value = ctx.data[key];
|
|
5043
|
-
|
|
3330
|
+
pairs2.push({
|
|
5044
3331
|
key: { status: "valid", value: key },
|
|
5045
3332
|
value: catchall._parse(
|
|
5046
3333
|
new ParseInputLazyPath(ctx, value, ctx.path, key)
|
|
@@ -5053,7 +3340,7 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
5053
3340
|
if (ctx.common.async) {
|
|
5054
3341
|
return Promise.resolve().then(async () => {
|
|
5055
3342
|
const syncPairs = [];
|
|
5056
|
-
for (const pair of
|
|
3343
|
+
for (const pair of pairs2) {
|
|
5057
3344
|
const key = await pair.key;
|
|
5058
3345
|
const value = await pair.value;
|
|
5059
3346
|
syncPairs.push({
|
|
@@ -5067,7 +3354,7 @@ var ZodObject = class _ZodObject extends ZodType {
|
|
|
5067
3354
|
return ParseStatus.mergeObjectSync(status, syncPairs);
|
|
5068
3355
|
});
|
|
5069
3356
|
} else {
|
|
5070
|
-
return ParseStatus.mergeObjectSync(status,
|
|
3357
|
+
return ParseStatus.mergeObjectSync(status, pairs2);
|
|
5071
3358
|
}
|
|
5072
3359
|
}
|
|
5073
3360
|
get shape() {
|
|
@@ -5698,20 +3985,20 @@ var ZodRecord = class _ZodRecord extends ZodType {
|
|
|
5698
3985
|
});
|
|
5699
3986
|
return INVALID;
|
|
5700
3987
|
}
|
|
5701
|
-
const
|
|
3988
|
+
const pairs2 = [];
|
|
5702
3989
|
const keyType = this._def.keyType;
|
|
5703
3990
|
const valueType = this._def.valueType;
|
|
5704
3991
|
for (const key in ctx.data) {
|
|
5705
|
-
|
|
3992
|
+
pairs2.push({
|
|
5706
3993
|
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),
|
|
5707
3994
|
value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),
|
|
5708
3995
|
alwaysSet: key in ctx.data
|
|
5709
3996
|
});
|
|
5710
3997
|
}
|
|
5711
3998
|
if (ctx.common.async) {
|
|
5712
|
-
return ParseStatus.mergeObjectAsync(status,
|
|
3999
|
+
return ParseStatus.mergeObjectAsync(status, pairs2);
|
|
5713
4000
|
} else {
|
|
5714
|
-
return ParseStatus.mergeObjectSync(status,
|
|
4001
|
+
return ParseStatus.mergeObjectSync(status, pairs2);
|
|
5715
4002
|
}
|
|
5716
4003
|
}
|
|
5717
4004
|
get element() {
|
|
@@ -5756,7 +4043,7 @@ var ZodMap = class extends ZodType {
|
|
|
5756
4043
|
}
|
|
5757
4044
|
const keyType = this._def.keyType;
|
|
5758
4045
|
const valueType = this._def.valueType;
|
|
5759
|
-
const
|
|
4046
|
+
const pairs2 = [...ctx.data.entries()].map(([key, value], index) => {
|
|
5760
4047
|
return {
|
|
5761
4048
|
key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, "key"])),
|
|
5762
4049
|
value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, "value"]))
|
|
@@ -5765,7 +4052,7 @@ var ZodMap = class extends ZodType {
|
|
|
5765
4052
|
if (ctx.common.async) {
|
|
5766
4053
|
const finalMap = /* @__PURE__ */ new Map();
|
|
5767
4054
|
return Promise.resolve().then(async () => {
|
|
5768
|
-
for (const pair of
|
|
4055
|
+
for (const pair of pairs2) {
|
|
5769
4056
|
const key = await pair.key;
|
|
5770
4057
|
const value = await pair.value;
|
|
5771
4058
|
if (key.status === "aborted" || value.status === "aborted") {
|
|
@@ -5780,7 +4067,7 @@ var ZodMap = class extends ZodType {
|
|
|
5780
4067
|
});
|
|
5781
4068
|
} else {
|
|
5782
4069
|
const finalMap = /* @__PURE__ */ new Map();
|
|
5783
|
-
for (const pair of
|
|
4070
|
+
for (const pair of pairs2) {
|
|
5784
4071
|
const key = pair.key;
|
|
5785
4072
|
const value = pair.value;
|
|
5786
4073
|
if (key.status === "aborted" || value.status === "aborted") {
|
|
@@ -6592,13 +4879,13 @@ var ZodReadonly = class extends ZodType {
|
|
|
6592
4879
|
}
|
|
6593
4880
|
_parse(input) {
|
|
6594
4881
|
const result = this._def.innerType._parse(input);
|
|
6595
|
-
const
|
|
4882
|
+
const freeze2 = /* @__PURE__ */ __name((data) => {
|
|
6596
4883
|
if (isValid(data)) {
|
|
6597
4884
|
data.value = Object.freeze(data.value);
|
|
6598
4885
|
}
|
|
6599
4886
|
return data;
|
|
6600
4887
|
}, "freeze");
|
|
6601
|
-
return isAsync(result) ? result.then((data) =>
|
|
4888
|
+
return isAsync(result) ? result.then((data) => freeze2(data)) : freeze2(result);
|
|
6602
4889
|
}
|
|
6603
4890
|
unwrap() {
|
|
6604
4891
|
return this._def.innerType;
|
|
@@ -6912,12 +5199,34 @@ init_esm_shims();
|
|
|
6912
5199
|
var EMPTY_STRING = "";
|
|
6913
5200
|
var $NestedValue = Symbol("NestedValue");
|
|
6914
5201
|
|
|
5202
|
+
// ../path/src/file-path-fns.ts
|
|
5203
|
+
import { relative } from "node:path";
|
|
5204
|
+
|
|
6915
5205
|
// ../path/src/correct-path.ts
|
|
6916
5206
|
init_esm_shims();
|
|
6917
5207
|
|
|
6918
5208
|
// ../path/src/is-file.ts
|
|
6919
5209
|
init_esm_shims();
|
|
6920
5210
|
import { lstatSync, statSync } from "node:fs";
|
|
5211
|
+
|
|
5212
|
+
// ../path/src/regex.ts
|
|
5213
|
+
init_esm_shims();
|
|
5214
|
+
var DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
|
|
5215
|
+
var DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
|
|
5216
|
+
var UNC_REGEX = /^[/\\]{2}/;
|
|
5217
|
+
var ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
|
|
5218
|
+
|
|
5219
|
+
// ../path/src/slash.ts
|
|
5220
|
+
init_esm_shims();
|
|
5221
|
+
function slash(path6) {
|
|
5222
|
+
if (path6.startsWith("\\\\?\\")) {
|
|
5223
|
+
return path6;
|
|
5224
|
+
}
|
|
5225
|
+
return path6.replace(/\\/g, "/");
|
|
5226
|
+
}
|
|
5227
|
+
__name(slash, "slash");
|
|
5228
|
+
|
|
5229
|
+
// ../path/src/is-file.ts
|
|
6921
5230
|
function isFile(path6, additionalPath) {
|
|
6922
5231
|
return Boolean(statSync(additionalPath ? joinPaths(additionalPath, path6) : path6, {
|
|
6923
5232
|
throwIfNoEntry: false
|
|
@@ -6931,29 +5240,26 @@ function isDirectory(path6, additionalPath) {
|
|
|
6931
5240
|
}
|
|
6932
5241
|
__name(isDirectory, "isDirectory");
|
|
6933
5242
|
function isAbsolutePath(path6) {
|
|
6934
|
-
return
|
|
5243
|
+
return ABSOLUTE_PATH_REGEX.test(slash(path6));
|
|
6935
5244
|
}
|
|
6936
5245
|
__name(isAbsolutePath, "isAbsolutePath");
|
|
6937
5246
|
|
|
6938
5247
|
// ../path/src/correct-path.ts
|
|
6939
|
-
var _DRIVE_LETTER_START_RE2 = /^[A-Z]:\//i;
|
|
6940
5248
|
function normalizeWindowsPath2(input = "") {
|
|
6941
5249
|
if (!input) {
|
|
6942
5250
|
return input;
|
|
6943
5251
|
}
|
|
6944
|
-
return input
|
|
5252
|
+
return slash(input).replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
6945
5253
|
}
|
|
6946
5254
|
__name(normalizeWindowsPath2, "normalizeWindowsPath");
|
|
6947
|
-
var _UNC_REGEX2 = /^[/\\]{2}/;
|
|
6948
|
-
var _DRIVE_LETTER_RE2 = /^[A-Z]:$/i;
|
|
6949
5255
|
function correctPath(path6) {
|
|
6950
5256
|
if (!path6 || path6.length === 0) {
|
|
6951
5257
|
return ".";
|
|
6952
5258
|
}
|
|
6953
5259
|
path6 = normalizeWindowsPath2(path6);
|
|
6954
|
-
const isUNCPath = path6.match(
|
|
5260
|
+
const isUNCPath = path6.match(UNC_REGEX);
|
|
6955
5261
|
const isPathAbsolute = isAbsolutePath(path6);
|
|
6956
|
-
const trailingSeparator = path6
|
|
5262
|
+
const trailingSeparator = path6.endsWith("/");
|
|
6957
5263
|
path6 = normalizeString2(path6, !isPathAbsolute);
|
|
6958
5264
|
if (path6.length === 0) {
|
|
6959
5265
|
if (isPathAbsolute) {
|
|
@@ -6964,7 +5270,7 @@ function correctPath(path6) {
|
|
|
6964
5270
|
if (trailingSeparator) {
|
|
6965
5271
|
path6 += "/";
|
|
6966
5272
|
}
|
|
6967
|
-
if (
|
|
5273
|
+
if (DRIVE_LETTER_REGEX.test(path6)) {
|
|
6968
5274
|
path6 += "/";
|
|
6969
5275
|
}
|
|
6970
5276
|
if (isUNCPath) {
|
|
@@ -6973,7 +5279,7 @@ function correctPath(path6) {
|
|
|
6973
5279
|
}
|
|
6974
5280
|
return `//${path6}`;
|
|
6975
5281
|
}
|
|
6976
|
-
return isPathAbsolute && !
|
|
5282
|
+
return !path6.startsWith("/") && isPathAbsolute && !DRIVE_LETTER_REGEX.test(path6) ? `/${path6}` : path6;
|
|
6977
5283
|
}
|
|
6978
5284
|
__name(correctPath, "correctPath");
|
|
6979
5285
|
function normalizeString2(path6, allowAboveRoot) {
|
|
@@ -7041,24 +5347,14 @@ __name(normalizeString2, "normalizeString");
|
|
|
7041
5347
|
// ../path/src/get-workspace-root.ts
|
|
7042
5348
|
init_esm_shims();
|
|
7043
5349
|
|
|
7044
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
7045
|
-
init_esm_shims();
|
|
7046
|
-
|
|
7047
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-K6PUXRK3.js
|
|
5350
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/index.js
|
|
7048
5351
|
init_esm_shims();
|
|
7049
5352
|
|
|
7050
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
5353
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
|
|
7051
5354
|
init_esm_shims();
|
|
7052
5355
|
|
|
7053
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
5356
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-RWBPUJIZ.js
|
|
7054
5357
|
init_esm_shims();
|
|
7055
|
-
var __defProp2 = Object.defineProperty;
|
|
7056
|
-
var __name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", {
|
|
7057
|
-
value,
|
|
7058
|
-
configurable: true
|
|
7059
|
-
}), "__name");
|
|
7060
|
-
|
|
7061
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.162.12_@storm-software+config@1.112.20/node_modules/@storm-software/config-tools/dist/chunk-NQFXB5CV.js
|
|
7062
5358
|
import { existsSync as existsSync2 } from "node:fs";
|
|
7063
5359
|
import { join } from "node:path";
|
|
7064
5360
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
@@ -7078,28 +5374,26 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
7078
5374
|
return void 0;
|
|
7079
5375
|
}
|
|
7080
5376
|
__name(findFolderUp, "findFolderUp");
|
|
7081
|
-
__name2(findFolderUp, "findFolderUp");
|
|
7082
5377
|
|
|
7083
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
5378
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-FRR2ZRWD.js
|
|
7084
5379
|
init_esm_shims();
|
|
7085
|
-
var
|
|
5380
|
+
var _DRIVE_LETTER_START_RE2 = /^[A-Za-z]:\//;
|
|
7086
5381
|
function normalizeWindowsPath3(input = "") {
|
|
7087
5382
|
if (!input) {
|
|
7088
5383
|
return input;
|
|
7089
5384
|
}
|
|
7090
|
-
return input.replace(/\\/g, "/").replace(
|
|
5385
|
+
return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE2, (r) => r.toUpperCase());
|
|
7091
5386
|
}
|
|
7092
5387
|
__name(normalizeWindowsPath3, "normalizeWindowsPath");
|
|
7093
|
-
|
|
7094
|
-
var _UNC_REGEX3 = /^[/\\]{2}/;
|
|
5388
|
+
var _UNC_REGEX2 = /^[/\\]{2}/;
|
|
7095
5389
|
var _IS_ABSOLUTE_RE2 = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
7096
|
-
var
|
|
7097
|
-
var correctPaths2 = /* @__PURE__ */
|
|
5390
|
+
var _DRIVE_LETTER_RE2 = /^[A-Za-z]:$/;
|
|
5391
|
+
var correctPaths2 = /* @__PURE__ */ __name(function(path6) {
|
|
7098
5392
|
if (!path6 || path6.length === 0) {
|
|
7099
5393
|
return ".";
|
|
7100
5394
|
}
|
|
7101
5395
|
path6 = normalizeWindowsPath3(path6);
|
|
7102
|
-
const isUNCPath = path6.match(
|
|
5396
|
+
const isUNCPath = path6.match(_UNC_REGEX2);
|
|
7103
5397
|
const isPathAbsolute = isAbsolute2(path6);
|
|
7104
5398
|
const trailingSeparator = path6[path6.length - 1] === "/";
|
|
7105
5399
|
path6 = normalizeString3(path6, !isPathAbsolute);
|
|
@@ -7112,7 +5406,7 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
|
|
|
7112
5406
|
if (trailingSeparator) {
|
|
7113
5407
|
path6 += "/";
|
|
7114
5408
|
}
|
|
7115
|
-
if (
|
|
5409
|
+
if (_DRIVE_LETTER_RE2.test(path6)) {
|
|
7116
5410
|
path6 += "/";
|
|
7117
5411
|
}
|
|
7118
5412
|
if (isUNCPath) {
|
|
@@ -7123,14 +5417,6 @@ var correctPaths2 = /* @__PURE__ */ __name2(function(path6) {
|
|
|
7123
5417
|
}
|
|
7124
5418
|
return isPathAbsolute && !isAbsolute2(path6) ? `/${path6}` : path6;
|
|
7125
5419
|
}, "correctPaths");
|
|
7126
|
-
function cwd() {
|
|
7127
|
-
if (typeof process !== "undefined" && typeof process.cwd === "function") {
|
|
7128
|
-
return process.cwd().replace(/\\/g, "/");
|
|
7129
|
-
}
|
|
7130
|
-
return "/";
|
|
7131
|
-
}
|
|
7132
|
-
__name(cwd, "cwd");
|
|
7133
|
-
__name2(cwd, "cwd");
|
|
7134
5420
|
function normalizeString3(path6, allowAboveRoot) {
|
|
7135
5421
|
let res = "";
|
|
7136
5422
|
let lastSegmentLength = 0;
|
|
@@ -7192,12 +5478,11 @@ function normalizeString3(path6, allowAboveRoot) {
|
|
|
7192
5478
|
return res;
|
|
7193
5479
|
}
|
|
7194
5480
|
__name(normalizeString3, "normalizeString");
|
|
7195
|
-
|
|
7196
|
-
var isAbsolute2 = /* @__PURE__ */ __name2(function(p) {
|
|
5481
|
+
var isAbsolute2 = /* @__PURE__ */ __name(function(p) {
|
|
7197
5482
|
return _IS_ABSOLUTE_RE2.test(p);
|
|
7198
5483
|
}, "isAbsolute");
|
|
7199
5484
|
|
|
7200
|
-
// ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
5485
|
+
// ../../node_modules/.pnpm/@storm-software+config-tools@1.173.0/node_modules/@storm-software/config-tools/dist/chunk-VLWSWYG7.js
|
|
7201
5486
|
var rootFiles = [
|
|
7202
5487
|
"storm-workspace.json",
|
|
7203
5488
|
"storm-workspace.json",
|
|
@@ -7247,70 +5532,1470 @@ function findWorkspaceRootSafe(pathInsideMonorepo) {
|
|
|
7247
5532
|
return correctPaths2(findFolderUp(pathInsideMonorepo ?? process.cwd(), rootFiles, rootDirectories));
|
|
7248
5533
|
}
|
|
7249
5534
|
__name(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
7250
|
-
__name2(findWorkspaceRootSafe, "findWorkspaceRootSafe");
|
|
7251
|
-
function findWorkspaceRoot(pathInsideMonorepo) {
|
|
7252
|
-
const result = findWorkspaceRootSafe(pathInsideMonorepo);
|
|
7253
|
-
if (!result) {
|
|
7254
|
-
throw new Error(`Cannot find workspace root upwards from known path. Files search list includes:
|
|
7255
|
-
${rootFiles.join("\n")}
|
|
7256
|
-
Path: ${pathInsideMonorepo ? pathInsideMonorepo : process.cwd()}`);
|
|
7257
|
-
}
|
|
7258
|
-
return result;
|
|
7259
|
-
}
|
|
7260
|
-
__name(findWorkspaceRoot, "findWorkspaceRoot");
|
|
7261
|
-
__name2(findWorkspaceRoot, "findWorkspaceRoot");
|
|
7262
5535
|
|
|
7263
|
-
//
|
|
5536
|
+
// ../../node_modules/.pnpm/@ltd+j-toml@1.38.0/node_modules/@ltd/j-toml/index.mjs
|
|
7264
5537
|
init_esm_shims();
|
|
7265
|
-
var
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
var
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
5538
|
+
var SyntaxError$1 = SyntaxError;
|
|
5539
|
+
var RangeError$1 = RangeError;
|
|
5540
|
+
var TypeError$1 = TypeError;
|
|
5541
|
+
var Error$1 = { if: Error }.if;
|
|
5542
|
+
var undefined$1 = void 0;
|
|
5543
|
+
var BigInt$1 = typeof BigInt === "undefined" ? undefined$1 : BigInt;
|
|
5544
|
+
var RegExp$1 = RegExp;
|
|
5545
|
+
var WeakMap$1 = WeakMap;
|
|
5546
|
+
var get = WeakMap.prototype.get;
|
|
5547
|
+
var set = WeakMap.prototype.set;
|
|
5548
|
+
var create$1 = Object.create;
|
|
5549
|
+
var isSafeInteger = Number.isSafeInteger;
|
|
5550
|
+
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
|
5551
|
+
var freeze = Object.freeze;
|
|
5552
|
+
var isPrototypeOf = Object.prototype.isPrototypeOf;
|
|
5553
|
+
var NULL = (
|
|
5554
|
+
/* j-globals: null.prototype (internal) */
|
|
5555
|
+
Object.seal ? /* @__PURE__ */ Object.preventExtensions(/* @__PURE__ */ Object.create(null)) : null
|
|
5556
|
+
);
|
|
5557
|
+
var bind = Function.prototype.bind;
|
|
5558
|
+
var test = RegExp.prototype.test;
|
|
5559
|
+
var exec = RegExp.prototype.exec;
|
|
5560
|
+
var apply$1 = Reflect.apply;
|
|
5561
|
+
var Proxy$1 = Proxy;
|
|
5562
|
+
var assign$1 = Object.assign;
|
|
5563
|
+
var Object$1 = Object;
|
|
5564
|
+
var floor = Math.floor;
|
|
5565
|
+
var isArray$1 = Array.isArray;
|
|
5566
|
+
var Infinity2 = 1 / 0;
|
|
5567
|
+
var fromCharCode = String.fromCharCode;
|
|
5568
|
+
var Array$1 = Array;
|
|
5569
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
5570
|
+
var propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
5571
|
+
var apply = Function.prototype.apply;
|
|
5572
|
+
var isEnum = /* @__PURE__ */ propertyIsEnumerable.call.bind(propertyIsEnumerable);
|
|
5573
|
+
var hasOwn = (
|
|
5574
|
+
/* j-globals: Object.hasOwn (polyfill) */
|
|
5575
|
+
Object$1.hasOwn || /* @__PURE__ */ function() {
|
|
5576
|
+
return hasOwnProperty.bind ? hasOwnProperty.call.bind(hasOwnProperty) : /* @__PURE__ */ __name(function hasOwn2(object, key) {
|
|
5577
|
+
return hasOwnProperty.call(object, key);
|
|
5578
|
+
}, "hasOwn");
|
|
5579
|
+
}()
|
|
5580
|
+
);
|
|
5581
|
+
var create = Object$1.create;
|
|
5582
|
+
function Descriptor(source) {
|
|
5583
|
+
var target = create(NULL);
|
|
5584
|
+
if (hasOwn(source, "value")) {
|
|
5585
|
+
target.value = source.value;
|
|
7275
5586
|
}
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
];
|
|
7279
|
-
if (ignoreCase) {
|
|
7280
|
-
names = names.map((name2) => name2.toLowerCase());
|
|
5587
|
+
if (hasOwn(source, "writable")) {
|
|
5588
|
+
target.writable = source.writable;
|
|
7281
5589
|
}
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
if (target) {
|
|
7285
|
-
return joinPaths(dir, target);
|
|
7286
|
-
}
|
|
7287
|
-
const parentDir = resolveParentPath(dir);
|
|
7288
|
-
if (parentDir === dir) {
|
|
7289
|
-
return void 0;
|
|
7290
|
-
}
|
|
7291
|
-
dir = parentDir;
|
|
5590
|
+
if (hasOwn(source, "get")) {
|
|
5591
|
+
target.get = source.get;
|
|
7292
5592
|
}
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
// ../path/src/is-root-dir.ts
|
|
7296
|
-
init_esm_shims();
|
|
7297
|
-
var isSystemRoot = /* @__PURE__ */ __name((dir) => {
|
|
7298
|
-
return Boolean(dir === "/" || dir === "c:\\" || dir === "C:\\");
|
|
7299
|
-
}, "isSystemRoot");
|
|
7300
|
-
|
|
7301
|
-
// ../path/src/get-workspace-root.ts
|
|
7302
|
-
var getWorkspaceRoot = /* @__PURE__ */ __name((dir = process.cwd()) => {
|
|
7303
|
-
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
7304
|
-
return process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH;
|
|
5593
|
+
if (hasOwn(source, "set")) {
|
|
5594
|
+
target.set = source.set;
|
|
7305
5595
|
}
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
return root;
|
|
5596
|
+
if (hasOwn(source, "enumerable")) {
|
|
5597
|
+
target.enumerable = source.enumerable;
|
|
7309
5598
|
}
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
5599
|
+
if (hasOwn(source, "configurable")) {
|
|
5600
|
+
target.configurable = source.configurable;
|
|
5601
|
+
}
|
|
5602
|
+
return target;
|
|
5603
|
+
}
|
|
5604
|
+
__name(Descriptor, "Descriptor");
|
|
5605
|
+
var Test = bind ? /* @__PURE__ */ bind.bind(test) : function(re) {
|
|
5606
|
+
return function(string) {
|
|
5607
|
+
return test.call(re, string);
|
|
5608
|
+
};
|
|
5609
|
+
};
|
|
5610
|
+
var Exec = bind ? /* @__PURE__ */ bind.bind(exec) : function(re) {
|
|
5611
|
+
return function(string) {
|
|
5612
|
+
return exec.call(re, string);
|
|
5613
|
+
};
|
|
5614
|
+
};
|
|
5615
|
+
function __PURE__(re) {
|
|
5616
|
+
var test2 = re.test = Test(re);
|
|
5617
|
+
var exec2 = re.exec = Exec(re);
|
|
5618
|
+
var source = test2.source = exec2.source = re.source;
|
|
5619
|
+
test2.unicode = exec2.unicode = re.unicode;
|
|
5620
|
+
test2.ignoreCase = exec2.ignoreCase = re.ignoreCase;
|
|
5621
|
+
test2.multiline = exec2.multiline = source.indexOf("^") < 0 && source.indexOf("$") < 0 ? null : re.multiline;
|
|
5622
|
+
test2.dotAll = exec2.dotAll = source.indexOf(".") < 0 ? null : re.dotAll;
|
|
5623
|
+
return re;
|
|
5624
|
+
}
|
|
5625
|
+
__name(__PURE__, "__PURE__");
|
|
5626
|
+
function theRegExp(re) {
|
|
5627
|
+
return /* @__PURE__ */ __PURE__(re);
|
|
5628
|
+
}
|
|
5629
|
+
__name(theRegExp, "theRegExp");
|
|
5630
|
+
var NT = /[\n\t]+/g;
|
|
5631
|
+
var ESCAPE = /\\./g;
|
|
5632
|
+
function graveAccentReplacer($$) {
|
|
5633
|
+
return $$ === "\\`" ? "`" : $$;
|
|
5634
|
+
}
|
|
5635
|
+
__name(graveAccentReplacer, "graveAccentReplacer");
|
|
5636
|
+
var includes = "".includes ? function(that, searchString) {
|
|
5637
|
+
return that.includes(searchString);
|
|
5638
|
+
} : function(that, searchString) {
|
|
5639
|
+
return that.indexOf(searchString) > -1;
|
|
5640
|
+
};
|
|
5641
|
+
function RE(template) {
|
|
5642
|
+
var U = this.U;
|
|
5643
|
+
var I = this.I;
|
|
5644
|
+
var M = this.M;
|
|
5645
|
+
var S = this.S;
|
|
5646
|
+
var raw = template.raw;
|
|
5647
|
+
var source = raw[0].replace(NT, "");
|
|
5648
|
+
var index = 1;
|
|
5649
|
+
var length = arguments.length;
|
|
5650
|
+
while (index !== length) {
|
|
5651
|
+
var value = arguments[index];
|
|
5652
|
+
if (typeof value === "string") {
|
|
5653
|
+
source += value;
|
|
5654
|
+
} else {
|
|
5655
|
+
var value_source = value.source;
|
|
5656
|
+
if (typeof value_source !== "string") {
|
|
5657
|
+
throw TypeError$1("source");
|
|
5658
|
+
}
|
|
5659
|
+
if (value.unicode === U) {
|
|
5660
|
+
throw SyntaxError$1("unicode");
|
|
5661
|
+
}
|
|
5662
|
+
if (value.ignoreCase === I) {
|
|
5663
|
+
throw SyntaxError$1("ignoreCase");
|
|
5664
|
+
}
|
|
5665
|
+
if (value.multiline === M && (includes(value_source, "^") || includes(value_source, "$"))) {
|
|
5666
|
+
throw SyntaxError$1("multiline");
|
|
5667
|
+
}
|
|
5668
|
+
if (value.dotAll === S && includes(value_source, ".")) {
|
|
5669
|
+
throw SyntaxError$1("dotAll");
|
|
5670
|
+
}
|
|
5671
|
+
source += value_source;
|
|
5672
|
+
}
|
|
5673
|
+
source += raw[index++].replace(NT, "");
|
|
5674
|
+
}
|
|
5675
|
+
var re = RegExp$1(U ? source = source.replace(ESCAPE, graveAccentReplacer) : source, this.flags);
|
|
5676
|
+
var test2 = re.test = Test(re);
|
|
5677
|
+
var exec2 = re.exec = Exec(re);
|
|
5678
|
+
test2.source = exec2.source = source;
|
|
5679
|
+
test2.unicode = exec2.unicode = !U;
|
|
5680
|
+
test2.ignoreCase = exec2.ignoreCase = !I;
|
|
5681
|
+
test2.multiline = exec2.multiline = includes(source, "^") || includes(source, "$") ? !M : null;
|
|
5682
|
+
test2.dotAll = exec2.dotAll = includes(source, ".") ? !S : null;
|
|
5683
|
+
return re;
|
|
5684
|
+
}
|
|
5685
|
+
__name(RE, "RE");
|
|
5686
|
+
var RE_bind = bind && /* @__PURE__ */ bind.bind(RE);
|
|
5687
|
+
function Context(flags) {
|
|
5688
|
+
return {
|
|
5689
|
+
U: !includes(flags, "u"),
|
|
5690
|
+
I: !includes(flags, "i"),
|
|
5691
|
+
M: !includes(flags, "m"),
|
|
5692
|
+
S: !includes(flags, "s"),
|
|
5693
|
+
flags
|
|
5694
|
+
};
|
|
5695
|
+
}
|
|
5696
|
+
__name(Context, "Context");
|
|
5697
|
+
var CONTEXT = /* @__PURE__ */ Context("");
|
|
5698
|
+
var newRegExp = Proxy$1 ? /* @__PURE__ */ new Proxy$1(RE, {
|
|
5699
|
+
apply: /* @__PURE__ */ __name(function(RE2, thisArg, args) {
|
|
5700
|
+
return apply$1(RE2, CONTEXT, args);
|
|
5701
|
+
}, "apply"),
|
|
5702
|
+
get: /* @__PURE__ */ __name(function(RE2, flags) {
|
|
5703
|
+
return RE_bind(Context(flags));
|
|
5704
|
+
}, "get"),
|
|
5705
|
+
defineProperty: /* @__PURE__ */ __name(function() {
|
|
5706
|
+
return false;
|
|
5707
|
+
}, "defineProperty"),
|
|
5708
|
+
preventExtensions: /* @__PURE__ */ __name(function() {
|
|
5709
|
+
return false;
|
|
5710
|
+
}, "preventExtensions")
|
|
5711
|
+
}) : /* @__PURE__ */ function() {
|
|
5712
|
+
RE.apply = RE.apply;
|
|
5713
|
+
var newRegExp2 = /* @__PURE__ */ __name(function() {
|
|
5714
|
+
return RE.apply(CONTEXT, arguments);
|
|
5715
|
+
}, "newRegExp");
|
|
5716
|
+
var d2 = 1;
|
|
5717
|
+
var g = d2 * 2;
|
|
5718
|
+
var i = g * 2;
|
|
5719
|
+
var m = i * 2;
|
|
5720
|
+
var s = i * 2;
|
|
5721
|
+
var u = s * 2;
|
|
5722
|
+
var y = u * 2;
|
|
5723
|
+
var flags = y * 2 - 1;
|
|
5724
|
+
while (flags--) {
|
|
5725
|
+
(function(context) {
|
|
5726
|
+
newRegExp2[context.flags] = function() {
|
|
5727
|
+
return RE.apply(context, arguments);
|
|
5728
|
+
};
|
|
5729
|
+
})(Context(
|
|
5730
|
+
(flags & d2 ? "" : "d") + (flags & g ? "" : "g") + (flags & i ? "" : "i") + (flags & m ? "" : "m") + (flags & s ? "" : "s") + (flags & u ? "" : "u") + (flags & y ? "" : "y")
|
|
5731
|
+
));
|
|
5732
|
+
}
|
|
5733
|
+
return freeze ? freeze(newRegExp2) : newRegExp2;
|
|
5734
|
+
}();
|
|
5735
|
+
var clearRegExp = "$_" in RegExp$1 ? /* @__PURE__ */ function() {
|
|
5736
|
+
var REGEXP = /^/;
|
|
5737
|
+
REGEXP.test = REGEXP.test;
|
|
5738
|
+
return /* @__PURE__ */ __name(function clearRegExp3(value) {
|
|
5739
|
+
REGEXP.test("");
|
|
5740
|
+
return value;
|
|
5741
|
+
}, "clearRegExp");
|
|
5742
|
+
}() : /* @__PURE__ */ __name(function clearRegExp2(value) {
|
|
5743
|
+
return value;
|
|
5744
|
+
}, "clearRegExp");
|
|
5745
|
+
var NEED_TO_ESCAPE_IN_REGEXP = /^[$()*+\-.?[\\\]^{|]/;
|
|
5746
|
+
var SURROGATE_PAIR = /^[\uD800-\uDBFF][\uDC00-\uDFFF]/;
|
|
5747
|
+
var GROUP = /* @__PURE__ */ create$1(NULL);
|
|
5748
|
+
function groupify(branches, uFlag, noEscape) {
|
|
5749
|
+
var group = create$1(NULL);
|
|
5750
|
+
var appendBranch = uFlag ? appendPointBranch : appendCodeBranch;
|
|
5751
|
+
for (var length = branches.length, index = 0; index < length; ++index) {
|
|
5752
|
+
appendBranch(group, branches[index]);
|
|
5753
|
+
}
|
|
5754
|
+
return sourcify(group, !noEscape);
|
|
5755
|
+
}
|
|
5756
|
+
__name(groupify, "groupify");
|
|
5757
|
+
function appendPointBranch(group, branch) {
|
|
5758
|
+
if (branch) {
|
|
5759
|
+
var character = SURROGATE_PAIR.test(branch) ? branch.slice(0, 2) : branch.charAt(0);
|
|
5760
|
+
appendPointBranch(group[character] || (group[character] = create$1(NULL)), branch.slice(character.length));
|
|
5761
|
+
} else {
|
|
5762
|
+
group[""] = GROUP;
|
|
5763
|
+
}
|
|
5764
|
+
}
|
|
5765
|
+
__name(appendPointBranch, "appendPointBranch");
|
|
5766
|
+
function appendCodeBranch(group, branch) {
|
|
5767
|
+
if (branch) {
|
|
5768
|
+
var character = branch.charAt(0);
|
|
5769
|
+
appendCodeBranch(group[character] || (group[character] = create$1(NULL)), branch.slice(1));
|
|
5770
|
+
} else {
|
|
5771
|
+
group[""] = GROUP;
|
|
5772
|
+
}
|
|
5773
|
+
}
|
|
5774
|
+
__name(appendCodeBranch, "appendCodeBranch");
|
|
5775
|
+
function sourcify(group, needEscape) {
|
|
5776
|
+
var branches = [];
|
|
5777
|
+
var singleCharactersBranch = [];
|
|
5778
|
+
var noEmptyBranch = true;
|
|
5779
|
+
for (var character in group) {
|
|
5780
|
+
if (character) {
|
|
5781
|
+
var sub_branches = sourcify(group[character], needEscape);
|
|
5782
|
+
if (needEscape && NEED_TO_ESCAPE_IN_REGEXP.test(character)) {
|
|
5783
|
+
character = "\\" + character;
|
|
5784
|
+
}
|
|
5785
|
+
sub_branches ? branches.push(character + sub_branches) : singleCharactersBranch.push(character);
|
|
5786
|
+
} else {
|
|
5787
|
+
noEmptyBranch = false;
|
|
5788
|
+
}
|
|
5789
|
+
}
|
|
5790
|
+
singleCharactersBranch.length && branches.unshift(singleCharactersBranch.length === 1 ? singleCharactersBranch[0] : "[" + singleCharactersBranch.join("") + "]");
|
|
5791
|
+
return branches.length === 0 ? "" : (branches.length === 1 && (singleCharactersBranch.length || noEmptyBranch) ? branches[0] : "(?:" + branches.join("|") + ")") + (noEmptyBranch ? "" : "?");
|
|
5792
|
+
}
|
|
5793
|
+
__name(sourcify, "sourcify");
|
|
5794
|
+
var WeakSet$1 = WeakSet;
|
|
5795
|
+
var has = WeakSet.prototype.has;
|
|
5796
|
+
var add = WeakSet.prototype.add;
|
|
5797
|
+
var del = WeakSet.prototype["delete"];
|
|
5798
|
+
var keys = Object.keys;
|
|
5799
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
5800
|
+
var Null$1 = (
|
|
5801
|
+
/* j-globals: null (internal) */
|
|
5802
|
+
/* @__PURE__ */ function() {
|
|
5803
|
+
var assign = Object.assign || /* @__PURE__ */ __name(function assign2(target, source) {
|
|
5804
|
+
var keys$1, index, key;
|
|
5805
|
+
for (keys$1 = keys(source), index = 0; index < keys$1.length; ++index) {
|
|
5806
|
+
key = keys$1[index];
|
|
5807
|
+
target[key] = source[key];
|
|
5808
|
+
}
|
|
5809
|
+
if (getOwnPropertySymbols) {
|
|
5810
|
+
for (keys$1 = getOwnPropertySymbols(source), index = 0; index < keys$1.length; ++index) {
|
|
5811
|
+
key = keys$1[index];
|
|
5812
|
+
if (isEnum(source, key)) {
|
|
5813
|
+
target[key] = source[key];
|
|
5814
|
+
}
|
|
5815
|
+
}
|
|
5816
|
+
}
|
|
5817
|
+
return target;
|
|
5818
|
+
}, "assign");
|
|
5819
|
+
function Nullify(constructor) {
|
|
5820
|
+
delete constructor.prototype.constructor;
|
|
5821
|
+
freeze(constructor.prototype);
|
|
5822
|
+
return constructor;
|
|
5823
|
+
}
|
|
5824
|
+
__name(Nullify, "Nullify");
|
|
5825
|
+
function Null(origin) {
|
|
5826
|
+
return origin === undefined$1 ? this : typeof origin === "function" ? /* @__PURE__ */ Nullify(origin) : /* @__PURE__ */ assign(/* @__PURE__ */ create(NULL), origin);
|
|
5827
|
+
}
|
|
5828
|
+
__name(Null, "Null");
|
|
5829
|
+
delete Null.name;
|
|
5830
|
+
Null.prototype = null;
|
|
5831
|
+
freeze(Null);
|
|
5832
|
+
return Null;
|
|
5833
|
+
}()
|
|
5834
|
+
);
|
|
5835
|
+
var is = Object.is;
|
|
5836
|
+
var Object_defineProperties = Object.defineProperties;
|
|
5837
|
+
var fromEntries = Object.fromEntries;
|
|
5838
|
+
var Reflect_construct = Reflect.construct;
|
|
5839
|
+
var Reflect_defineProperty = Reflect.defineProperty;
|
|
5840
|
+
var Reflect_deleteProperty = Reflect.deleteProperty;
|
|
5841
|
+
var ownKeys = Reflect.ownKeys;
|
|
5842
|
+
var Keeper = /* @__PURE__ */ __name(() => [], "Keeper");
|
|
5843
|
+
var newWeakMap = /* @__PURE__ */ __name(() => {
|
|
5844
|
+
const weakMap = new WeakMap$1();
|
|
5845
|
+
weakMap.has = weakMap.has;
|
|
5846
|
+
weakMap.get = weakMap.get;
|
|
5847
|
+
weakMap.set = weakMap.set;
|
|
5848
|
+
return weakMap;
|
|
5849
|
+
}, "newWeakMap");
|
|
5850
|
+
var target2keeper = /* @__PURE__ */ newWeakMap();
|
|
5851
|
+
var proxy2target = /* @__PURE__ */ newWeakMap();
|
|
5852
|
+
var target2proxy = /* @__PURE__ */ newWeakMap();
|
|
5853
|
+
var handlers = /* @__PURE__ */ assign$1(create$1(NULL), {
|
|
5854
|
+
defineProperty: /* @__PURE__ */ __name((target, key, descriptor) => {
|
|
5855
|
+
if (hasOwn(target, key)) {
|
|
5856
|
+
return Reflect_defineProperty(target, key, assign$1(create$1(NULL), descriptor));
|
|
5857
|
+
}
|
|
5858
|
+
if (Reflect_defineProperty(target, key, assign$1(create$1(NULL), descriptor))) {
|
|
5859
|
+
const keeper = target2keeper.get(target);
|
|
5860
|
+
keeper[keeper.length] = key;
|
|
5861
|
+
return true;
|
|
5862
|
+
}
|
|
5863
|
+
return false;
|
|
5864
|
+
}, "defineProperty"),
|
|
5865
|
+
deleteProperty: /* @__PURE__ */ __name((target, key) => {
|
|
5866
|
+
if (Reflect_deleteProperty(target, key)) {
|
|
5867
|
+
const keeper = target2keeper.get(target);
|
|
5868
|
+
const index = keeper.indexOf(key);
|
|
5869
|
+
index < 0 || --keeper.copyWithin(index, index + 1).length;
|
|
5870
|
+
return true;
|
|
5871
|
+
}
|
|
5872
|
+
return false;
|
|
5873
|
+
}, "deleteProperty"),
|
|
5874
|
+
ownKeys: /* @__PURE__ */ __name((target) => target2keeper.get(target), "ownKeys"),
|
|
5875
|
+
construct: /* @__PURE__ */ __name((target, args, newTarget) => orderify(Reflect_construct(target, args, newTarget)), "construct"),
|
|
5876
|
+
apply: /* @__PURE__ */ __name((target, thisArg, args) => orderify(apply$1(target, thisArg, args)), "apply")
|
|
5877
|
+
});
|
|
5878
|
+
var newProxy = /* @__PURE__ */ __name((target, keeper) => {
|
|
5879
|
+
target2keeper.set(target, keeper);
|
|
5880
|
+
const proxy = new Proxy$1(target, handlers);
|
|
5881
|
+
proxy2target.set(proxy, target);
|
|
5882
|
+
return proxy;
|
|
5883
|
+
}, "newProxy");
|
|
5884
|
+
var orderify = /* @__PURE__ */ __name((object) => {
|
|
5885
|
+
if (proxy2target.has(object)) {
|
|
5886
|
+
return object;
|
|
5887
|
+
}
|
|
5888
|
+
let proxy = target2proxy.get(object);
|
|
5889
|
+
if (proxy) {
|
|
5890
|
+
return proxy;
|
|
5891
|
+
}
|
|
5892
|
+
proxy = newProxy(object, assign$1(Keeper(), ownKeys(object)));
|
|
5893
|
+
target2proxy.set(object, proxy);
|
|
5894
|
+
return proxy;
|
|
5895
|
+
}, "orderify");
|
|
5896
|
+
var map_has = WeakMap.prototype.has;
|
|
5897
|
+
var map_del = WeakMap.prototype["delete"];
|
|
5898
|
+
var INLINES = new WeakMap$1();
|
|
5899
|
+
var SECTIONS = new WeakSet$1();
|
|
5900
|
+
var ofInline = /* @__PURE__ */ get.bind(INLINES);
|
|
5901
|
+
var isSection = /* @__PURE__ */ has.bind(SECTIONS);
|
|
5902
|
+
var tables = new WeakSet$1();
|
|
5903
|
+
var implicitTables = new WeakSet$1();
|
|
5904
|
+
var pairs = new WeakSet$1();
|
|
5905
|
+
var NONE = [];
|
|
5906
|
+
var sourcePath = "";
|
|
5907
|
+
var sourceLines = NONE;
|
|
5908
|
+
var lineIndex = -1;
|
|
5909
|
+
var throws = /* @__PURE__ */ __name((error) => {
|
|
5910
|
+
throw error;
|
|
5911
|
+
}, "throws");
|
|
5912
|
+
var where = /* @__PURE__ */ __name((pre, rowIndex = lineIndex, columnNumber = 0) => sourceLines === NONE ? "" : sourcePath ? `
|
|
5913
|
+
at (${sourcePath}:${rowIndex + 1}:${columnNumber})` : `${pre}line ${rowIndex + 1}: ${sourceLines[rowIndex]}`, "where");
|
|
5914
|
+
var Whitespace = /[ \t]/;
|
|
5915
|
+
var { exec: VALUE_REST_exec } = /* @__PURE__ */ newRegExp.s`
|
|
5916
|
+
^
|
|
5917
|
+
(
|
|
5918
|
+
(?:\d\d\d\d-\d\d-\d\d \d)?
|
|
5919
|
+
[\w\-+.:]+
|
|
5920
|
+
)
|
|
5921
|
+
${Whitespace}*
|
|
5922
|
+
(.*)
|
|
5923
|
+
$`.valueOf();
|
|
5924
|
+
var { exec: LITERAL_STRING_exec } = /* @__PURE__ */ newRegExp.s`
|
|
5925
|
+
^
|
|
5926
|
+
'([^']*)'
|
|
5927
|
+
${Whitespace}*
|
|
5928
|
+
(.*)`.valueOf();
|
|
5929
|
+
var { exec: MULTI_LINE_LITERAL_STRING_0_1_2 } = /* @__PURE__ */ newRegExp.s`
|
|
5930
|
+
^
|
|
5931
|
+
(.*?)
|
|
5932
|
+
'''('{0,2})
|
|
5933
|
+
${Whitespace}*
|
|
5934
|
+
(.*)`.valueOf();
|
|
5935
|
+
var { exec: MULTI_LINE_LITERAL_STRING_0 } = /* @__PURE__ */ newRegExp.s`
|
|
5936
|
+
^
|
|
5937
|
+
(.*?)
|
|
5938
|
+
'''()
|
|
5939
|
+
${Whitespace}*
|
|
5940
|
+
(.*)`.valueOf();
|
|
5941
|
+
var Tag = /[^\x00-\x1F"#'()<>[\\\]`{}\x7F]+/;
|
|
5942
|
+
var { exec: KEY_VALUE_PAIR_exec } = /* @__PURE__ */ newRegExp.s`
|
|
5943
|
+
^
|
|
5944
|
+
${Whitespace}*
|
|
5945
|
+
=
|
|
5946
|
+
${Whitespace}*
|
|
5947
|
+
(?:
|
|
5948
|
+
<(${Tag})>
|
|
5949
|
+
${Whitespace}*
|
|
5950
|
+
)?
|
|
5951
|
+
(.*)
|
|
5952
|
+
$`.valueOf();
|
|
5953
|
+
var { exec: _VALUE_PAIR_exec } = /* @__PURE__ */ newRegExp.s`
|
|
5954
|
+
^
|
|
5955
|
+
<(${Tag})>
|
|
5956
|
+
${Whitespace}*
|
|
5957
|
+
(.*)
|
|
5958
|
+
$`.valueOf();
|
|
5959
|
+
var { exec: TAG_REST_exec } = /* @__PURE__ */ newRegExp.s`
|
|
5960
|
+
^
|
|
5961
|
+
<(${Tag})>
|
|
5962
|
+
${Whitespace}*
|
|
5963
|
+
(.*)
|
|
5964
|
+
$`.valueOf();
|
|
5965
|
+
var MULTI_LINE_BASIC_STRING = theRegExp(/[^\\"]+|\\.?|"(?!"")"?/sy);
|
|
5966
|
+
var BASIC_STRING_TAB______ = theRegExp(/[^\\"\x00-\x08\x0B-\x1F\x7F]+|\\(?:[btnfr"\\]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y);
|
|
5967
|
+
var BASIC_STRING__________ = theRegExp(/[^\\"\x00-\x08\x0B-\x1F\x7F]+|\\(?:[btnfr"\\]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y);
|
|
5968
|
+
var BASIC_STRING_DEL______ = theRegExp(/[^\\"\x00-\x08\x0B-\x1F]+|\\(?:[btnfr"\\]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y);
|
|
5969
|
+
var BASIC_STRING_DEL_SLASH = theRegExp(/[^\\"\x00-\x08\x0B-\x1F]+|\\(?:[btnfr"\\/]|u[\dA-Fa-f]{4}|U[\dA-Fa-f]{8})/y);
|
|
5970
|
+
var { test: IS_DOT_KEY } = theRegExp(/^[ \t]*\./);
|
|
5971
|
+
var { exec: BARE_KEY_STRICT } = theRegExp(/^[\w-]+/);
|
|
5972
|
+
var { exec: BARE_KEY_FREE } = theRegExp(/^[^ \t#=[\]'".]+(?:[ \t]+[^ \t#=[\]'".]+)*/);
|
|
5973
|
+
var { exec: LITERAL_KEY____ } = theRegExp(/^'[^'\x00-\x08\x0B-\x1F\x7F]*'/);
|
|
5974
|
+
var { exec: LITERAL_KEY_DEL } = theRegExp(/^'[^'\x00-\x08\x0B-\x1F]*'/);
|
|
5975
|
+
var { test: CONTROL_CHARACTER_EXCLUDE_TAB____ } = theRegExp(/[\x00-\x08\x0B-\x1F\x7F]/);
|
|
5976
|
+
var { test: CONTROL_CHARACTER_EXCLUDE_TAB_DEL } = theRegExp(/[\x00-\x08\x0B-\x1F]/);
|
|
5977
|
+
var NUM = /* @__PURE__ */ newRegExp`
|
|
5978
|
+
(?:
|
|
5979
|
+
0
|
|
5980
|
+
(?:
|
|
5981
|
+
b[01][_01]*
|
|
5982
|
+
|
|
|
5983
|
+
o[0-7][_0-7]*
|
|
5984
|
+
|
|
|
5985
|
+
x[\dA-Fa-f][_\dA-Fa-f]*
|
|
5986
|
+
|
|
|
5987
|
+
(?:\.\d[_\d]*)?(?:[Ee]-?\d[_\d]*)?
|
|
5988
|
+
)
|
|
5989
|
+
|
|
|
5990
|
+
[1-9][_\d]*
|
|
5991
|
+
(?:\.\d[_\d]*)?(?:[Ee]-?\d[_\d]*)?
|
|
5992
|
+
|
|
|
5993
|
+
inf
|
|
5994
|
+
|
|
|
5995
|
+
nan
|
|
5996
|
+
)
|
|
5997
|
+
`.valueOf();
|
|
5998
|
+
var { test: IS_AMAZING } = /* @__PURE__ */ newRegExp`
|
|
5999
|
+
^(?:
|
|
6000
|
+
-?${NUM}
|
|
6001
|
+
(?:-${NUM})*
|
|
6002
|
+
|
|
|
6003
|
+
true
|
|
6004
|
+
|
|
|
6005
|
+
false
|
|
6006
|
+
)$
|
|
6007
|
+
`.valueOf();
|
|
6008
|
+
var { test: BAD_DXOB } = /* @__PURE__ */ newRegExp`_(?![\dA-Fa-f])`.valueOf();
|
|
6009
|
+
var isAmazing = /* @__PURE__ */ __name((keys2) => IS_AMAZING(keys2) && !BAD_DXOB(keys2), "isAmazing");
|
|
6010
|
+
var Keys = class KeysRegExp extends RegExp$1 {
|
|
6011
|
+
static {
|
|
6012
|
+
__name(this, "KeysRegExp");
|
|
6013
|
+
}
|
|
6014
|
+
constructor(keys2) {
|
|
6015
|
+
super(`^${groupify(keys2)}$`);
|
|
6016
|
+
let maxLength = -1;
|
|
6017
|
+
for (let index = keys2.length; index; ) {
|
|
6018
|
+
const { length } = keys2[--index];
|
|
6019
|
+
if (length > maxLength) {
|
|
6020
|
+
maxLength = length;
|
|
6021
|
+
}
|
|
6022
|
+
}
|
|
6023
|
+
this.lastIndex = maxLength + 1;
|
|
6024
|
+
return this;
|
|
6025
|
+
}
|
|
6026
|
+
test(key) {
|
|
6027
|
+
return key.length < this.lastIndex && super.test(key);
|
|
6028
|
+
}
|
|
6029
|
+
};
|
|
6030
|
+
var isKeys = /* @__PURE__ */ isPrototypeOf.bind(/* @__PURE__ */ freeze(Keys.prototype));
|
|
6031
|
+
var zeroDatetime;
|
|
6032
|
+
var arrayTypes = new WeakMap$1();
|
|
6033
|
+
var arrayTypes_get = /* @__PURE__ */ get.bind(arrayTypes);
|
|
6034
|
+
var arrayTypes_set = /* @__PURE__ */ set.bind(arrayTypes);
|
|
6035
|
+
var As = /* @__PURE__ */ __name(() => {
|
|
6036
|
+
const as = /* @__PURE__ */ __name((array) => {
|
|
6037
|
+
const got = arrayTypes_get(array);
|
|
6038
|
+
got ? got === as || throws(TypeError$1(`Types in Array must be same` + where(". Check "))) : arrayTypes_set(array, as);
|
|
6039
|
+
return array;
|
|
6040
|
+
}, "as");
|
|
6041
|
+
return as;
|
|
6042
|
+
}, "As");
|
|
6043
|
+
var AS_TYPED = {
|
|
6044
|
+
asNulls: As(),
|
|
6045
|
+
asStrings: As(),
|
|
6046
|
+
asTables: As(),
|
|
6047
|
+
asArrays: As(),
|
|
6048
|
+
asBooleans: As(),
|
|
6049
|
+
asFloats: As(),
|
|
6050
|
+
asIntegers: As(),
|
|
6051
|
+
asOffsetDateTimes: As(),
|
|
6052
|
+
asLocalDateTimes: As(),
|
|
6053
|
+
asLocalDates: As(),
|
|
6054
|
+
asLocalTimes: As()
|
|
6055
|
+
};
|
|
6056
|
+
var isView = ArrayBuffer.isView;
|
|
6057
|
+
var TextDecoder$1 = TextDecoder;
|
|
6058
|
+
var Symbol$1 = Symbol;
|
|
6059
|
+
var previous = Symbol$1("previous");
|
|
6060
|
+
var _literal = Symbol$1("_literal");
|
|
6061
|
+
var arrays = new WeakSet$1();
|
|
6062
|
+
var staticalArrays = new WeakSet$1();
|
|
6063
|
+
var NativeDate = Date;
|
|
6064
|
+
var parse$2 = Date.parse;
|
|
6065
|
+
var preventExtensions = Object.preventExtensions;
|
|
6066
|
+
var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors;
|
|
6067
|
+
var defineProperties = (
|
|
6068
|
+
/* j-globals: null.defineProperties (internal) */
|
|
6069
|
+
/* @__PURE__ */ __name(function defineProperties2(object, descriptorMap) {
|
|
6070
|
+
var created = create$1(NULL);
|
|
6071
|
+
var names = keys(descriptorMap);
|
|
6072
|
+
for (var length = names.length, index = 0; index < length; ++index) {
|
|
6073
|
+
var name = names[index];
|
|
6074
|
+
created[name] = Descriptor(descriptorMap[name]);
|
|
6075
|
+
}
|
|
6076
|
+
if (getOwnPropertySymbols) {
|
|
6077
|
+
var symbols = getOwnPropertySymbols(descriptorMap);
|
|
6078
|
+
for (length = symbols.length, index = 0; index < length; ++index) {
|
|
6079
|
+
var symbol = symbols[index];
|
|
6080
|
+
if (isEnum(descriptorMap, symbol)) {
|
|
6081
|
+
created[symbol] = Descriptor(descriptorMap[symbol]);
|
|
6082
|
+
}
|
|
6083
|
+
}
|
|
6084
|
+
}
|
|
6085
|
+
return Object_defineProperties(object, created);
|
|
6086
|
+
}, "defineProperties")
|
|
6087
|
+
);
|
|
6088
|
+
var fpc = /* @__PURE__ */ __name((c) => {
|
|
6089
|
+
freeze(freeze(c).prototype);
|
|
6090
|
+
return c;
|
|
6091
|
+
}, "fpc");
|
|
6092
|
+
var _29_ = /(?:0[1-9]|1\d|2\d)/;
|
|
6093
|
+
var _30_ = /(?:0[1-9]|[12]\d|30)/;
|
|
6094
|
+
var _31_ = /(?:0[1-9]|[12]\d|3[01])/;
|
|
6095
|
+
var _23_ = /(?:[01]\d|2[0-3])/;
|
|
6096
|
+
var _59_ = /[0-5]\d/;
|
|
6097
|
+
var YMD = /* @__PURE__ */ newRegExp`
|
|
6098
|
+
\d\d\d\d-
|
|
6099
|
+
(?:
|
|
6100
|
+
0
|
|
6101
|
+
(?:
|
|
6102
|
+
[13578]-${_31_}
|
|
6103
|
+
|
|
|
6104
|
+
[469]-${_30_}
|
|
6105
|
+
|
|
|
6106
|
+
2-${_29_}
|
|
6107
|
+
)
|
|
6108
|
+
|
|
|
6109
|
+
1
|
|
6110
|
+
(?:
|
|
6111
|
+
[02]-${_31_}
|
|
6112
|
+
|
|
|
6113
|
+
1-${_30_}
|
|
6114
|
+
)
|
|
6115
|
+
)
|
|
6116
|
+
`.valueOf();
|
|
6117
|
+
var HMS = /* @__PURE__ */ newRegExp`
|
|
6118
|
+
${_23_}:${_59_}:${_59_}
|
|
6119
|
+
`.valueOf();
|
|
6120
|
+
var OFFSET$ = /(?:[Zz]|[+-]\d\d:\d\d)$/;
|
|
6121
|
+
var { exec: Z_exec } = theRegExp(/(([+-])\d\d):(\d\d)$/);
|
|
6122
|
+
var { exec: OFFSET_DATETIME_exec } = /* @__PURE__ */ newRegExp`
|
|
6123
|
+
^
|
|
6124
|
+
${YMD}
|
|
6125
|
+
[Tt ]
|
|
6126
|
+
${HMS}
|
|
6127
|
+
(?:\.\d{1,3}(\d*?)0*)?
|
|
6128
|
+
(?:[Zz]|[+-]${_23_}:${_59_})
|
|
6129
|
+
$`.valueOf();
|
|
6130
|
+
var { exec: OFFSET_DATETIME_ZERO_exec } = /* @__PURE__ */ newRegExp`
|
|
6131
|
+
^
|
|
6132
|
+
${YMD}
|
|
6133
|
+
[Tt ]
|
|
6134
|
+
${HMS}
|
|
6135
|
+
()
|
|
6136
|
+
[Zz]
|
|
6137
|
+
$`.valueOf();
|
|
6138
|
+
var { test: IS_LOCAL_DATETIME } = /* @__PURE__ */ newRegExp`
|
|
6139
|
+
^
|
|
6140
|
+
${YMD}
|
|
6141
|
+
[Tt ]
|
|
6142
|
+
${HMS}
|
|
6143
|
+
(?:\.\d+)?
|
|
6144
|
+
$`.valueOf();
|
|
6145
|
+
var { test: IS_LOCAL_DATE } = /* @__PURE__ */ newRegExp`
|
|
6146
|
+
^
|
|
6147
|
+
${YMD}
|
|
6148
|
+
$`.valueOf();
|
|
6149
|
+
var { test: IS_LOCAL_TIME } = /* @__PURE__ */ newRegExp`
|
|
6150
|
+
^
|
|
6151
|
+
${HMS}
|
|
6152
|
+
(?:\.\d+)?
|
|
6153
|
+
$`.valueOf();
|
|
6154
|
+
var T = /[ t]/;
|
|
6155
|
+
var DELIMITER_DOT = /[-T:.]/g;
|
|
6156
|
+
var DOT_ZERO = /\.?0+$/;
|
|
6157
|
+
var ZERO = /\.(\d*?)0+$/;
|
|
6158
|
+
var zeroReplacer = /* @__PURE__ */ __name((match, p1) => p1, "zeroReplacer");
|
|
6159
|
+
var Datetime = /* @__PURE__ */ (() => {
|
|
6160
|
+
const Datetime2 = /* @__PURE__ */ __name(function() {
|
|
6161
|
+
return this;
|
|
6162
|
+
}, "Datetime");
|
|
6163
|
+
const descriptors = Null$1(null);
|
|
6164
|
+
{
|
|
6165
|
+
const descriptor = Null$1(null);
|
|
6166
|
+
for (const key of ownKeys(NativeDate.prototype)) {
|
|
6167
|
+
key === "constructor" || key === "toJSON" || (descriptors[key] = descriptor);
|
|
6168
|
+
}
|
|
6169
|
+
}
|
|
6170
|
+
Datetime2.prototype = preventExtensions(create$1(NativeDate.prototype, descriptors));
|
|
6171
|
+
return freeze(Datetime2);
|
|
6172
|
+
})();
|
|
6173
|
+
var Value = /* @__PURE__ */ __name((ISOString) => ISOString.replace(ZERO, zeroReplacer).replace(DELIMITER_DOT, ""), "Value");
|
|
6174
|
+
var d = /./gs;
|
|
6175
|
+
var d2u = /* @__PURE__ */ __name((d2) => "\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009"[d2], "d2u");
|
|
6176
|
+
var ValueOFFSET = /* @__PURE__ */ __name((time, more) => time < 0 ? ("" + (time + 6216730554e4)).replace(d, d2u).padStart(14, "\u2000") + more.replace(d, d2u) + time : more ? (time + ".").padStart(16, "0") + more : ("" + time).padStart(15, "0"), "ValueOFFSET");
|
|
6177
|
+
var validateLeap = /* @__PURE__ */ __name((literal) => {
|
|
6178
|
+
if (literal.startsWith("02-29", 5)) {
|
|
6179
|
+
const year = +literal.slice(0, 4);
|
|
6180
|
+
return year & 3 ? false : year % 100 ? true : year % 400 ? false : year % 3200 ? true : false;
|
|
6181
|
+
}
|
|
6182
|
+
return true;
|
|
6183
|
+
}, "validateLeap");
|
|
6184
|
+
var { test: VALIDATE_LEAP } = /* @__PURE__ */ newRegExp.s`^.....(?:06.30|12.31).23:59:59`.valueOf();
|
|
6185
|
+
var DATE$1 = /* @__PURE__ */ defineProperties(new NativeDate(0), /* @__PURE__ */ getOwnPropertyDescriptors(NativeDate.prototype));
|
|
6186
|
+
var OffsetDateTime_ISOString = Symbol$1("OffsetDateTime_ISOString");
|
|
6187
|
+
var OffsetDateTime_value = Symbol$1("OffsetDateTime_value");
|
|
6188
|
+
var OffsetDateTime_use = /* @__PURE__ */ __name((that, $ = 0) => {
|
|
6189
|
+
DATE$1.setTime(+that[OffsetDateTime_value] + $);
|
|
6190
|
+
return DATE$1;
|
|
6191
|
+
}, "OffsetDateTime_use");
|
|
6192
|
+
var OffsetDateTime = /* @__PURE__ */ fpc(class OffsetDateTime2 extends Datetime {
|
|
6193
|
+
static {
|
|
6194
|
+
__name(this, "OffsetDateTime");
|
|
6195
|
+
}
|
|
6196
|
+
[OffsetDateTime_ISOString];
|
|
6197
|
+
[OffsetDateTime_value];
|
|
6198
|
+
get [Symbol$1.toStringTag]() {
|
|
6199
|
+
return "OffsetDateTime";
|
|
6200
|
+
}
|
|
6201
|
+
valueOf() {
|
|
6202
|
+
return this[OffsetDateTime_value];
|
|
6203
|
+
}
|
|
6204
|
+
toISOString() {
|
|
6205
|
+
return this[OffsetDateTime_ISOString];
|
|
6206
|
+
}
|
|
6207
|
+
constructor(literal) {
|
|
6208
|
+
validateLeap(literal) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(" at ")));
|
|
6209
|
+
const with60 = literal.startsWith("60", 17);
|
|
6210
|
+
let without60 = with60 ? literal.slice(0, 17) + "59" + literal.slice(19) : literal;
|
|
6211
|
+
const { 1: more = "" } = (zeroDatetime ? OFFSET_DATETIME_ZERO_exec(without60) : OFFSET_DATETIME_exec(without60)) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(" at ")));
|
|
6212
|
+
const time = parse$2(without60 = without60.replace(T, "T").replace("z", "Z"));
|
|
6213
|
+
if (with60) {
|
|
6214
|
+
DATE$1.setTime(time);
|
|
6215
|
+
VALIDATE_LEAP(DATE$1.toISOString()) || throws(SyntaxError$1(`Invalid Offset Date-Time ${literal}` + where(" at ")));
|
|
6216
|
+
}
|
|
6217
|
+
super();
|
|
6218
|
+
this[OffsetDateTime_ISOString] = without60;
|
|
6219
|
+
this[OffsetDateTime_value] = ValueOFFSET(time, more);
|
|
6220
|
+
return this;
|
|
6221
|
+
}
|
|
6222
|
+
getUTCFullYear() {
|
|
6223
|
+
return OffsetDateTime_use(this).getUTCFullYear();
|
|
6224
|
+
}
|
|
6225
|
+
///get year () :FullYear { return OffsetDateTime_get(this, 0, 4); }
|
|
6226
|
+
///set year (value :FullYear) { OffsetDateTime_set(this, 0, 4, value, true); }
|
|
6227
|
+
getUTCMonth() {
|
|
6228
|
+
return OffsetDateTime_use(this).getUTCMonth();
|
|
6229
|
+
}
|
|
6230
|
+
///get month () { return OffsetDateTime_get(this, 5, 7); }
|
|
6231
|
+
///set month (value) { OffsetDateTime_set(this, 5, 7, value, true); }
|
|
6232
|
+
getUTCDate() {
|
|
6233
|
+
return OffsetDateTime_use(this).getUTCDate();
|
|
6234
|
+
}
|
|
6235
|
+
///get day () :Date { return OffsetDateTime_get(this, 8, 10); }
|
|
6236
|
+
///set day (value :Date) { OffsetDateTime_set(this, 8, 10, value, true); }
|
|
6237
|
+
getUTCHours() {
|
|
6238
|
+
return OffsetDateTime_use(this).getUTCHours();
|
|
6239
|
+
}
|
|
6240
|
+
///get hour () :Hours { return OffsetDateTime_get(this, 11, 13); }
|
|
6241
|
+
///set hour (value :Hours) { OffsetDateTime_set(this, 11, 13, value, true); }
|
|
6242
|
+
getUTCMinutes() {
|
|
6243
|
+
return OffsetDateTime_use(this).getUTCMinutes();
|
|
6244
|
+
}
|
|
6245
|
+
///get minute () :Minutes { return OffsetDateTime_get(this, 14, 16); }
|
|
6246
|
+
///set minute (value :Minutes) { OffsetDateTime_set(this, 14, 16, value, true); }
|
|
6247
|
+
getUTCSeconds() {
|
|
6248
|
+
return OffsetDateTime_use(this).getUTCSeconds();
|
|
6249
|
+
}
|
|
6250
|
+
///get second () :Seconds { return OffsetDateTime_get(this, 17, 19); }
|
|
6251
|
+
///set second (value :Seconds) { OffsetDateTime_set(this, 17, 19, value, true); }
|
|
6252
|
+
getUTCMilliseconds() {
|
|
6253
|
+
return OffsetDateTime_use(this).getUTCMilliseconds();
|
|
6254
|
+
}
|
|
6255
|
+
///
|
|
6256
|
+
///get millisecond () :Milliseconds { return this[OffsetDateTime_value]%1000; }///
|
|
6257
|
+
/*set millisecond (value :Milliseconds) {
|
|
6258
|
+
this[OffsetDateTime_ISOString] = this[OffsetDateTime_ISOString].slice(0, 19) + ( value ? ( '.' + ( '' + value ).padStart(3, '0') ).replace(DOT_ZERO, '') : '' ) + this[OffsetDateTime_ISOString].slice(this[OffsetDateTime_ISOString].search(OFFSET$));
|
|
6259
|
+
OffsetDateTime_set(this, 0, 0, 0, false);
|
|
6260
|
+
}*/
|
|
6261
|
+
//
|
|
6262
|
+
///get microsecond () :Milliseconds
|
|
6263
|
+
///set microsecond (value :Milliseconds)
|
|
6264
|
+
///get nanosecond () :Milliseconds
|
|
6265
|
+
///set nanosecond (value :Milliseconds)
|
|
6266
|
+
getUTCDay() {
|
|
6267
|
+
return OffsetDateTime_use(this).getUTCDay();
|
|
6268
|
+
}
|
|
6269
|
+
///get dayOfWeek () { return OffsetDateTime_use(this, this.getTimezoneOffset()*60000).getUTCDay() || 7; }
|
|
6270
|
+
getTimezoneOffset() {
|
|
6271
|
+
const z2 = Z_exec(this[OffsetDateTime_ISOString]);
|
|
6272
|
+
return z2 ? +z2[1] * 60 + +(z2[2] + z2[3]) : 0;
|
|
6273
|
+
}
|
|
6274
|
+
///get offset () { return this[OffsetDateTime_ISOString].endsWith('Z') ? 'Z' : this[OffsetDateTime_ISOString].slice(-6); }
|
|
6275
|
+
/*set offset (value) {
|
|
6276
|
+
this[OffsetDateTime_ISOString] = this[OffsetDateTime_ISOString].slice(0, this[OffsetDateTime_ISOString].endsWith('Z') ? -1 : -6) + value;
|
|
6277
|
+
OffsetDateTime_set(this, 0, 0, 0, true);
|
|
6278
|
+
}*/
|
|
6279
|
+
//
|
|
6280
|
+
getTime() {
|
|
6281
|
+
return floor(+this[OffsetDateTime_value]);
|
|
6282
|
+
}
|
|
6283
|
+
///
|
|
6284
|
+
/*setTime (this :OffsetDateTime, value :Time) :void {
|
|
6285
|
+
value = DATE.setTime(value);
|
|
6286
|
+
const z = Z_exec(this[OffsetDateTime_ISOString]);
|
|
6287
|
+
DATE.setTime(value + ( z ? +z[1]*60 + +( z[2] + z[3] ) : 0 )*60000);
|
|
6288
|
+
this[OffsetDateTime_ISOString] = z ? DATE.toISOString().slice(0, -1) + z[0] : DATE.toISOString();
|
|
6289
|
+
this[OffsetDateTime_value] = ValueOFFSET(value, '');
|
|
6290
|
+
///return value;
|
|
6291
|
+
}*/
|
|
6292
|
+
});
|
|
6293
|
+
var LocalDateTime_ISOString = Symbol$1("LocalDateTime_ISOString");
|
|
6294
|
+
var LocalDateTime_value = Symbol$1("LocalDateTime_value");
|
|
6295
|
+
var LocalDateTime_get = /* @__PURE__ */ __name((that, start, end) => +that[LocalDateTime_ISOString].slice(start, end), "LocalDateTime_get");
|
|
6296
|
+
var LocalDateTime_set = /* @__PURE__ */ __name((that, start, end, value) => {
|
|
6297
|
+
const string = "" + value;
|
|
6298
|
+
const size = end - start;
|
|
6299
|
+
if (string.length > size) {
|
|
6300
|
+
throw RangeError$1();
|
|
6301
|
+
}
|
|
6302
|
+
that[LocalDateTime_value] = Value(
|
|
6303
|
+
that[LocalDateTime_ISOString] = that[LocalDateTime_ISOString].slice(0, start) + string.padStart(size, "0") + that[LocalDateTime_ISOString].slice(end)
|
|
6304
|
+
);
|
|
6305
|
+
}, "LocalDateTime_set");
|
|
6306
|
+
var LocalDateTime = /* @__PURE__ */ fpc(class LocalDateTime2 extends Datetime {
|
|
6307
|
+
static {
|
|
6308
|
+
__name(this, "LocalDateTime");
|
|
6309
|
+
}
|
|
6310
|
+
[LocalDateTime_ISOString];
|
|
6311
|
+
[LocalDateTime_value];
|
|
6312
|
+
get [Symbol$1.toStringTag]() {
|
|
6313
|
+
return "LocalDateTime";
|
|
6314
|
+
}
|
|
6315
|
+
valueOf() {
|
|
6316
|
+
return this[LocalDateTime_value];
|
|
6317
|
+
}
|
|
6318
|
+
toISOString() {
|
|
6319
|
+
return this[LocalDateTime_ISOString];
|
|
6320
|
+
}
|
|
6321
|
+
constructor(literal) {
|
|
6322
|
+
IS_LOCAL_DATETIME(literal) && validateLeap(literal) || throws(SyntaxError$1(`Invalid Local Date-Time ${literal}` + where(" at ")));
|
|
6323
|
+
super();
|
|
6324
|
+
this[LocalDateTime_value] = Value(
|
|
6325
|
+
this[LocalDateTime_ISOString] = literal.replace(T, "T")
|
|
6326
|
+
);
|
|
6327
|
+
return this;
|
|
6328
|
+
}
|
|
6329
|
+
getFullYear() {
|
|
6330
|
+
return LocalDateTime_get(this, 0, 4);
|
|
6331
|
+
}
|
|
6332
|
+
setFullYear(value) {
|
|
6333
|
+
LocalDateTime_set(this, 0, 4, value);
|
|
6334
|
+
}
|
|
6335
|
+
getMonth() {
|
|
6336
|
+
return LocalDateTime_get(this, 5, 7) - 1;
|
|
6337
|
+
}
|
|
6338
|
+
setMonth(value) {
|
|
6339
|
+
LocalDateTime_set(this, 5, 7, value + 1);
|
|
6340
|
+
}
|
|
6341
|
+
getDate() {
|
|
6342
|
+
return LocalDateTime_get(this, 8, 10);
|
|
6343
|
+
}
|
|
6344
|
+
setDate(value) {
|
|
6345
|
+
LocalDateTime_set(this, 8, 10, value);
|
|
6346
|
+
}
|
|
6347
|
+
getHours() {
|
|
6348
|
+
return LocalDateTime_get(this, 11, 13);
|
|
6349
|
+
}
|
|
6350
|
+
setHours(value) {
|
|
6351
|
+
LocalDateTime_set(this, 11, 13, value);
|
|
6352
|
+
}
|
|
6353
|
+
getMinutes() {
|
|
6354
|
+
return LocalDateTime_get(this, 14, 16);
|
|
6355
|
+
}
|
|
6356
|
+
setMinutes(value) {
|
|
6357
|
+
LocalDateTime_set(this, 14, 16, value);
|
|
6358
|
+
}
|
|
6359
|
+
getSeconds() {
|
|
6360
|
+
return LocalDateTime_get(this, 17, 19);
|
|
6361
|
+
}
|
|
6362
|
+
setSeconds(value) {
|
|
6363
|
+
LocalDateTime_set(this, 17, 19, value);
|
|
6364
|
+
}
|
|
6365
|
+
getMilliseconds() {
|
|
6366
|
+
return +this[LocalDateTime_value].slice(14, 17).padEnd(3, "0");
|
|
6367
|
+
}
|
|
6368
|
+
///
|
|
6369
|
+
setMilliseconds(value) {
|
|
6370
|
+
this[LocalDateTime_value] = Value(
|
|
6371
|
+
this[LocalDateTime_ISOString] = this[LocalDateTime_ISOString].slice(0, 19) + (value ? ("." + ("" + value).padStart(3, "0")).replace(DOT_ZERO, "") : "")
|
|
6372
|
+
);
|
|
6373
|
+
}
|
|
6374
|
+
});
|
|
6375
|
+
var LocalDate_ISOString = Symbol$1("LocalDate_ISOString");
|
|
6376
|
+
var LocalDate_value = Symbol$1("LocalDate_value");
|
|
6377
|
+
var LocalDate_get = /* @__PURE__ */ __name((that, start, end) => +that[LocalDate_ISOString].slice(start, end), "LocalDate_get");
|
|
6378
|
+
var LocalDate_set = /* @__PURE__ */ __name((that, start, end, value) => {
|
|
6379
|
+
const string = "" + value;
|
|
6380
|
+
const size = end - start;
|
|
6381
|
+
if (string.length > size) {
|
|
6382
|
+
throw RangeError$1();
|
|
6383
|
+
}
|
|
6384
|
+
that[LocalDate_value] = Value(
|
|
6385
|
+
that[LocalDate_ISOString] = that[LocalDate_ISOString].slice(0, start) + string.padStart(size, "0") + that[LocalDate_ISOString].slice(end)
|
|
6386
|
+
);
|
|
6387
|
+
}, "LocalDate_set");
|
|
6388
|
+
var LocalDate = /* @__PURE__ */ fpc(class LocalDate2 extends Datetime {
|
|
6389
|
+
static {
|
|
6390
|
+
__name(this, "LocalDate");
|
|
6391
|
+
}
|
|
6392
|
+
[LocalDate_ISOString];
|
|
6393
|
+
[LocalDate_value];
|
|
6394
|
+
get [Symbol$1.toStringTag]() {
|
|
6395
|
+
return "LocalDate";
|
|
6396
|
+
}
|
|
6397
|
+
valueOf() {
|
|
6398
|
+
return this[LocalDate_value];
|
|
6399
|
+
}
|
|
6400
|
+
toISOString() {
|
|
6401
|
+
return this[LocalDate_ISOString];
|
|
6402
|
+
}
|
|
6403
|
+
constructor(literal) {
|
|
6404
|
+
IS_LOCAL_DATE(literal) && validateLeap(literal) || throws(SyntaxError$1(`Invalid Local Date ${literal}` + where(" at ")));
|
|
6405
|
+
super();
|
|
6406
|
+
this[LocalDate_value] = Value(
|
|
6407
|
+
this[LocalDate_ISOString] = literal
|
|
6408
|
+
);
|
|
6409
|
+
return this;
|
|
6410
|
+
}
|
|
6411
|
+
getFullYear() {
|
|
6412
|
+
return LocalDate_get(this, 0, 4);
|
|
6413
|
+
}
|
|
6414
|
+
setFullYear(value) {
|
|
6415
|
+
LocalDate_set(this, 0, 4, value);
|
|
6416
|
+
}
|
|
6417
|
+
getMonth() {
|
|
6418
|
+
return LocalDate_get(this, 5, 7) - 1;
|
|
6419
|
+
}
|
|
6420
|
+
setMonth(value) {
|
|
6421
|
+
LocalDate_set(this, 5, 7, value + 1);
|
|
6422
|
+
}
|
|
6423
|
+
getDate() {
|
|
6424
|
+
return LocalDate_get(this, 8, 10);
|
|
6425
|
+
}
|
|
6426
|
+
setDate(value) {
|
|
6427
|
+
LocalDate_set(this, 8, 10, value);
|
|
6428
|
+
}
|
|
6429
|
+
});
|
|
6430
|
+
var LocalTime_ISOString = Symbol$1("LocalTime_ISOString");
|
|
6431
|
+
var LocalTime_value = Symbol$1("LocalTime_value");
|
|
6432
|
+
var LocalTime_get = /* @__PURE__ */ __name((that, start, end) => +that[LocalTime_ISOString].slice(start, end), "LocalTime_get");
|
|
6433
|
+
var LocalTime_set = /* @__PURE__ */ __name((that, start, end, value) => {
|
|
6434
|
+
const string = "" + value;
|
|
6435
|
+
const size = end - start;
|
|
6436
|
+
if (string.length > size) {
|
|
6437
|
+
throw RangeError$1();
|
|
6438
|
+
}
|
|
6439
|
+
that[LocalTime_value] = Value(
|
|
6440
|
+
that[LocalTime_ISOString] = that[LocalTime_ISOString].slice(0, start) + string.padStart(2, "0") + that[LocalTime_ISOString].slice(end)
|
|
6441
|
+
);
|
|
6442
|
+
}, "LocalTime_set");
|
|
6443
|
+
var LocalTime = /* @__PURE__ */ fpc(class LocalTime2 extends Datetime {
|
|
6444
|
+
static {
|
|
6445
|
+
__name(this, "LocalTime");
|
|
6446
|
+
}
|
|
6447
|
+
[LocalTime_ISOString];
|
|
6448
|
+
[LocalTime_value];
|
|
6449
|
+
get [Symbol$1.toStringTag]() {
|
|
6450
|
+
return "LocalTime";
|
|
6451
|
+
}
|
|
6452
|
+
valueOf() {
|
|
6453
|
+
return this[LocalTime_value];
|
|
6454
|
+
}
|
|
6455
|
+
toISOString() {
|
|
6456
|
+
return this[LocalTime_ISOString];
|
|
6457
|
+
}
|
|
6458
|
+
constructor(literal) {
|
|
6459
|
+
IS_LOCAL_TIME(literal) || throws(SyntaxError$1(`Invalid Local Time ${literal}` + where(" at ")));
|
|
6460
|
+
super();
|
|
6461
|
+
this[LocalTime_value] = Value(
|
|
6462
|
+
this[LocalTime_ISOString] = literal
|
|
6463
|
+
);
|
|
6464
|
+
return this;
|
|
6465
|
+
}
|
|
6466
|
+
getHours() {
|
|
6467
|
+
return LocalTime_get(this, 0, 2);
|
|
6468
|
+
}
|
|
6469
|
+
setHours(value) {
|
|
6470
|
+
LocalTime_set(this, 0, 2, value);
|
|
6471
|
+
}
|
|
6472
|
+
getMinutes() {
|
|
6473
|
+
return LocalTime_get(this, 3, 5);
|
|
6474
|
+
}
|
|
6475
|
+
setMinutes(value) {
|
|
6476
|
+
LocalTime_set(this, 3, 5, value);
|
|
6477
|
+
}
|
|
6478
|
+
getSeconds() {
|
|
6479
|
+
return LocalTime_get(this, 6, 8);
|
|
6480
|
+
}
|
|
6481
|
+
setSeconds(value) {
|
|
6482
|
+
LocalTime_set(this, 6, 8, value);
|
|
6483
|
+
}
|
|
6484
|
+
getMilliseconds() {
|
|
6485
|
+
return +this[LocalTime_value].slice(6, 9).padEnd(3, "0");
|
|
6486
|
+
}
|
|
6487
|
+
///
|
|
6488
|
+
setMilliseconds(value) {
|
|
6489
|
+
this[LocalTime_value] = Value(
|
|
6490
|
+
this[LocalTime_ISOString] = this[LocalTime_ISOString].slice(0, 8) + (value ? ("." + ("" + value).padStart(3, "0")).replace(DOT_ZERO, "") : "")
|
|
6491
|
+
);
|
|
6492
|
+
}
|
|
6493
|
+
});
|
|
6494
|
+
var fromCodePoint = String.fromCodePoint;
|
|
6495
|
+
var INTEGER_D = /[-+]?(?:0|[1-9][_\d]*)/;
|
|
6496
|
+
var { test: BAD_D } = /* @__PURE__ */ newRegExp`_(?!\d)`.valueOf();
|
|
6497
|
+
var { test: IS_D_INTEGER } = /* @__PURE__ */ newRegExp`^${INTEGER_D}$`.valueOf();
|
|
6498
|
+
var { test: IS_XOB_INTEGER } = theRegExp(/^0(?:x[\dA-Fa-f][_\dA-Fa-f]*|o[0-7][_0-7]*|b[01][_01]*)$/);
|
|
6499
|
+
var { test: BAD_XOB } = /* @__PURE__ */ newRegExp`_(?![\dA-Fa-f])`.valueOf();
|
|
6500
|
+
var MIN = BigInt$1 && -/* @__PURE__ */ BigInt$1("0x8000000000000000");
|
|
6501
|
+
var NaN$1 = 0 / 0;
|
|
6502
|
+
var _NaN = -NaN$1;
|
|
6503
|
+
var _Infinity$1 = -Infinity2;
|
|
6504
|
+
var { test: IS_FLOAT } = /* @__PURE__ */ newRegExp`
|
|
6505
|
+
^
|
|
6506
|
+
${INTEGER_D}
|
|
6507
|
+
(?:
|
|
6508
|
+
\.\d[_\d]*
|
|
6509
|
+
(?:[eE][-+]?\d[_\d]*)?
|
|
6510
|
+
|
|
|
6511
|
+
[eE][-+]?\d[_\d]*
|
|
6512
|
+
)
|
|
6513
|
+
$`.valueOf();
|
|
6514
|
+
var { test: IS_ZERO } = theRegExp(/^[-+]?0(?:\.0+)?(?:[eE][-+]?0+)?$/);
|
|
6515
|
+
var { exec: NORMALIZED } = theRegExp(/^[-0]?(\d*)(?:\.(\d+))?(?:e\+?(-?\d+))?$/);
|
|
6516
|
+
var { exec: ORIGINAL } = theRegExp(/^[-+]?0?(\d*)(?:\.(\d*?)0*)?(?:[eE]\+?(-?\d+))?$/);
|
|
6517
|
+
var KEYS = /* @__PURE__ */ Null$1(null);
|
|
6518
|
+
var commentForThis = Symbol$1("this");
|
|
6519
|
+
var { test: includesNewline } = theRegExp(/\r?\n/g);
|
|
6520
|
+
var getCOMMENT = /* @__PURE__ */ __name((table, keyComment) => {
|
|
6521
|
+
if (keyComment in table) {
|
|
6522
|
+
const comment = table[keyComment];
|
|
6523
|
+
if (typeof comment !== "string") {
|
|
6524
|
+
throw TypeError$1(`the value of comment must be a string, while "${comment === null ? "null" : typeof comment}" type is found`);
|
|
6525
|
+
}
|
|
6526
|
+
if (includesNewline(comment)) {
|
|
6527
|
+
throw SyntaxError$1(`the value of comment must be a string and can not include newline`);
|
|
6528
|
+
}
|
|
6529
|
+
return ` #${comment}`;
|
|
6530
|
+
}
|
|
6531
|
+
return "";
|
|
6532
|
+
}, "getCOMMENT");
|
|
6533
|
+
var getComment = /* @__PURE__ */ __name((table, key) => key in KEYS ? getCOMMENT(table, KEYS[key]) : "", "getComment");
|
|
6534
|
+
var { test: IS_OFFSET$ } = theRegExp(OFFSET$);
|
|
6535
|
+
var { test: IS_EMPTY } = theRegExp(/^\[[\t ]*]/);
|
|
6536
|
+
var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
|
|
6537
|
+
var DATE = Date.prototype;
|
|
6538
|
+
var valueOf$2 = String.prototype.valueOf;
|
|
6539
|
+
var isString = (
|
|
6540
|
+
/* j-globals: class.isString (internal) */
|
|
6541
|
+
/* @__PURE__ */ function() {
|
|
6542
|
+
if (apply.bind) {
|
|
6543
|
+
var valueOf_apply = apply.bind(valueOf$2);
|
|
6544
|
+
return /* @__PURE__ */ __name(function isString4(value) {
|
|
6545
|
+
try {
|
|
6546
|
+
valueOf_apply(value);
|
|
6547
|
+
} catch (error) {
|
|
6548
|
+
return false;
|
|
6549
|
+
}
|
|
6550
|
+
return true;
|
|
6551
|
+
}, "isString");
|
|
6552
|
+
}
|
|
6553
|
+
return /* @__PURE__ */ __name(function isString4(value) {
|
|
6554
|
+
try {
|
|
6555
|
+
valueOf$2.apply(value);
|
|
6556
|
+
} catch (error) {
|
|
6557
|
+
return false;
|
|
6558
|
+
}
|
|
6559
|
+
return true;
|
|
6560
|
+
}, "isString");
|
|
6561
|
+
}()
|
|
6562
|
+
);
|
|
6563
|
+
var valueOf$1 = Number.prototype.valueOf;
|
|
6564
|
+
var isNumber = (
|
|
6565
|
+
/* j-globals: class.isNumber (internal) */
|
|
6566
|
+
/* @__PURE__ */ function() {
|
|
6567
|
+
if (apply.bind) {
|
|
6568
|
+
var valueOf_apply = apply.bind(valueOf$1);
|
|
6569
|
+
return /* @__PURE__ */ __name(function isNumber4(value) {
|
|
6570
|
+
try {
|
|
6571
|
+
valueOf_apply(value);
|
|
6572
|
+
} catch (error) {
|
|
6573
|
+
return false;
|
|
6574
|
+
}
|
|
6575
|
+
return true;
|
|
6576
|
+
}, "isNumber");
|
|
6577
|
+
}
|
|
6578
|
+
return /* @__PURE__ */ __name(function isNumber4(value) {
|
|
6579
|
+
try {
|
|
6580
|
+
valueOf$1.apply(value);
|
|
6581
|
+
} catch (error) {
|
|
6582
|
+
return false;
|
|
6583
|
+
}
|
|
6584
|
+
return true;
|
|
6585
|
+
}, "isNumber");
|
|
6586
|
+
}()
|
|
6587
|
+
);
|
|
6588
|
+
var isBigInt = (
|
|
6589
|
+
/* j-globals: class.isBigInt (internal) */
|
|
6590
|
+
/* @__PURE__ */ function() {
|
|
6591
|
+
if (typeof BigInt === "function") {
|
|
6592
|
+
var valueOf_apply = apply.bind(BigInt.prototype.valueOf);
|
|
6593
|
+
return /* @__PURE__ */ __name(function isBigInt2(value) {
|
|
6594
|
+
try {
|
|
6595
|
+
valueOf_apply(value);
|
|
6596
|
+
} catch (error) {
|
|
6597
|
+
return false;
|
|
6598
|
+
}
|
|
6599
|
+
return true;
|
|
6600
|
+
}, "isBigInt");
|
|
6601
|
+
}
|
|
6602
|
+
return /* @__PURE__ */ __name(function isBigInt2() {
|
|
6603
|
+
return false;
|
|
6604
|
+
}, "isBigInt");
|
|
6605
|
+
}()
|
|
6606
|
+
);
|
|
6607
|
+
var valueOf = BigInt.prototype.valueOf;
|
|
6608
|
+
var isBoolean = (
|
|
6609
|
+
/* j-globals: class.isBoolean (internal) */
|
|
6610
|
+
/* @__PURE__ */ function() {
|
|
6611
|
+
if (apply.bind) {
|
|
6612
|
+
var valueOf_apply = apply.bind(valueOf);
|
|
6613
|
+
return /* @__PURE__ */ __name(function isBoolean3(value) {
|
|
6614
|
+
try {
|
|
6615
|
+
valueOf_apply(value);
|
|
6616
|
+
} catch (error) {
|
|
6617
|
+
return false;
|
|
6618
|
+
}
|
|
6619
|
+
return true;
|
|
6620
|
+
}, "isBoolean");
|
|
6621
|
+
}
|
|
6622
|
+
return /* @__PURE__ */ __name(function isBoolean3(value) {
|
|
6623
|
+
try {
|
|
6624
|
+
valueOf.apply(value);
|
|
6625
|
+
} catch (error) {
|
|
6626
|
+
return false;
|
|
6627
|
+
}
|
|
6628
|
+
return true;
|
|
6629
|
+
}, "isBoolean");
|
|
6630
|
+
}()
|
|
6631
|
+
);
|
|
6632
|
+
var ESCAPED = /* @__PURE__ */ Null$1({
|
|
6633
|
+
.../* @__PURE__ */ fromEntries(/* @__PURE__ */ [...Array$1(32)].map((_, charCode) => [fromCharCode(charCode), "\\u" + charCode.toString(16).toUpperCase().padStart(4, "0")])),
|
|
6634
|
+
"\b": "\\b",
|
|
6635
|
+
" ": "\\t",
|
|
6636
|
+
"\n": "\\n",
|
|
6637
|
+
"\f": "\\f",
|
|
6638
|
+
"\r": "\\r",
|
|
6639
|
+
'"': '\\"',
|
|
6640
|
+
'"""': '""\\"',
|
|
6641
|
+
"\\": "\\\\",
|
|
6642
|
+
"\x7F": "\\u007F"
|
|
6643
|
+
});
|
|
6644
|
+
var { test: NEED_BASIC } = theRegExp(/[\x00-\x08\x0A-\x1F'\x7F]/);
|
|
6645
|
+
var BY_ESCAPE = /[^\x00-\x08\x0A-\x1F"\\\x7F]+|./gs;
|
|
6646
|
+
var { test: NEED_ESCAPE } = theRegExp(/^[\x00-\x08\x0A-\x1F"\\\x7F]/);
|
|
6647
|
+
var singlelineString = /* @__PURE__ */ __name((value) => {
|
|
6648
|
+
if (NEED_BASIC(value)) {
|
|
6649
|
+
const parts = value.match(BY_ESCAPE);
|
|
6650
|
+
let index = parts.length;
|
|
6651
|
+
do {
|
|
6652
|
+
if (NEED_ESCAPE(parts[--index])) {
|
|
6653
|
+
parts[index] = ESCAPED[parts[index]];
|
|
6654
|
+
}
|
|
6655
|
+
} while (index);
|
|
6656
|
+
return `"${parts.join("")}"`;
|
|
6657
|
+
}
|
|
6658
|
+
return `'${value}'`;
|
|
6659
|
+
}, "singlelineString");
|
|
6660
|
+
var { test: NEED_MULTILINE_BASIC } = theRegExp(/[\x00-\x08\x0A-\x1F\x7F]|'''/);
|
|
6661
|
+
var { test: multilineNeedBasic } = theRegExp(/[\x00-\x08\x0B-\x1F\x7F]|'''/);
|
|
6662
|
+
var { test: REAL_MULTILINE_ESCAPE } = theRegExp(/[\x00-\x08\x0A-\x1F\\\x7F]|"""/);
|
|
6663
|
+
var { test: NEED_MULTILINE_ESCAPE } = theRegExp(/^(?:[\x00-\x08\x0A-\x1F\\\x7F]|""")/);
|
|
6664
|
+
var Float64Array$1 = Float64Array;
|
|
6665
|
+
var Uint8Array$1 = Uint8Array;
|
|
6666
|
+
var _Infinity = -Infinity2;
|
|
6667
|
+
var { test: INTEGER_LIKE } = theRegExp(/^-?\d+$/);
|
|
6668
|
+
var ensureFloat = /* @__PURE__ */ __name((literal) => INTEGER_LIKE(literal) ? literal + ".0" : literal, "ensureFloat");
|
|
6669
|
+
var float64Array = new Float64Array$1([NaN$1]);
|
|
6670
|
+
var uint8Array = new Uint8Array$1(float64Array.buffer);
|
|
6671
|
+
var NaN_7 = uint8Array[7];
|
|
6672
|
+
var float = NaN_7 === new Uint8Array$1(new Float64Array$1([-NaN$1]).buffer)[7] ? (value) => value ? value === Infinity2 ? "inf" : value === _Infinity ? "-inf" : ensureFloat("" + value) : value === value ? is(value, 0) ? "0.0" : "-0.0" : "nan" : (value) => value ? value === Infinity2 ? "inf" : value === _Infinity ? "-inf" : ensureFloat("" + value) : value === value ? is(value, 0) ? "0.0" : "-0.0" : (float64Array[0] = value, uint8Array[7]) === NaN_7 ? "nan" : "-nan";
|
|
6673
|
+
var isDate = /* @__PURE__ */ isPrototypeOf.bind(DATE);
|
|
6674
|
+
var { test: BARE } = theRegExp(/^[\w-]+$/);
|
|
6675
|
+
var $Key$ = /* @__PURE__ */ __name((key) => BARE(key) ? key : singlelineString(key), "$Key$");
|
|
6676
|
+
var FIRST = /[^.]+/;
|
|
6677
|
+
var literalString = /* @__PURE__ */ __name((value) => `'${value}'`, "literalString");
|
|
6678
|
+
var $Keys = /* @__PURE__ */ __name((keys2) => isAmazing(keys2) ? keys2.replace(FIRST, literalString) : keys2 === "null" ? `'null'` : keys2, "$Keys");
|
|
6679
|
+
var TOMLSection = class extends Array$1 {
|
|
6680
|
+
static {
|
|
6681
|
+
__name(this, "TOMLSection");
|
|
6682
|
+
}
|
|
6683
|
+
document;
|
|
6684
|
+
constructor(document) {
|
|
6685
|
+
super();
|
|
6686
|
+
this.document = document;
|
|
6687
|
+
return this;
|
|
6688
|
+
}
|
|
6689
|
+
[Symbol$1.toPrimitive]() {
|
|
6690
|
+
return this.join(this.document.newline);
|
|
6691
|
+
}
|
|
6692
|
+
appendNewline() {
|
|
6693
|
+
this[this.length] = "";
|
|
6694
|
+
}
|
|
6695
|
+
set appendLine(source) {
|
|
6696
|
+
this[this.length] = source;
|
|
6697
|
+
}
|
|
6698
|
+
set appendInline(source) {
|
|
6699
|
+
this[this.length - 1] += source;
|
|
6700
|
+
}
|
|
6701
|
+
set appendInlineIf(source) {
|
|
6702
|
+
source && (this[this.length - 1] += source);
|
|
6703
|
+
}
|
|
6704
|
+
///
|
|
6705
|
+
*assignBlock(documentKeys_, sectionKeys_, table, tableKeys) {
|
|
6706
|
+
const { document } = this;
|
|
6707
|
+
const { newlineUnderHeader, newlineUnderSectionButPair } = document;
|
|
6708
|
+
const newlineAfterDotted = sectionKeys_ ? document.newlineUnderPairButDotted : false;
|
|
6709
|
+
const newlineAfterPair = sectionKeys_ ? document.newlineUnderDotted : document.newlineUnderPair;
|
|
6710
|
+
for (const tableKey of tableKeys) {
|
|
6711
|
+
const value = table[tableKey];
|
|
6712
|
+
const $key$ = $Key$(tableKey);
|
|
6713
|
+
const documentKeys = documentKeys_ + $key$;
|
|
6714
|
+
if (isArray$1(value)) {
|
|
6715
|
+
const { length } = value;
|
|
6716
|
+
if (length) {
|
|
6717
|
+
let firstItem = value[0];
|
|
6718
|
+
if (isSection(firstItem)) {
|
|
6719
|
+
const tableHeader = `[[${documentKeys}]]`;
|
|
6720
|
+
const documentKeys_2 = documentKeys + ".";
|
|
6721
|
+
let index = 0;
|
|
6722
|
+
let table2 = firstItem;
|
|
6723
|
+
for (; ; ) {
|
|
6724
|
+
const section = document.appendSection();
|
|
6725
|
+
section[0] = tableHeader + getCOMMENT(table2, commentForThis);
|
|
6726
|
+
if (newlineUnderHeader) {
|
|
6727
|
+
section[1] = "";
|
|
6728
|
+
yield section.assignBlock(documentKeys_2, ``, table2, getOwnPropertyNames(table2));
|
|
6729
|
+
newlineUnderSectionButPair && section.length !== 2 && section.appendNewline();
|
|
6730
|
+
} else {
|
|
6731
|
+
yield section.assignBlock(documentKeys_2, ``, table2, getOwnPropertyNames(table2));
|
|
6732
|
+
newlineUnderSectionButPair && section.appendNewline();
|
|
6733
|
+
}
|
|
6734
|
+
if (++index === length) {
|
|
6735
|
+
break;
|
|
6736
|
+
}
|
|
6737
|
+
table2 = value[index];
|
|
6738
|
+
if (!isSection(table2)) {
|
|
6739
|
+
throw TypeError$1(`the first table item marked by Section() means the parent array is an array of tables, which can not include other types or table not marked by Section() any more in the rest items`);
|
|
6740
|
+
}
|
|
6741
|
+
}
|
|
6742
|
+
continue;
|
|
6743
|
+
} else {
|
|
6744
|
+
let index = 1;
|
|
6745
|
+
while (index !== length) {
|
|
6746
|
+
if (isSection(value[index++])) {
|
|
6747
|
+
throw TypeError$1(`if an array is not array of tables, it can not include any table that marked by Section()`);
|
|
6748
|
+
}
|
|
6749
|
+
}
|
|
6750
|
+
}
|
|
6751
|
+
}
|
|
6752
|
+
} else {
|
|
6753
|
+
if (isSection(value)) {
|
|
6754
|
+
const section = document.appendSection();
|
|
6755
|
+
section[0] = `[${documentKeys}]${document.preferCommentForThis ? getCOMMENT(value, commentForThis) || getComment(table, tableKey) : getComment(table, tableKey) || getCOMMENT(value, commentForThis)}`;
|
|
6756
|
+
if (newlineUnderHeader) {
|
|
6757
|
+
section[1] = "";
|
|
6758
|
+
yield section.assignBlock(documentKeys + ".", ``, value, getOwnPropertyNames(value));
|
|
6759
|
+
newlineUnderSectionButPair && section.length !== 2 && section.appendNewline();
|
|
6760
|
+
} else {
|
|
6761
|
+
yield section.assignBlock(documentKeys + ".", ``, value, getOwnPropertyNames(value));
|
|
6762
|
+
newlineUnderSectionButPair && section.appendNewline();
|
|
6763
|
+
}
|
|
6764
|
+
continue;
|
|
6765
|
+
}
|
|
6766
|
+
}
|
|
6767
|
+
const sectionKeys = sectionKeys_ + $key$;
|
|
6768
|
+
this.appendLine = $Keys(sectionKeys) + " = ";
|
|
6769
|
+
const valueKeysIfValueIsDottedTable = this.value("", value, true);
|
|
6770
|
+
if (valueKeysIfValueIsDottedTable) {
|
|
6771
|
+
--this.length;
|
|
6772
|
+
yield this.assignBlock(documentKeys + ".", sectionKeys + ".", value, valueKeysIfValueIsDottedTable);
|
|
6773
|
+
newlineAfterDotted && this.appendNewline();
|
|
6774
|
+
} else {
|
|
6775
|
+
this.appendInlineIf = getComment(table, tableKey);
|
|
6776
|
+
newlineAfterPair && this.appendNewline();
|
|
6777
|
+
}
|
|
6778
|
+
}
|
|
6779
|
+
}
|
|
6780
|
+
value(indent, value, returnValueKeysIfValueIsDottedTable) {
|
|
6781
|
+
switch (typeof value) {
|
|
6782
|
+
case "object":
|
|
6783
|
+
if (value === null) {
|
|
6784
|
+
if (this.document.nullDisabled) {
|
|
6785
|
+
throw TypeError$1(`toml can not stringify "null" type value without truthy options.xNull`);
|
|
6786
|
+
}
|
|
6787
|
+
this.appendInline = "null";
|
|
6788
|
+
break;
|
|
6789
|
+
}
|
|
6790
|
+
const inlineMode = ofInline(value);
|
|
6791
|
+
if (isArray$1(value)) {
|
|
6792
|
+
if (inlineMode === undefined$1) {
|
|
6793
|
+
this.staticArray(indent, value);
|
|
6794
|
+
} else {
|
|
6795
|
+
const { $singlelineArray = inlineMode } = this.document;
|
|
6796
|
+
this.singlelineArray(indent, value, $singlelineArray);
|
|
6797
|
+
}
|
|
6798
|
+
break;
|
|
6799
|
+
}
|
|
6800
|
+
if (inlineMode !== undefined$1) {
|
|
6801
|
+
inlineMode || this.document.multilineTableDisabled ? this.inlineTable(indent, value) : this.multilineTable(indent, value, this.document.multilineTableComma);
|
|
6802
|
+
break;
|
|
6803
|
+
}
|
|
6804
|
+
if (isDate(value)) {
|
|
6805
|
+
this.appendInline = value.toISOString().replace("T", this.document.T).replace("Z", this.document.Z);
|
|
6806
|
+
break;
|
|
6807
|
+
}
|
|
6808
|
+
if (_literal in value) {
|
|
6809
|
+
const literal = value[_literal];
|
|
6810
|
+
if (typeof literal === "string") {
|
|
6811
|
+
this.appendInline = literal;
|
|
6812
|
+
} else if (isArray$1(literal)) {
|
|
6813
|
+
const { length } = literal;
|
|
6814
|
+
if (length) {
|
|
6815
|
+
this.appendInline = literal[0];
|
|
6816
|
+
let index = 1;
|
|
6817
|
+
while (index !== length) {
|
|
6818
|
+
this.appendLine = literal[index++];
|
|
6819
|
+
}
|
|
6820
|
+
} else {
|
|
6821
|
+
throw TypeError$1(`literal value is broken`);
|
|
6822
|
+
}
|
|
6823
|
+
} else {
|
|
6824
|
+
throw TypeError$1(`literal value is broken`);
|
|
6825
|
+
}
|
|
6826
|
+
break;
|
|
6827
|
+
}
|
|
6828
|
+
if (isString(value)) {
|
|
6829
|
+
throw TypeError$1(`TOML.stringify refuse to handle [object String]`);
|
|
6830
|
+
}
|
|
6831
|
+
if (isNumber(value)) {
|
|
6832
|
+
throw TypeError$1(`TOML.stringify refuse to handle [object Number]`);
|
|
6833
|
+
}
|
|
6834
|
+
if (isBigInt(value)) {
|
|
6835
|
+
throw TypeError$1(`TOML.stringify refuse to handle [object BigInt]`);
|
|
6836
|
+
}
|
|
6837
|
+
if (isBoolean(value)) {
|
|
6838
|
+
throw TypeError$1(`TOML.stringify refuse to handle [object Boolean]`);
|
|
6839
|
+
}
|
|
6840
|
+
if (returnValueKeysIfValueIsDottedTable) {
|
|
6841
|
+
const keys2 = getOwnPropertyNames(value);
|
|
6842
|
+
if (keys2.length) {
|
|
6843
|
+
return keys2;
|
|
6844
|
+
}
|
|
6845
|
+
this.appendInline = "{ }";
|
|
6846
|
+
} else {
|
|
6847
|
+
this.inlineTable(indent, value);
|
|
6848
|
+
}
|
|
6849
|
+
break;
|
|
6850
|
+
case "bigint":
|
|
6851
|
+
this.appendInline = "" + value;
|
|
6852
|
+
break;
|
|
6853
|
+
case "number":
|
|
6854
|
+
this.appendInline = this.document.asInteger(value) ? is(value, -0) ? "-0" : "" + value : float(value);
|
|
6855
|
+
break;
|
|
6856
|
+
case "string":
|
|
6857
|
+
this.appendInline = singlelineString(value);
|
|
6858
|
+
break;
|
|
6859
|
+
case "boolean":
|
|
6860
|
+
this.appendInline = value ? "true" : "false";
|
|
6861
|
+
break;
|
|
6862
|
+
default:
|
|
6863
|
+
throw TypeError$1(`toml can not stringify "${typeof value}" type value`);
|
|
6864
|
+
}
|
|
6865
|
+
return null;
|
|
6866
|
+
}
|
|
6867
|
+
singlelineArray(indent, staticArray, inlineMode) {
|
|
6868
|
+
const { length } = staticArray;
|
|
6869
|
+
if (length) {
|
|
6870
|
+
this.appendInline = inlineMode & 2 ? "[ " : "[";
|
|
6871
|
+
this.value(indent, staticArray[0], false);
|
|
6872
|
+
let index = 1;
|
|
6873
|
+
while (index !== length) {
|
|
6874
|
+
this.appendInline = ", ";
|
|
6875
|
+
this.value(indent, staticArray[index++], false);
|
|
6876
|
+
}
|
|
6877
|
+
this.appendInline = inlineMode & 2 ? " ]" : "]";
|
|
6878
|
+
} else {
|
|
6879
|
+
this.appendInline = inlineMode & 1 ? "[ ]" : "[]";
|
|
6880
|
+
}
|
|
6881
|
+
}
|
|
6882
|
+
staticArray(indent, staticArray) {
|
|
6883
|
+
this.appendInline = "[";
|
|
6884
|
+
const indent_ = indent + this.document.indent;
|
|
6885
|
+
const { length } = staticArray;
|
|
6886
|
+
let index = 0;
|
|
6887
|
+
while (index !== length) {
|
|
6888
|
+
this.appendLine = indent_;
|
|
6889
|
+
this.value(indent_, staticArray[index++], false);
|
|
6890
|
+
this.appendInline = ",";
|
|
6891
|
+
}
|
|
6892
|
+
this.appendLine = indent + "]";
|
|
6893
|
+
}
|
|
6894
|
+
inlineTable(indent, inlineTable) {
|
|
6895
|
+
const keys2 = getOwnPropertyNames(inlineTable);
|
|
6896
|
+
if (keys2.length) {
|
|
6897
|
+
this.appendInline = "{ ";
|
|
6898
|
+
this.assignInline(indent, inlineTable, ``, keys2);
|
|
6899
|
+
this[this.length - 1] = this[this.length - 1].slice(0, -2) + " }";
|
|
6900
|
+
} else {
|
|
6901
|
+
this.appendInline = "{ }";
|
|
6902
|
+
}
|
|
6903
|
+
}
|
|
6904
|
+
multilineTable(indent, inlineTable, comma) {
|
|
6905
|
+
this.appendInline = "{";
|
|
6906
|
+
this.assignMultiline(indent, inlineTable, ``, getOwnPropertyNames(inlineTable), comma);
|
|
6907
|
+
this.appendLine = indent + "}";
|
|
6908
|
+
}
|
|
6909
|
+
assignInline(indent, inlineTable, keys_, keys2) {
|
|
6910
|
+
for (const key of keys2) {
|
|
6911
|
+
const value = inlineTable[key];
|
|
6912
|
+
const keys3 = keys_ + $Key$(key);
|
|
6913
|
+
const before_value = this.appendInline = $Keys(keys3) + " = ";
|
|
6914
|
+
const valueKeysIfValueIsDottedTable = this.value(indent, value, true);
|
|
6915
|
+
if (valueKeysIfValueIsDottedTable) {
|
|
6916
|
+
this[this.length - 1] = this[this.length - 1].slice(0, -before_value.length);
|
|
6917
|
+
this.assignInline(indent, value, keys3 + ".", valueKeysIfValueIsDottedTable);
|
|
6918
|
+
} else {
|
|
6919
|
+
this.appendInline = ", ";
|
|
6920
|
+
}
|
|
6921
|
+
}
|
|
6922
|
+
}
|
|
6923
|
+
assignMultiline(indent, inlineTable, keys_, keys2, comma) {
|
|
6924
|
+
const indent_ = indent + this.document.indent;
|
|
6925
|
+
for (const key of keys2) {
|
|
6926
|
+
const value = inlineTable[key];
|
|
6927
|
+
const keys3 = keys_ + $Key$(key);
|
|
6928
|
+
this.appendLine = indent_ + $Keys(keys3) + " = ";
|
|
6929
|
+
const valueKeysIfValueIsDottedTable = this.value(indent_, value, true);
|
|
6930
|
+
if (valueKeysIfValueIsDottedTable) {
|
|
6931
|
+
--this.length;
|
|
6932
|
+
this.assignMultiline(indent, value, keys3 + ".", valueKeysIfValueIsDottedTable, comma);
|
|
6933
|
+
} else {
|
|
6934
|
+
comma ? this.appendInline = "," + getComment(inlineTable, key) : this.appendInlineIf = getComment(inlineTable, key);
|
|
6935
|
+
}
|
|
6936
|
+
}
|
|
6937
|
+
}
|
|
6938
|
+
};
|
|
6939
|
+
var { test: IS_INDENT } = theRegExp(/^[\t ]*$/);
|
|
6940
|
+
var linesFromStringify = new WeakSet$1();
|
|
6941
|
+
var textDecoder = /* @__PURE__ */ new TextDecoder$1("utf-8", Null$1({ fatal: true, ignoreBOM: false }));
|
|
6942
|
+
var { test: includesNonScalar } = theRegExp(/[\uD800-\uDFFF]/u);
|
|
6943
|
+
|
|
6944
|
+
// ../path/src/get-parent-path.ts
|
|
6945
|
+
init_esm_shims();
|
|
6946
|
+
var resolveParentPath = /* @__PURE__ */ __name((path6, count = 1) => {
|
|
6947
|
+
let parentPath = path6.replaceAll(/\/+$/g, "");
|
|
6948
|
+
for (let i = 0; i < count; i++) {
|
|
6949
|
+
parentPath = joinPaths(parentPath, "..");
|
|
6950
|
+
}
|
|
6951
|
+
return parentPath;
|
|
6952
|
+
}, "resolveParentPath");
|
|
6953
|
+
var getParentPath = /* @__PURE__ */ __name((name, cwd, options) => {
|
|
6954
|
+
const ignoreCase = options?.ignoreCase ?? true;
|
|
6955
|
+
const skipCwd = options?.skipCwd ?? false;
|
|
6956
|
+
const targetType = options?.targetType ?? "both";
|
|
6957
|
+
let dir = cwd;
|
|
6958
|
+
if (skipCwd) {
|
|
6959
|
+
dir = resolveParentPath(cwd);
|
|
6960
|
+
}
|
|
6961
|
+
let names = Array.isArray(name) ? name : [
|
|
6962
|
+
name
|
|
6963
|
+
];
|
|
6964
|
+
if (ignoreCase) {
|
|
6965
|
+
names = names.map((name2) => name2.toLowerCase());
|
|
6966
|
+
}
|
|
6967
|
+
while (true) {
|
|
6968
|
+
const target = names.find((name2) => isFile(joinPaths(dir, name2)) && (targetType === "file" || targetType === "both") || isDirectory(joinPaths(dir, name2)) && (targetType === "directory" || targetType === "both"));
|
|
6969
|
+
if (target) {
|
|
6970
|
+
return joinPaths(dir, target);
|
|
6971
|
+
}
|
|
6972
|
+
const parentDir = resolveParentPath(dir);
|
|
6973
|
+
if (parentDir === dir) {
|
|
6974
|
+
return void 0;
|
|
6975
|
+
}
|
|
6976
|
+
dir = parentDir;
|
|
6977
|
+
}
|
|
6978
|
+
}, "getParentPath");
|
|
6979
|
+
|
|
6980
|
+
// ../path/src/is-root-dir.ts
|
|
6981
|
+
init_esm_shims();
|
|
6982
|
+
var isSystemRoot = /* @__PURE__ */ __name((dir) => {
|
|
6983
|
+
return Boolean(dir === "/" || dir === "c:\\" || dir === "C:\\");
|
|
6984
|
+
}, "isSystemRoot");
|
|
6985
|
+
|
|
6986
|
+
// ../path/src/get-workspace-root.ts
|
|
6987
|
+
var getWorkspaceRoot = /* @__PURE__ */ __name((dir = process.cwd()) => {
|
|
6988
|
+
if (process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
6989
|
+
return process.env.STORM_WORKSPACE_ROOT || process.env.NX_WORKSPACE_ROOT_PATH;
|
|
6990
|
+
}
|
|
6991
|
+
const root = findWorkspaceRootSafe(dir);
|
|
6992
|
+
if (root) {
|
|
6993
|
+
return root;
|
|
6994
|
+
}
|
|
6995
|
+
let result = getParentPath([
|
|
6996
|
+
"package-lock.json",
|
|
6997
|
+
"yarn.lock",
|
|
6998
|
+
"pnpm-lock.yaml",
|
|
7314
6999
|
"bun.lock",
|
|
7315
7000
|
"nx.json",
|
|
7316
7001
|
"knip.json",
|
|
@@ -7350,67 +7035,28 @@ var getWorkspaceRoot = /* @__PURE__ */ __name((dir = process.cwd()) => {
|
|
|
7350
7035
|
}, "getWorkspaceRoot");
|
|
7351
7036
|
|
|
7352
7037
|
// ../path/src/file-path-fns.ts
|
|
7353
|
-
function findFileName(filePath,
|
|
7038
|
+
function findFileName(filePath, options = {}) {
|
|
7039
|
+
const { requireExtension = false, withExtension = true } = options;
|
|
7354
7040
|
const result = normalizeWindowsPath2(filePath)?.split(filePath?.includes("\\") ? "\\" : "/")?.pop() ?? "";
|
|
7355
7041
|
if (requireExtension === true && !result.includes(".")) {
|
|
7356
7042
|
return EMPTY_STRING;
|
|
7357
7043
|
}
|
|
7358
7044
|
if (withExtension === false && result.includes(".")) {
|
|
7359
|
-
return result.
|
|
7045
|
+
return result.substring(0, result.lastIndexOf(".")) || EMPTY_STRING;
|
|
7360
7046
|
}
|
|
7361
7047
|
return result;
|
|
7362
7048
|
}
|
|
7363
7049
|
__name(findFileName, "findFileName");
|
|
7364
7050
|
function findFilePath(filePath) {
|
|
7365
7051
|
const normalizedPath = normalizeWindowsPath2(filePath);
|
|
7366
|
-
|
|
7052
|
+
const result = normalizedPath.replace(findFileName(normalizedPath, {
|
|
7367
7053
|
requireExtension: true
|
|
7368
7054
|
}), "");
|
|
7055
|
+
return result === "/" ? result : result.replace(/\/$/, "");
|
|
7369
7056
|
}
|
|
7370
7057
|
__name(findFilePath, "findFilePath");
|
|
7371
|
-
function
|
|
7372
|
-
|
|
7373
|
-
let resolvedPath = "";
|
|
7374
|
-
let resolvedAbsolute = false;
|
|
7375
|
-
for (let index = paths.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
7376
|
-
const path7 = index >= 0 ? paths[index] : cwd2;
|
|
7377
|
-
if (!path7 || path7.length === 0) {
|
|
7378
|
-
continue;
|
|
7379
|
-
}
|
|
7380
|
-
resolvedPath = joinPaths(path7, resolvedPath);
|
|
7381
|
-
resolvedAbsolute = isAbsolutePath(path7);
|
|
7382
|
-
}
|
|
7383
|
-
resolvedPath = normalizeString2(resolvedPath, !resolvedAbsolute);
|
|
7384
|
-
if (resolvedAbsolute && !isAbsolutePath(resolvedPath)) {
|
|
7385
|
-
return `/${resolvedPath}`;
|
|
7386
|
-
}
|
|
7387
|
-
return resolvedPath.length > 0 ? resolvedPath : ".";
|
|
7388
|
-
}
|
|
7389
|
-
__name(resolvePath, "resolvePath");
|
|
7390
|
-
function resolvePaths(...paths) {
|
|
7391
|
-
return resolvePath(joinPaths(...paths.map((path6) => normalizeWindowsPath2(path6))));
|
|
7392
|
-
}
|
|
7393
|
-
__name(resolvePaths, "resolvePaths");
|
|
7394
|
-
function relativePath(from, to) {
|
|
7395
|
-
const _from = resolvePath(from).replace(/^\/([A-Z]:)?$/i, "$1").split("/");
|
|
7396
|
-
const _to = resolvePath(to).replace(/^\/([A-Z]:)?$/i, "$1").split("/");
|
|
7397
|
-
if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
|
|
7398
|
-
return _to.join("/");
|
|
7399
|
-
}
|
|
7400
|
-
const _fromCopy = [
|
|
7401
|
-
..._from
|
|
7402
|
-
];
|
|
7403
|
-
for (const segment of _fromCopy) {
|
|
7404
|
-
if (_to[0] !== segment) {
|
|
7405
|
-
break;
|
|
7406
|
-
}
|
|
7407
|
-
_from.shift();
|
|
7408
|
-
_to.shift();
|
|
7409
|
-
}
|
|
7410
|
-
return [
|
|
7411
|
-
..._from.map(() => ".."),
|
|
7412
|
-
..._to
|
|
7413
|
-
].join("/");
|
|
7058
|
+
function relativePath(from, to, withEndSlash = false) {
|
|
7059
|
+
return relative(withEndSlash !== true ? from.replace(/\/$/, "") : from, withEndSlash !== true ? to.replace(/\/$/, "") : to);
|
|
7414
7060
|
}
|
|
7415
7061
|
__name(relativePath, "relativePath");
|
|
7416
7062
|
|
|
@@ -7445,46 +7091,200 @@ init_esm_shims();
|
|
|
7445
7091
|
// ../string-format/src/acronyms.ts
|
|
7446
7092
|
init_esm_shims();
|
|
7447
7093
|
var ACRONYMS = [
|
|
7094
|
+
"3D",
|
|
7095
|
+
"4D",
|
|
7096
|
+
"5G",
|
|
7097
|
+
"6G",
|
|
7098
|
+
"7G",
|
|
7099
|
+
"8G",
|
|
7100
|
+
"ACID",
|
|
7101
|
+
"AES",
|
|
7102
|
+
"AI",
|
|
7103
|
+
"AJAX",
|
|
7448
7104
|
"API",
|
|
7105
|
+
"AR",
|
|
7106
|
+
"ASCII",
|
|
7107
|
+
"B2B",
|
|
7108
|
+
"B2C",
|
|
7109
|
+
"BFF",
|
|
7110
|
+
"BI",
|
|
7111
|
+
"BIOS",
|
|
7112
|
+
"BGP",
|
|
7113
|
+
"BOM",
|
|
7114
|
+
"BYOD",
|
|
7115
|
+
"C2C",
|
|
7116
|
+
"CAGR",
|
|
7117
|
+
"CAPTCHA",
|
|
7118
|
+
"CD",
|
|
7119
|
+
"CDN",
|
|
7120
|
+
"CDP",
|
|
7121
|
+
"CI",
|
|
7122
|
+
"CI/CD",
|
|
7123
|
+
"CIAM",
|
|
7124
|
+
"CICD",
|
|
7125
|
+
"CLI",
|
|
7126
|
+
"CMDB",
|
|
7127
|
+
"CORS",
|
|
7449
7128
|
"CPU",
|
|
7129
|
+
"CRUD",
|
|
7130
|
+
"CSR",
|
|
7450
7131
|
"CSS",
|
|
7132
|
+
"CX",
|
|
7133
|
+
"DAG",
|
|
7134
|
+
"DBMS",
|
|
7135
|
+
"DDoS",
|
|
7451
7136
|
"DNS",
|
|
7137
|
+
"DNSSEC",
|
|
7138
|
+
"DOM",
|
|
7139
|
+
"DR",
|
|
7140
|
+
"DRM",
|
|
7141
|
+
"DWH",
|
|
7142
|
+
"E2E",
|
|
7143
|
+
"EAI",
|
|
7144
|
+
"EKS",
|
|
7452
7145
|
"EOF",
|
|
7146
|
+
"EOD",
|
|
7147
|
+
"ETC",
|
|
7148
|
+
"ETL",
|
|
7149
|
+
"EULA",
|
|
7150
|
+
"FIDO",
|
|
7151
|
+
"FQDN",
|
|
7152
|
+
"FTP",
|
|
7153
|
+
"FaaS",
|
|
7154
|
+
"GDPR",
|
|
7155
|
+
"GCP",
|
|
7156
|
+
"GPU",
|
|
7453
7157
|
"GUID",
|
|
7158
|
+
"GUI",
|
|
7159
|
+
"GZIP",
|
|
7160
|
+
"HCI",
|
|
7161
|
+
"HDD",
|
|
7162
|
+
"HDFS",
|
|
7163
|
+
"HIPAA",
|
|
7164
|
+
"HMAC",
|
|
7165
|
+
"HOTP",
|
|
7166
|
+
"HSM",
|
|
7454
7167
|
"HTML",
|
|
7455
7168
|
"HTTP",
|
|
7169
|
+
"HTTP/2",
|
|
7170
|
+
"HTTP/2.0",
|
|
7171
|
+
"HTTP/3",
|
|
7172
|
+
"HTTP/3.0",
|
|
7173
|
+
"HTTP2",
|
|
7456
7174
|
"HTTPS",
|
|
7175
|
+
"HTTPS/2",
|
|
7176
|
+
"HTTPS/3",
|
|
7177
|
+
"HTTPS3",
|
|
7178
|
+
"IAM",
|
|
7179
|
+
"IAMM",
|
|
7180
|
+
"IAMT",
|
|
7181
|
+
"IaaS",
|
|
7457
7182
|
"ID",
|
|
7183
|
+
"IMAP",
|
|
7458
7184
|
"IP",
|
|
7185
|
+
"IPFS",
|
|
7186
|
+
"IoT",
|
|
7459
7187
|
"JSON",
|
|
7188
|
+
"JSONP",
|
|
7189
|
+
"JWT",
|
|
7190
|
+
"K8s",
|
|
7191
|
+
"KMS",
|
|
7192
|
+
"KPI",
|
|
7193
|
+
"LAN",
|
|
7460
7194
|
"LHS",
|
|
7195
|
+
"LXC",
|
|
7196
|
+
"MFA",
|
|
7197
|
+
"ML",
|
|
7198
|
+
"MLOps",
|
|
7199
|
+
"MVC",
|
|
7200
|
+
"MVP",
|
|
7201
|
+
"NAS",
|
|
7202
|
+
"NAT",
|
|
7203
|
+
"NDA",
|
|
7204
|
+
"NFS",
|
|
7205
|
+
"NIST",
|
|
7206
|
+
"NLP",
|
|
7207
|
+
"NPS",
|
|
7208
|
+
"OCR",
|
|
7461
7209
|
"OEM",
|
|
7210
|
+
"OKR",
|
|
7211
|
+
"OLAP",
|
|
7212
|
+
"OLTP",
|
|
7213
|
+
"OOP",
|
|
7214
|
+
"ORM",
|
|
7215
|
+
"OS",
|
|
7216
|
+
"OTP",
|
|
7217
|
+
"P2P",
|
|
7218
|
+
"PDP",
|
|
7219
|
+
"PaaS",
|
|
7220
|
+
"PCI",
|
|
7221
|
+
"PKI",
|
|
7462
7222
|
"PP",
|
|
7223
|
+
"PWA",
|
|
7224
|
+
"PX",
|
|
7463
7225
|
"QA",
|
|
7226
|
+
"RAID",
|
|
7464
7227
|
"RAM",
|
|
7228
|
+
"RDS",
|
|
7229
|
+
"REST",
|
|
7465
7230
|
"RHS",
|
|
7466
7231
|
"RPC",
|
|
7232
|
+
"RPA",
|
|
7233
|
+
"RUM",
|
|
7467
7234
|
"RSS",
|
|
7235
|
+
"SAN",
|
|
7236
|
+
"SASE",
|
|
7237
|
+
"SDLC",
|
|
7238
|
+
"SDK",
|
|
7239
|
+
"SEO",
|
|
7240
|
+
"SFTP",
|
|
7241
|
+
"SIEM",
|
|
7468
7242
|
"SLA",
|
|
7243
|
+
"SMB",
|
|
7469
7244
|
"SMTP",
|
|
7245
|
+
"SOAP",
|
|
7246
|
+
"SOC",
|
|
7247
|
+
"SOA",
|
|
7248
|
+
"SPDY",
|
|
7249
|
+
"SPF",
|
|
7470
7250
|
"SQL",
|
|
7251
|
+
"SRV",
|
|
7252
|
+
"SRE",
|
|
7471
7253
|
"SSH",
|
|
7254
|
+
"SSDL",
|
|
7255
|
+
"SSO",
|
|
7472
7256
|
"SSL",
|
|
7473
|
-
"
|
|
7257
|
+
"SSR",
|
|
7258
|
+
"TDD",
|
|
7259
|
+
"TLD",
|
|
7474
7260
|
"TLS",
|
|
7261
|
+
"TLS1.3",
|
|
7262
|
+
"TOTP",
|
|
7475
7263
|
"TRPC",
|
|
7476
7264
|
"TTL",
|
|
7477
7265
|
"UDP",
|
|
7478
7266
|
"UI",
|
|
7479
7267
|
"UID",
|
|
7480
|
-
"UUID",
|
|
7481
7268
|
"URI",
|
|
7482
7269
|
"URL",
|
|
7483
7270
|
"UTF",
|
|
7271
|
+
"UUID",
|
|
7272
|
+
"UX",
|
|
7484
7273
|
"VM",
|
|
7274
|
+
"VLAN",
|
|
7275
|
+
"VPN",
|
|
7276
|
+
"VR",
|
|
7277
|
+
"WAF",
|
|
7278
|
+
"WAN",
|
|
7279
|
+
"WLAN",
|
|
7280
|
+
"WPA",
|
|
7281
|
+
"XACML",
|
|
7485
7282
|
"XML",
|
|
7283
|
+
"XSRF",
|
|
7486
7284
|
"XSS",
|
|
7487
|
-
"
|
|
7285
|
+
"XR",
|
|
7286
|
+
"YAML",
|
|
7287
|
+
"ZTA"
|
|
7488
7288
|
];
|
|
7489
7289
|
|
|
7490
7290
|
// ../string-format/src/upper-case-first.ts
|
|
@@ -7499,20 +7299,16 @@ function titleCase(input) {
|
|
|
7499
7299
|
if (!input) {
|
|
7500
7300
|
return input;
|
|
7501
7301
|
}
|
|
7502
|
-
|
|
7302
|
+
const formatSegment = /* @__PURE__ */ __name((segment) => segment.toLowerCase().split(/[\s\-_]+/).filter(Boolean).map((word) => {
|
|
7303
|
+
if (ACRONYMS.includes(word.toUpperCase())) {
|
|
7304
|
+
return word.toUpperCase();
|
|
7305
|
+
}
|
|
7306
|
+
return `${upperCaseFirst(word.toLowerCase())}`;
|
|
7307
|
+
}).join(" "), "formatSegment");
|
|
7308
|
+
return input.split(/\s+-\s+/).map((part) => formatSegment(part)).join(" - ");
|
|
7503
7309
|
}
|
|
7504
7310
|
__name(titleCase, "titleCase");
|
|
7505
7311
|
|
|
7506
|
-
// ../type-checks/src/is-string.ts
|
|
7507
|
-
init_esm_shims();
|
|
7508
|
-
var isString = /* @__PURE__ */ __name((value) => {
|
|
7509
|
-
try {
|
|
7510
|
-
return typeof value === "string";
|
|
7511
|
-
} catch {
|
|
7512
|
-
return false;
|
|
7513
|
-
}
|
|
7514
|
-
}, "isString");
|
|
7515
|
-
|
|
7516
7312
|
// ../env/src/get-env-paths.ts
|
|
7517
7313
|
import os from "node:os";
|
|
7518
7314
|
import path from "node:path";
|
|
@@ -7549,7 +7345,8 @@ var linux = /* @__PURE__ */ __name((orgId) => {
|
|
|
7549
7345
|
cache: joinPaths(process.env.XDG_CACHE_HOME || joinPaths(homedir, ".cache"), orgId),
|
|
7550
7346
|
// https://wiki.debian.org/XDGBaseDirectorySpecification#state
|
|
7551
7347
|
log: joinPaths(process.env.XDG_STATE_HOME || joinPaths(homedir, ".local", "state"), orgId),
|
|
7552
|
-
|
|
7348
|
+
// https://devenv.sh/files-and-variables/#devenv_root
|
|
7349
|
+
temp: process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR ? joinPaths(process.env.DEVENV_RUNTIME || process.env.XDG_RUNTIME_DIR, orgId) : joinPaths(tmpdir, username, orgId)
|
|
7553
7350
|
};
|
|
7554
7351
|
}, "linux");
|
|
7555
7352
|
function getEnvPaths(options = {}) {
|
|
@@ -7558,7 +7355,7 @@ function getEnvPaths(options = {}) {
|
|
|
7558
7355
|
throw new Error("You need to provide an orgId to the `getEnvPaths` function");
|
|
7559
7356
|
}
|
|
7560
7357
|
if (options.suffix) {
|
|
7561
|
-
orgId += `-${
|
|
7358
|
+
orgId += `-${typeof options.suffix === "string" ? options.suffix : "nodejs"}`;
|
|
7562
7359
|
}
|
|
7563
7360
|
let result = {};
|
|
7564
7361
|
if (process.platform === "darwin") {
|
|
@@ -7568,16 +7365,16 @@ function getEnvPaths(options = {}) {
|
|
|
7568
7365
|
} else {
|
|
7569
7366
|
result = linux(orgId);
|
|
7570
7367
|
}
|
|
7571
|
-
if (process.env.
|
|
7572
|
-
result.data = process.env.
|
|
7573
|
-
} else if (process.env.
|
|
7574
|
-
result.config = process.env.
|
|
7575
|
-
} else if (process.env.
|
|
7576
|
-
result.cache = process.env.
|
|
7577
|
-
} else if (process.env.
|
|
7578
|
-
result.log = process.env.
|
|
7579
|
-
} else if (process.env.
|
|
7580
|
-
result.temp = process.env.
|
|
7368
|
+
if (process.env.STORM_DATA_DIR) {
|
|
7369
|
+
result.data = process.env.STORM_DATA_DIR;
|
|
7370
|
+
} else if (process.env.STORM_CONFIG_DIR) {
|
|
7371
|
+
result.config = process.env.STORM_CONFIG_DIR;
|
|
7372
|
+
} else if (process.env.STORM_CACHE_DIR) {
|
|
7373
|
+
result.cache = process.env.STORM_CACHE_DIR;
|
|
7374
|
+
} else if (process.env.STORM_LOG_DIR) {
|
|
7375
|
+
result.log = process.env.STORM_LOG_DIR;
|
|
7376
|
+
} else if (process.env.STORM_TEMP_DIR) {
|
|
7377
|
+
result.temp = process.env.STORM_TEMP_DIR;
|
|
7581
7378
|
}
|
|
7582
7379
|
if (options.workspaceRoot) {
|
|
7583
7380
|
result.cache ??= joinPaths(options.workspaceRoot, "node_modules", ".cache", orgId);
|
|
@@ -8403,7 +8200,7 @@ var getObjectTag = /* @__PURE__ */ __name((value) => {
|
|
|
8403
8200
|
var isObjectLike = /* @__PURE__ */ __name((obj) => {
|
|
8404
8201
|
return typeof obj === "object" && obj !== null;
|
|
8405
8202
|
}, "isObjectLike");
|
|
8406
|
-
var
|
|
8203
|
+
var isPlainObject2 = /* @__PURE__ */ __name((obj) => {
|
|
8407
8204
|
if (!isObjectLike(obj) || getObjectTag(obj) !== "[object Object]") {
|
|
8408
8205
|
return false;
|
|
8409
8206
|
}
|
|
@@ -8420,22 +8217,29 @@ var isPlainObject = /* @__PURE__ */ __name((obj) => {
|
|
|
8420
8217
|
// ../type-checks/src/is-object.ts
|
|
8421
8218
|
var isObject = /* @__PURE__ */ __name((value) => {
|
|
8422
8219
|
try {
|
|
8423
|
-
return typeof value === "object" || Boolean(value) && value?.constructor === Object ||
|
|
8220
|
+
return typeof value === "object" || Boolean(value) && value?.constructor === Object || isPlainObject2(value);
|
|
8424
8221
|
} catch {
|
|
8425
8222
|
return false;
|
|
8426
8223
|
}
|
|
8427
8224
|
}, "isObject");
|
|
8428
8225
|
|
|
8429
|
-
// ../
|
|
8430
|
-
|
|
8226
|
+
// ../type-checks/src/is-string.ts
|
|
8227
|
+
init_esm_shims();
|
|
8228
|
+
var isString2 = /* @__PURE__ */ __name((value) => {
|
|
8229
|
+
try {
|
|
8230
|
+
return typeof value === "string";
|
|
8231
|
+
} catch {
|
|
8232
|
+
return false;
|
|
8233
|
+
}
|
|
8234
|
+
}, "isString");
|
|
8431
8235
|
|
|
8432
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.
|
|
8236
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/main.js
|
|
8433
8237
|
init_esm_shims();
|
|
8434
8238
|
|
|
8435
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.
|
|
8239
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/format.js
|
|
8436
8240
|
init_esm_shims();
|
|
8437
8241
|
|
|
8438
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.
|
|
8242
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
8439
8243
|
init_esm_shims();
|
|
8440
8244
|
function createScanner(text, ignoreTrivia = false) {
|
|
8441
8245
|
const len = text.length;
|
|
@@ -8868,41 +8672,10 @@ var CharacterCodes;
|
|
|
8868
8672
|
CharacterCodes2[CharacterCodes2["tab"] = 9] = "tab";
|
|
8869
8673
|
})(CharacterCodes || (CharacterCodes = {}));
|
|
8870
8674
|
|
|
8871
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.
|
|
8872
|
-
init_esm_shims();
|
|
8873
|
-
var cachedSpaces = new Array(20).fill(0).map((_, index) => {
|
|
8874
|
-
return " ".repeat(index);
|
|
8875
|
-
});
|
|
8876
|
-
var maxCachedValues = 200;
|
|
8877
|
-
var cachedBreakLinesWithSpaces = {
|
|
8878
|
-
" ": {
|
|
8879
|
-
"\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
8880
|
-
return "\n" + " ".repeat(index);
|
|
8881
|
-
}),
|
|
8882
|
-
"\r": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
8883
|
-
return "\r" + " ".repeat(index);
|
|
8884
|
-
}),
|
|
8885
|
-
"\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
8886
|
-
return "\r\n" + " ".repeat(index);
|
|
8887
|
-
})
|
|
8888
|
-
},
|
|
8889
|
-
" ": {
|
|
8890
|
-
"\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
8891
|
-
return "\n" + " ".repeat(index);
|
|
8892
|
-
}),
|
|
8893
|
-
"\r": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
8894
|
-
return "\r" + " ".repeat(index);
|
|
8895
|
-
}),
|
|
8896
|
-
"\r\n": new Array(maxCachedValues).fill(0).map((_, index) => {
|
|
8897
|
-
return "\r\n" + " ".repeat(index);
|
|
8898
|
-
})
|
|
8899
|
-
}
|
|
8900
|
-
};
|
|
8901
|
-
|
|
8902
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/edit.js
|
|
8675
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/edit.js
|
|
8903
8676
|
init_esm_shims();
|
|
8904
8677
|
|
|
8905
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.
|
|
8678
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/impl/parser.js
|
|
8906
8679
|
init_esm_shims();
|
|
8907
8680
|
var ParseOptions;
|
|
8908
8681
|
(function(ParseOptions2) {
|
|
@@ -8962,44 +8735,23 @@ __name(parse, "parse");
|
|
|
8962
8735
|
function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
8963
8736
|
const _scanner = createScanner(text, false);
|
|
8964
8737
|
const _jsonPath = [];
|
|
8965
|
-
let suppressedCallbacks = 0;
|
|
8966
8738
|
function toNoArgVisit(visitFunction) {
|
|
8967
|
-
return visitFunction ? () =>
|
|
8739
|
+
return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true;
|
|
8968
8740
|
}
|
|
8969
8741
|
__name(toNoArgVisit, "toNoArgVisit");
|
|
8742
|
+
function toNoArgVisitWithPath(visitFunction) {
|
|
8743
|
+
return visitFunction ? () => visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true;
|
|
8744
|
+
}
|
|
8745
|
+
__name(toNoArgVisitWithPath, "toNoArgVisitWithPath");
|
|
8970
8746
|
function toOneArgVisit(visitFunction) {
|
|
8971
|
-
return visitFunction ? (arg) =>
|
|
8747
|
+
return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()) : () => true;
|
|
8972
8748
|
}
|
|
8973
8749
|
__name(toOneArgVisit, "toOneArgVisit");
|
|
8974
8750
|
function toOneArgVisitWithPath(visitFunction) {
|
|
8975
|
-
return visitFunction ? (arg) =>
|
|
8751
|
+
return visitFunction ? (arg) => visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice()) : () => true;
|
|
8976
8752
|
}
|
|
8977
8753
|
__name(toOneArgVisitWithPath, "toOneArgVisitWithPath");
|
|
8978
|
-
|
|
8979
|
-
return visitFunction ? () => {
|
|
8980
|
-
if (suppressedCallbacks > 0) {
|
|
8981
|
-
suppressedCallbacks++;
|
|
8982
|
-
} else {
|
|
8983
|
-
let cbReturn = visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter(), () => _jsonPath.slice());
|
|
8984
|
-
if (cbReturn === false) {
|
|
8985
|
-
suppressedCallbacks = 1;
|
|
8986
|
-
}
|
|
8987
|
-
}
|
|
8988
|
-
} : () => true;
|
|
8989
|
-
}
|
|
8990
|
-
__name(toBeginVisit, "toBeginVisit");
|
|
8991
|
-
function toEndVisit(visitFunction) {
|
|
8992
|
-
return visitFunction ? () => {
|
|
8993
|
-
if (suppressedCallbacks > 0) {
|
|
8994
|
-
suppressedCallbacks--;
|
|
8995
|
-
}
|
|
8996
|
-
if (suppressedCallbacks === 0) {
|
|
8997
|
-
visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter());
|
|
8998
|
-
}
|
|
8999
|
-
} : () => true;
|
|
9000
|
-
}
|
|
9001
|
-
__name(toEndVisit, "toEndVisit");
|
|
9002
|
-
const onObjectBegin = toBeginVisit(visitor.onObjectBegin), onObjectProperty = toOneArgVisitWithPath(visitor.onObjectProperty), onObjectEnd = toEndVisit(visitor.onObjectEnd), onArrayBegin = toBeginVisit(visitor.onArrayBegin), onArrayEnd = toEndVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisitWithPath(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);
|
|
8754
|
+
const onObjectBegin = toNoArgVisitWithPath(visitor.onObjectBegin), onObjectProperty = toOneArgVisitWithPath(visitor.onObjectProperty), onObjectEnd = toNoArgVisit(visitor.onObjectEnd), onArrayBegin = toNoArgVisitWithPath(visitor.onArrayBegin), onArrayEnd = toNoArgVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisitWithPath(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);
|
|
9003
8755
|
const disallowComments = options && options.disallowComments;
|
|
9004
8756
|
const allowTrailingComma = options && options.allowTrailingComma;
|
|
9005
8757
|
function scanNext() {
|
|
@@ -9279,7 +9031,7 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
|
9279
9031
|
}
|
|
9280
9032
|
__name(visit, "visit");
|
|
9281
9033
|
|
|
9282
|
-
// ../../node_modules/.pnpm/jsonc-parser@3.
|
|
9034
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.2.0/node_modules/jsonc-parser/lib/esm/main.js
|
|
9283
9035
|
var ScanError;
|
|
9284
9036
|
(function(ScanError2) {
|
|
9285
9037
|
ScanError2[ScanError2["None"] = 0] = "None";
|
|
@@ -9369,6 +9121,9 @@ function printParseErrorCode(code) {
|
|
|
9369
9121
|
}
|
|
9370
9122
|
__name(printParseErrorCode, "printParseErrorCode");
|
|
9371
9123
|
|
|
9124
|
+
// ../json/src/storm-json.ts
|
|
9125
|
+
import { Buffer as Buffer2 } from "node:buffer";
|
|
9126
|
+
|
|
9372
9127
|
// ../../node_modules/.pnpm/superjson@2.2.2/node_modules/superjson/dist/index.js
|
|
9373
9128
|
init_esm_shims();
|
|
9374
9129
|
|
|
@@ -9494,10 +9249,10 @@ function forEach(record, run) {
|
|
|
9494
9249
|
Object.entries(record).forEach(([key, value]) => run(value, key));
|
|
9495
9250
|
}
|
|
9496
9251
|
__name(forEach, "forEach");
|
|
9497
|
-
function
|
|
9252
|
+
function includes2(arr, value) {
|
|
9498
9253
|
return arr.indexOf(value) !== -1;
|
|
9499
9254
|
}
|
|
9500
|
-
__name(
|
|
9255
|
+
__name(includes2, "includes");
|
|
9501
9256
|
function findArr(record, predicate) {
|
|
9502
9257
|
for (let i = 0; i < record.length; i++) {
|
|
9503
9258
|
const value = record[i];
|
|
@@ -9536,25 +9291,25 @@ init_esm_shims();
|
|
|
9536
9291
|
var getType = /* @__PURE__ */ __name((payload) => Object.prototype.toString.call(payload).slice(8, -1), "getType");
|
|
9537
9292
|
var isUndefined = /* @__PURE__ */ __name((payload) => typeof payload === "undefined", "isUndefined");
|
|
9538
9293
|
var isNull = /* @__PURE__ */ __name((payload) => payload === null, "isNull");
|
|
9539
|
-
var
|
|
9294
|
+
var isPlainObject3 = /* @__PURE__ */ __name((payload) => {
|
|
9540
9295
|
if (typeof payload !== "object" || payload === null) return false;
|
|
9541
9296
|
if (payload === Object.prototype) return false;
|
|
9542
9297
|
if (Object.getPrototypeOf(payload) === null) return true;
|
|
9543
9298
|
return Object.getPrototypeOf(payload) === Object.prototype;
|
|
9544
9299
|
}, "isPlainObject");
|
|
9545
|
-
var isEmptyObject = /* @__PURE__ */ __name((payload) =>
|
|
9300
|
+
var isEmptyObject = /* @__PURE__ */ __name((payload) => isPlainObject3(payload) && Object.keys(payload).length === 0, "isEmptyObject");
|
|
9546
9301
|
var isArray = /* @__PURE__ */ __name((payload) => Array.isArray(payload), "isArray");
|
|
9547
|
-
var
|
|
9548
|
-
var
|
|
9549
|
-
var
|
|
9302
|
+
var isString3 = /* @__PURE__ */ __name((payload) => typeof payload === "string", "isString");
|
|
9303
|
+
var isNumber2 = /* @__PURE__ */ __name((payload) => typeof payload === "number" && !isNaN(payload), "isNumber");
|
|
9304
|
+
var isBoolean2 = /* @__PURE__ */ __name((payload) => typeof payload === "boolean", "isBoolean");
|
|
9550
9305
|
var isRegExp = /* @__PURE__ */ __name((payload) => payload instanceof RegExp, "isRegExp");
|
|
9551
9306
|
var isMap = /* @__PURE__ */ __name((payload) => payload instanceof Map, "isMap");
|
|
9552
9307
|
var isSet = /* @__PURE__ */ __name((payload) => payload instanceof Set, "isSet");
|
|
9553
9308
|
var isSymbol = /* @__PURE__ */ __name((payload) => getType(payload) === "Symbol", "isSymbol");
|
|
9554
|
-
var
|
|
9309
|
+
var isDate2 = /* @__PURE__ */ __name((payload) => payload instanceof Date && !isNaN(payload.valueOf()), "isDate");
|
|
9555
9310
|
var isError = /* @__PURE__ */ __name((payload) => payload instanceof Error, "isError");
|
|
9556
9311
|
var isNaNValue = /* @__PURE__ */ __name((payload) => typeof payload === "number" && isNaN(payload), "isNaNValue");
|
|
9557
|
-
var isPrimitive = /* @__PURE__ */ __name((payload) =>
|
|
9312
|
+
var isPrimitive = /* @__PURE__ */ __name((payload) => isBoolean2(payload) || isNull(payload) || isUndefined(payload) || isNumber2(payload) || isString3(payload) || isSymbol(payload), "isPrimitive");
|
|
9558
9313
|
var isBigint = /* @__PURE__ */ __name((payload) => typeof payload === "bigint", "isBigint");
|
|
9559
9314
|
var isInfinite = /* @__PURE__ */ __name((payload) => payload === Infinity || payload === -Infinity, "isInfinite");
|
|
9560
9315
|
var isTypedArray = /* @__PURE__ */ __name((payload) => ArrayBuffer.isView(payload) && !(payload instanceof DataView), "isTypedArray");
|
|
@@ -9608,7 +9363,7 @@ var simpleRules = [
|
|
|
9608
9363
|
console.error("Please add a BigInt polyfill.");
|
|
9609
9364
|
return v;
|
|
9610
9365
|
}),
|
|
9611
|
-
simpleTransformation(
|
|
9366
|
+
simpleTransformation(isDate2, "Date", (v) => v.toISOString(), (v) => new Date(v)),
|
|
9612
9367
|
simpleTransformation(isError, "Error", (v, superJson) => {
|
|
9613
9368
|
const baseError = {
|
|
9614
9369
|
name: v.name,
|
|
@@ -9819,21 +9574,21 @@ var untransformValue = /* @__PURE__ */ __name((json, type, superJson) => {
|
|
|
9819
9574
|
init_esm_shims();
|
|
9820
9575
|
var getNthKey = /* @__PURE__ */ __name((value, n) => {
|
|
9821
9576
|
if (n > value.size) throw new Error("index out of bounds");
|
|
9822
|
-
const
|
|
9577
|
+
const keys2 = value.keys();
|
|
9823
9578
|
while (n > 0) {
|
|
9824
|
-
|
|
9579
|
+
keys2.next();
|
|
9825
9580
|
n--;
|
|
9826
9581
|
}
|
|
9827
|
-
return
|
|
9582
|
+
return keys2.next().value;
|
|
9828
9583
|
}, "getNthKey");
|
|
9829
9584
|
function validatePath(path6) {
|
|
9830
|
-
if (
|
|
9585
|
+
if (includes2(path6, "__proto__")) {
|
|
9831
9586
|
throw new Error("__proto__ is not allowed as a property");
|
|
9832
9587
|
}
|
|
9833
|
-
if (
|
|
9588
|
+
if (includes2(path6, "prototype")) {
|
|
9834
9589
|
throw new Error("prototype is not allowed as a property");
|
|
9835
9590
|
}
|
|
9836
|
-
if (
|
|
9591
|
+
if (includes2(path6, "constructor")) {
|
|
9837
9592
|
throw new Error("constructor is not allowed as a property");
|
|
9838
9593
|
}
|
|
9839
9594
|
}
|
|
@@ -9873,7 +9628,7 @@ var setDeep = /* @__PURE__ */ __name((object, path6, mapper) => {
|
|
|
9873
9628
|
if (isArray(parent)) {
|
|
9874
9629
|
const index = +key;
|
|
9875
9630
|
parent = parent[index];
|
|
9876
|
-
} else if (
|
|
9631
|
+
} else if (isPlainObject3(parent)) {
|
|
9877
9632
|
parent = parent[key];
|
|
9878
9633
|
} else if (isSet(parent)) {
|
|
9879
9634
|
const row = +key;
|
|
@@ -9899,7 +9654,7 @@ var setDeep = /* @__PURE__ */ __name((object, path6, mapper) => {
|
|
|
9899
9654
|
const lastKey = path6[path6.length - 1];
|
|
9900
9655
|
if (isArray(parent)) {
|
|
9901
9656
|
parent[+lastKey] = mapper(parent[+lastKey]);
|
|
9902
|
-
} else if (
|
|
9657
|
+
} else if (isPlainObject3(parent)) {
|
|
9903
9658
|
parent[lastKey] = mapper(parent[lastKey]);
|
|
9904
9659
|
}
|
|
9905
9660
|
if (isSet(parent)) {
|
|
@@ -9964,28 +9719,28 @@ function applyValueAnnotations(plain, annotations, superJson) {
|
|
|
9964
9719
|
}
|
|
9965
9720
|
__name(applyValueAnnotations, "applyValueAnnotations");
|
|
9966
9721
|
function applyReferentialEqualityAnnotations(plain, annotations) {
|
|
9967
|
-
function
|
|
9722
|
+
function apply2(identicalPaths, path6) {
|
|
9968
9723
|
const object = getDeep(plain, parsePath(path6));
|
|
9969
9724
|
identicalPaths.map(parsePath).forEach((identicalObjectPath) => {
|
|
9970
9725
|
plain = setDeep(plain, identicalObjectPath, () => object);
|
|
9971
9726
|
});
|
|
9972
9727
|
}
|
|
9973
|
-
__name(
|
|
9728
|
+
__name(apply2, "apply");
|
|
9974
9729
|
if (isArray(annotations)) {
|
|
9975
9730
|
const [root, other] = annotations;
|
|
9976
9731
|
root.forEach((identicalPath) => {
|
|
9977
9732
|
plain = setDeep(plain, parsePath(identicalPath), () => plain);
|
|
9978
9733
|
});
|
|
9979
9734
|
if (other) {
|
|
9980
|
-
forEach(other,
|
|
9735
|
+
forEach(other, apply2);
|
|
9981
9736
|
}
|
|
9982
9737
|
} else {
|
|
9983
|
-
forEach(annotations,
|
|
9738
|
+
forEach(annotations, apply2);
|
|
9984
9739
|
}
|
|
9985
9740
|
return plain;
|
|
9986
9741
|
}
|
|
9987
9742
|
__name(applyReferentialEqualityAnnotations, "applyReferentialEqualityAnnotations");
|
|
9988
|
-
var isDeep = /* @__PURE__ */ __name((object, superJson) =>
|
|
9743
|
+
var isDeep = /* @__PURE__ */ __name((object, superJson) => isPlainObject3(object) || isArray(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson), "isDeep");
|
|
9989
9744
|
function addIdentity(object, path6, identities) {
|
|
9990
9745
|
const existingSet = identities.get(object);
|
|
9991
9746
|
if (existingSet) {
|
|
@@ -10056,7 +9811,7 @@ var walker = /* @__PURE__ */ __name((object, identities, superJson, dedupe, path
|
|
|
10056
9811
|
}
|
|
10057
9812
|
return result2;
|
|
10058
9813
|
}
|
|
10059
|
-
if (
|
|
9814
|
+
if (includes2(objectsInThisPath, object)) {
|
|
10060
9815
|
return {
|
|
10061
9816
|
transformedValue: null
|
|
10062
9817
|
};
|
|
@@ -10079,7 +9834,7 @@ var walker = /* @__PURE__ */ __name((object, identities, superJson, dedupe, path
|
|
|
10079
9834
|
transformedValue[index] = recursiveResult.transformedValue;
|
|
10080
9835
|
if (isArray(recursiveResult.annotations)) {
|
|
10081
9836
|
innerAnnotations[index] = recursiveResult.annotations;
|
|
10082
|
-
} else if (
|
|
9837
|
+
} else if (isPlainObject3(recursiveResult.annotations)) {
|
|
10083
9838
|
forEach(recursiveResult.annotations, (tree, key) => {
|
|
10084
9839
|
innerAnnotations[escapeKey(index) + "." + key] = tree;
|
|
10085
9840
|
});
|
|
@@ -10116,18 +9871,18 @@ function isArray2(payload) {
|
|
|
10116
9871
|
return getType2(payload) === "Array";
|
|
10117
9872
|
}
|
|
10118
9873
|
__name(isArray2, "isArray");
|
|
10119
|
-
function
|
|
9874
|
+
function isPlainObject4(payload) {
|
|
10120
9875
|
if (getType2(payload) !== "Object") return false;
|
|
10121
9876
|
const prototype = Object.getPrototypeOf(payload);
|
|
10122
9877
|
return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
|
|
10123
9878
|
}
|
|
10124
|
-
__name(
|
|
9879
|
+
__name(isPlainObject4, "isPlainObject");
|
|
10125
9880
|
function isNull2(payload) {
|
|
10126
9881
|
return getType2(payload) === "Null";
|
|
10127
9882
|
}
|
|
10128
9883
|
__name(isNull2, "isNull");
|
|
10129
|
-
function isOneOf(a, b, c,
|
|
10130
|
-
return (value) => a(value) || b(value) || !!c && c(value) || !!
|
|
9884
|
+
function isOneOf(a, b, c, d2, e) {
|
|
9885
|
+
return (value) => a(value) || b(value) || !!c && c(value) || !!d2 && d2(value) || !!e && e(value);
|
|
10131
9886
|
}
|
|
10132
9887
|
__name(isOneOf, "isOneOf");
|
|
10133
9888
|
function isUndefined2(payload) {
|
|
@@ -10154,7 +9909,7 @@ function copy(target, options = {}) {
|
|
|
10154
9909
|
if (isArray2(target)) {
|
|
10155
9910
|
return target.map((item) => copy(item, options));
|
|
10156
9911
|
}
|
|
10157
|
-
if (!
|
|
9912
|
+
if (!isPlainObject4(target)) {
|
|
10158
9913
|
return target;
|
|
10159
9914
|
}
|
|
10160
9915
|
const props = Object.getOwnPropertyNames(target);
|
|
@@ -10263,6 +10018,102 @@ var allowErrorProps = SuperJSON.allowErrorProps;
|
|
|
10263
10018
|
|
|
10264
10019
|
// ../json/src/utils/parse.ts
|
|
10265
10020
|
init_esm_shims();
|
|
10021
|
+
|
|
10022
|
+
// ../json/src/utils/strip-comments.ts
|
|
10023
|
+
init_esm_shims();
|
|
10024
|
+
var singleComment = Symbol("singleComment");
|
|
10025
|
+
var multiComment = Symbol("multiComment");
|
|
10026
|
+
function stripWithoutWhitespace() {
|
|
10027
|
+
return "";
|
|
10028
|
+
}
|
|
10029
|
+
__name(stripWithoutWhitespace, "stripWithoutWhitespace");
|
|
10030
|
+
function stripWithWhitespace(value, start, end) {
|
|
10031
|
+
return value.slice(start, end).replace(/\S/g, " ");
|
|
10032
|
+
}
|
|
10033
|
+
__name(stripWithWhitespace, "stripWithWhitespace");
|
|
10034
|
+
function isEscaped(value, quotePosition) {
|
|
10035
|
+
let index = quotePosition - 1;
|
|
10036
|
+
let backslashCount = 0;
|
|
10037
|
+
while (value[index] === "\\") {
|
|
10038
|
+
index -= 1;
|
|
10039
|
+
backslashCount += 1;
|
|
10040
|
+
}
|
|
10041
|
+
return Boolean(backslashCount % 2);
|
|
10042
|
+
}
|
|
10043
|
+
__name(isEscaped, "isEscaped");
|
|
10044
|
+
function stripComments2(value, { whitespace = true, trailingCommas = false } = {}) {
|
|
10045
|
+
if (typeof value !== "string") {
|
|
10046
|
+
throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof value}\``);
|
|
10047
|
+
}
|
|
10048
|
+
const strip = whitespace ? stripWithWhitespace : stripWithoutWhitespace;
|
|
10049
|
+
let isInsideString = false;
|
|
10050
|
+
let isInsideComment = false;
|
|
10051
|
+
let offset = 0;
|
|
10052
|
+
let buffer = "";
|
|
10053
|
+
let result = "";
|
|
10054
|
+
let commaIndex = -1;
|
|
10055
|
+
for (let index = 0; index < value.length; index++) {
|
|
10056
|
+
const currentCharacter = value[index];
|
|
10057
|
+
const nextCharacter = value[index + 1];
|
|
10058
|
+
if (!isInsideComment && currentCharacter === '"') {
|
|
10059
|
+
const escaped = isEscaped(value, index);
|
|
10060
|
+
if (!escaped) {
|
|
10061
|
+
isInsideString = !isInsideString;
|
|
10062
|
+
}
|
|
10063
|
+
}
|
|
10064
|
+
if (isInsideString) {
|
|
10065
|
+
continue;
|
|
10066
|
+
}
|
|
10067
|
+
if (!isInsideComment && currentCharacter + (nextCharacter ?? EMPTY_STRING) === "//") {
|
|
10068
|
+
buffer += value.slice(offset, index);
|
|
10069
|
+
offset = index;
|
|
10070
|
+
isInsideComment = singleComment;
|
|
10071
|
+
index++;
|
|
10072
|
+
} else if (isInsideComment === singleComment && currentCharacter + (nextCharacter ?? EMPTY_STRING) === "\r\n") {
|
|
10073
|
+
index++;
|
|
10074
|
+
isInsideComment = false;
|
|
10075
|
+
buffer += strip(value, offset, index);
|
|
10076
|
+
offset = index;
|
|
10077
|
+
} else if (isInsideComment === singleComment && currentCharacter === "\n") {
|
|
10078
|
+
isInsideComment = false;
|
|
10079
|
+
buffer += strip(value, offset, index);
|
|
10080
|
+
offset = index;
|
|
10081
|
+
} else if (!isInsideComment && currentCharacter + (nextCharacter ?? EMPTY_STRING) === "/*") {
|
|
10082
|
+
buffer += value.slice(offset, index);
|
|
10083
|
+
offset = index;
|
|
10084
|
+
isInsideComment = multiComment;
|
|
10085
|
+
index++;
|
|
10086
|
+
} else if (isInsideComment === multiComment && currentCharacter + (nextCharacter ?? EMPTY_STRING) === "*/") {
|
|
10087
|
+
index++;
|
|
10088
|
+
isInsideComment = false;
|
|
10089
|
+
buffer += strip(value, offset, index + 1);
|
|
10090
|
+
offset = index + 1;
|
|
10091
|
+
} else if (trailingCommas && !isInsideComment) {
|
|
10092
|
+
if (commaIndex !== -1) {
|
|
10093
|
+
if (currentCharacter === "}" || currentCharacter === "]") {
|
|
10094
|
+
buffer += value.slice(offset, index);
|
|
10095
|
+
result += strip(buffer, 0, 1) + buffer.slice(1);
|
|
10096
|
+
buffer = "";
|
|
10097
|
+
offset = index;
|
|
10098
|
+
commaIndex = -1;
|
|
10099
|
+
} else if (currentCharacter !== " " && currentCharacter !== " " && currentCharacter !== "\r" && currentCharacter !== "\n") {
|
|
10100
|
+
buffer += value.slice(offset, index);
|
|
10101
|
+
offset = index;
|
|
10102
|
+
commaIndex = -1;
|
|
10103
|
+
}
|
|
10104
|
+
} else if (currentCharacter === ",") {
|
|
10105
|
+
result += buffer + value.slice(offset, index);
|
|
10106
|
+
buffer = "";
|
|
10107
|
+
offset = index;
|
|
10108
|
+
commaIndex = index;
|
|
10109
|
+
}
|
|
10110
|
+
}
|
|
10111
|
+
}
|
|
10112
|
+
return result + buffer + (isInsideComment ? strip(value.slice(offset)) : value.slice(offset));
|
|
10113
|
+
}
|
|
10114
|
+
__name(stripComments2, "stripComments");
|
|
10115
|
+
|
|
10116
|
+
// ../json/src/utils/parse.ts
|
|
10266
10117
|
var suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
|
|
10267
10118
|
var suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
10268
10119
|
var JsonSigRx = /^\s*["[{]|^\s*-?\d{1,16}(?:\.\d{1,17})?(?:E[+-]?\d+)?\s*$/i;
|
|
@@ -10278,12 +10129,13 @@ function parse4(value, options = {}) {
|
|
|
10278
10129
|
if (typeof value !== "string") {
|
|
10279
10130
|
return value;
|
|
10280
10131
|
}
|
|
10281
|
-
|
|
10282
|
-
|
|
10132
|
+
let stripped = stripComments2(value);
|
|
10133
|
+
if (stripped[0] === '"' && stripped[stripped.length - 1] === '"' && !stripped.includes("\\")) {
|
|
10134
|
+
return stripped.slice(1, -1);
|
|
10283
10135
|
}
|
|
10284
|
-
|
|
10285
|
-
if (
|
|
10286
|
-
switch (
|
|
10136
|
+
stripped = stripped.trim();
|
|
10137
|
+
if (stripped.length <= 9) {
|
|
10138
|
+
switch (stripped.toLowerCase()) {
|
|
10287
10139
|
case "true": {
|
|
10288
10140
|
return true;
|
|
10289
10141
|
}
|
|
@@ -10307,20 +10159,20 @@ function parse4(value, options = {}) {
|
|
|
10307
10159
|
}
|
|
10308
10160
|
}
|
|
10309
10161
|
}
|
|
10310
|
-
if (!JsonSigRx.test(
|
|
10162
|
+
if (!JsonSigRx.test(stripped)) {
|
|
10311
10163
|
if (options.strict) {
|
|
10312
10164
|
throw new Error("Invalid JSON");
|
|
10313
10165
|
}
|
|
10314
|
-
return
|
|
10166
|
+
return stripped;
|
|
10315
10167
|
}
|
|
10316
10168
|
try {
|
|
10317
|
-
if (suspectProtoRx.test(
|
|
10169
|
+
if (suspectProtoRx.test(stripped) || suspectConstructorRx.test(stripped)) {
|
|
10318
10170
|
if (options.strict) {
|
|
10319
10171
|
throw new Error("Possible prototype pollution");
|
|
10320
10172
|
}
|
|
10321
|
-
return JSON.parse(
|
|
10173
|
+
return JSON.parse(stripped, jsonParseTransform);
|
|
10322
10174
|
}
|
|
10323
|
-
return JSON.parse(
|
|
10175
|
+
return JSON.parse(stripped);
|
|
10324
10176
|
} catch (error) {
|
|
10325
10177
|
if (options.strict) {
|
|
10326
10178
|
throw error;
|
|
@@ -10528,7 +10380,7 @@ init_esm_shims();
|
|
|
10528
10380
|
|
|
10529
10381
|
// ../type-checks/src/is-number.ts
|
|
10530
10382
|
init_esm_shims();
|
|
10531
|
-
var
|
|
10383
|
+
var isNumber3 = /* @__PURE__ */ __name((value) => {
|
|
10532
10384
|
try {
|
|
10533
10385
|
return value instanceof Number || typeof value === "number" || Number(value) === value;
|
|
10534
10386
|
} catch {
|
|
@@ -10536,9 +10388,49 @@ var isNumber2 = /* @__PURE__ */ __name((value) => {
|
|
|
10536
10388
|
}
|
|
10537
10389
|
}, "isNumber");
|
|
10538
10390
|
|
|
10391
|
+
// ../type-checks/src/is-undefined.ts
|
|
10392
|
+
init_esm_shims();
|
|
10393
|
+
var isUndefined3 = /* @__PURE__ */ __name((value) => {
|
|
10394
|
+
return value === void 0;
|
|
10395
|
+
}, "isUndefined");
|
|
10396
|
+
|
|
10539
10397
|
// ../json/src/utils/stringify.ts
|
|
10398
|
+
var invalidKeyChars = [
|
|
10399
|
+
"@",
|
|
10400
|
+
"/",
|
|
10401
|
+
"#",
|
|
10402
|
+
"$",
|
|
10403
|
+
" ",
|
|
10404
|
+
":",
|
|
10405
|
+
";",
|
|
10406
|
+
",",
|
|
10407
|
+
".",
|
|
10408
|
+
"!",
|
|
10409
|
+
"?",
|
|
10410
|
+
"&",
|
|
10411
|
+
"=",
|
|
10412
|
+
"+",
|
|
10413
|
+
"-",
|
|
10414
|
+
"*",
|
|
10415
|
+
"%",
|
|
10416
|
+
"^",
|
|
10417
|
+
"~",
|
|
10418
|
+
"|",
|
|
10419
|
+
"\\",
|
|
10420
|
+
'"',
|
|
10421
|
+
"'",
|
|
10422
|
+
"`",
|
|
10423
|
+
"{",
|
|
10424
|
+
"}",
|
|
10425
|
+
"[",
|
|
10426
|
+
"]",
|
|
10427
|
+
"(",
|
|
10428
|
+
")",
|
|
10429
|
+
"<",
|
|
10430
|
+
">"
|
|
10431
|
+
];
|
|
10540
10432
|
var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
10541
|
-
const space =
|
|
10433
|
+
const space = isNumber3(spacing) ? " ".repeat(spacing) : spacing;
|
|
10542
10434
|
switch (value) {
|
|
10543
10435
|
case null: {
|
|
10544
10436
|
return "null";
|
|
@@ -10573,8 +10465,8 @@ var stringify2 = /* @__PURE__ */ __name((value, spacing = 2) => {
|
|
|
10573
10465
|
return JSON.stringify(value);
|
|
10574
10466
|
}
|
|
10575
10467
|
case "object": {
|
|
10576
|
-
const
|
|
10577
|
-
return `{${space}${
|
|
10468
|
+
const keys2 = Object.keys(value).filter((key) => !isUndefined3(value[key]));
|
|
10469
|
+
return `{${space}${keys2.map((key) => `${invalidKeyChars.some((invalidKeyChar) => key.includes(invalidKeyChar)) ? `"${key}"` : key}: ${space}${stringify2(value[key], space)}`).join(`,${space}`)}${space}}`;
|
|
10578
10470
|
}
|
|
10579
10471
|
default:
|
|
10580
10472
|
return "null";
|
|
@@ -10678,7 +10570,7 @@ var StormJSON = class _StormJSON extends SuperJSON {
|
|
|
10678
10570
|
*/
|
|
10679
10571
|
static registerClass(classConstructor, options) {
|
|
10680
10572
|
_StormJSON.instance.registerClass(classConstructor, {
|
|
10681
|
-
identifier:
|
|
10573
|
+
identifier: isString2(options) ? options : options?.identifier || classConstructor.name,
|
|
10682
10574
|
allowProps: options && isObject(options) && options?.allowProps && Array.isArray(options.allowProps) ? options.allowProps : [
|
|
10683
10575
|
"__typename"
|
|
10684
10576
|
]
|
|
@@ -10691,12 +10583,13 @@ var StormJSON = class _StormJSON extends SuperJSON {
|
|
|
10691
10583
|
}
|
|
10692
10584
|
};
|
|
10693
10585
|
StormJSON.instance.registerCustom({
|
|
10694
|
-
isApplicable: /* @__PURE__ */ __name((v) =>
|
|
10586
|
+
isApplicable: /* @__PURE__ */ __name((v) => Buffer2.isBuffer(v), "isApplicable"),
|
|
10695
10587
|
serialize: /* @__PURE__ */ __name((v) => v.toString("base64"), "serialize"),
|
|
10696
|
-
deserialize: /* @__PURE__ */ __name((v) =>
|
|
10588
|
+
deserialize: /* @__PURE__ */ __name((v) => Buffer2.from(v, "base64"), "deserialize")
|
|
10697
10589
|
}, "Bytes");
|
|
10698
10590
|
|
|
10699
10591
|
// ../fs/src/write-file.ts
|
|
10592
|
+
init_defu();
|
|
10700
10593
|
import { writeFile as writeFileFs } from "node:fs/promises";
|
|
10701
10594
|
var writeFile = /* @__PURE__ */ __name(async (filePath, content = "", options = {}) => {
|
|
10702
10595
|
if (!filePath) {
|
|
@@ -10953,8 +10846,8 @@ function resolveMongoDbRawOperations(modelOperations) {
|
|
|
10953
10846
|
const rawOpsMap = {};
|
|
10954
10847
|
const rawOpsNames = [
|
|
10955
10848
|
...new Set(modelOperations.reduce((result, current) => {
|
|
10956
|
-
const
|
|
10957
|
-
|
|
10849
|
+
const keys2 = Object.keys(current);
|
|
10850
|
+
keys2?.forEach((key) => {
|
|
10958
10851
|
if (key.includes("Raw")) {
|
|
10959
10852
|
result.push(key);
|
|
10960
10853
|
}
|
|
@@ -11100,8 +10993,8 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11100
10993
|
} else if (inputType.type === "Bytes") {
|
|
11101
10994
|
result.push(this.wrapWithZodValidators("z.instanceof(Buffer)", field));
|
|
11102
10995
|
} else if (!inputType.type.endsWith("FieldRefInput")) {
|
|
11103
|
-
const
|
|
11104
|
-
if (inputType.namespace === "prisma" ||
|
|
10996
|
+
const isEnum2 = inputType.location === "enumTypes";
|
|
10997
|
+
if (inputType.namespace === "prisma" || isEnum2) {
|
|
11105
10998
|
if (inputType.type !== this.name && typeof inputType.type === "string") {
|
|
11106
10999
|
this.addSchemaImport(inputType.type);
|
|
11107
11000
|
}
|
|
@@ -11145,12 +11038,12 @@ ${this.generateExportSchemaStatement(`${lowerCaseFirst(name)}`, `z.enum(${JSON.s
|
|
|
11145
11038
|
this.schemaImports.add(name);
|
|
11146
11039
|
}
|
|
11147
11040
|
generatePrismaStringLine(field, inputType, inputsLength) {
|
|
11148
|
-
const
|
|
11041
|
+
const isEnum2 = inputType.location === "enumTypes";
|
|
11149
11042
|
const inputTypeString = inputType.type;
|
|
11150
11043
|
const { isModelQueryType, modelName, queryName } = this.checkIsModelQueryType(inputTypeString);
|
|
11151
11044
|
const objectSchemaLine = isModelQueryType ? this.resolveModelQuerySchemaName(modelName, queryName) : `${inputTypeString}ObjectSchema`;
|
|
11152
11045
|
const enumSchemaLine = `${inputTypeString}Schema`;
|
|
11153
|
-
const schema = inputType.type === this.name ? objectSchemaLine :
|
|
11046
|
+
const schema = inputType.type === this.name ? objectSchemaLine : isEnum2 ? enumSchemaLine : objectSchemaLine;
|
|
11154
11047
|
const arr = inputType.isList ? ".array()" : "";
|
|
11155
11048
|
const opt = !field.isRequired ? ".optional()" : "";
|
|
11156
11049
|
return inputsLength === 1 ? ` ${field.name}: z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}` : `z.lazy(() => ${lowerCaseFirst(schema)})${arr}${opt}`;
|
|
@@ -12128,14 +12021,27 @@ getPrismaGeneratorHelper().then((helpers) => {
|
|
|
12128
12021
|
});
|
|
12129
12022
|
/*! Bundled license information:
|
|
12130
12023
|
|
|
12131
|
-
|
|
12132
|
-
(
|
|
12024
|
+
@ltd/j-toml/index.mjs:
|
|
12025
|
+
(*!@preserve@license
|
|
12026
|
+
* 模块名称:j-regexp
|
|
12027
|
+
* 模块功能:可读性更好的正则表达式创建方式。从属于“简计划”。
|
|
12028
|
+
More readable way for creating RegExp. Belong to "Plan J".
|
|
12029
|
+
* 模块版本:8.2.0
|
|
12030
|
+
* 许可条款:LGPL-3.0
|
|
12031
|
+
* 所属作者:龙腾道 <LongTengDao@LongTengDao.com> (www.LongTengDao.com)
|
|
12032
|
+
* 问题反馈:https://GitHub.com/LongTengDao/j-regexp/issues
|
|
12033
|
+
* 项目主页:https://GitHub.com/LongTengDao/j-regexp/
|
|
12034
|
+
*)
|
|
12133
12035
|
|
|
12134
|
-
|
|
12135
|
-
(
|
|
12136
|
-
*
|
|
12137
|
-
*
|
|
12138
|
-
|
|
12139
|
-
*
|
|
12036
|
+
@ltd/j-toml/index.mjs:
|
|
12037
|
+
(*!@preserve@license
|
|
12038
|
+
* 模块名称:j-orderify
|
|
12039
|
+
* 模块功能:返回一个能保证给定对象的属性按此后添加顺序排列的 proxy,即使键名是 symbol,或整数 string。从属于“简计划”。
|
|
12040
|
+
Return a proxy for given object, which can guarantee own keys are in setting order, even if the key name is symbol or int string. Belong to "Plan J".
|
|
12041
|
+
* 模块版本:7.0.1
|
|
12042
|
+
* 许可条款:LGPL-3.0
|
|
12043
|
+
* 所属作者:龙腾道 <LongTengDao@LongTengDao.com> (www.LongTengDao.com)
|
|
12044
|
+
* 问题反馈:https://GitHub.com/LongTengDao/j-orderify/issues
|
|
12045
|
+
* 项目主页:https://GitHub.com/LongTengDao/j-orderify/
|
|
12140
12046
|
*)
|
|
12141
12047
|
*/
|