@dan-uni/dan-any 0.9.3 → 0.9.5
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 +4 -0
- package/dist/index.js +202 -172
- package/dist/index.min.js +211 -186
- package/dist/index.umd.min.js +446 -325
- package/dist/src/ass-gen/ass/create.d.ts +1 -2
- package/dist/src/ass-gen/ass/dialogue.d.ts +1 -2
- package/dist/src/ass-gen/ass/event.d.ts +1 -2
- package/dist/src/ass-gen/ass/info.d.ts +2 -2
- package/dist/src/ass-gen/ass/style.d.ts +1 -2
- package/dist/src/ass-gen/config.d.ts +1 -2
- package/dist/src/index.d.ts +5 -1
- package/package.json +6 -6
- package/src/ass-gen/__tests__/generate.test.ts +2 -2
- package/src/ass-gen/ass/create.ts +7 -6
- package/src/ass-gen/ass/dialogue.ts +1 -2
- package/src/ass-gen/ass/event.ts +2 -3
- package/src/ass-gen/ass/info.ts +1 -2
- package/src/ass-gen/ass/raw.ts +7 -7
- package/src/ass-gen/ass/style.ts +1 -2
- package/src/ass-gen/config.ts +1 -1
- package/src/ass-gen/index.ts +7 -4
- package/src/ass-gen/util/layout.ts +1 -1
- package/src/index.ts +61 -37
- package/src/proto/gen/bili/dm_pb.ts +1 -1
- package/src/proto/gen/danuni_pb.ts +1 -1
- package/src/utils/dm-gen.ts +28 -27
- package/types/tsconfig.tsbuildinfo +1 -1
package/dist/index.umd.min.js
CHANGED
|
@@ -5250,6 +5250,11 @@
|
|
|
5250
5250
|
var implementation = __webpack_require__("../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js");
|
|
5251
5251
|
module1.exports = Function.prototype.bind || implementation;
|
|
5252
5252
|
},
|
|
5253
|
+
"../../node_modules/.pnpm/generator-function@2.0.1/node_modules/generator-function/index.js": function(module1) {
|
|
5254
|
+
"use strict";
|
|
5255
|
+
const cached = (function*() {}).constructor;
|
|
5256
|
+
module1.exports = ()=>cached;
|
|
5257
|
+
},
|
|
5253
5258
|
"../../node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js": function(module1, __unused_webpack_exports, __webpack_require__) {
|
|
5254
5259
|
"use strict";
|
|
5255
5260
|
var undefined;
|
|
@@ -6105,7 +6110,7 @@
|
|
|
6105
6110
|
return tryFunctionObject(value);
|
|
6106
6111
|
};
|
|
6107
6112
|
},
|
|
6108
|
-
"../../node_modules/.pnpm/is-generator-function@1.1.
|
|
6113
|
+
"../../node_modules/.pnpm/is-generator-function@1.1.2/node_modules/is-generator-function/index.js": function(module1, __unused_webpack_exports, __webpack_require__) {
|
|
6109
6114
|
"use strict";
|
|
6110
6115
|
var callBound = __webpack_require__("../../node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js");
|
|
6111
6116
|
var safeRegexTest = __webpack_require__("../../node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js");
|
|
@@ -6114,13 +6119,7 @@
|
|
|
6114
6119
|
var getProto = __webpack_require__("../../node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js");
|
|
6115
6120
|
var toStr = callBound('Object.prototype.toString');
|
|
6116
6121
|
var fnToStr = callBound('Function.prototype.toString');
|
|
6117
|
-
var
|
|
6118
|
-
if (!hasToStringTag) return false;
|
|
6119
|
-
try {
|
|
6120
|
-
return Function('return function*() {}')();
|
|
6121
|
-
} catch (e) {}
|
|
6122
|
-
};
|
|
6123
|
-
var GeneratorFunction;
|
|
6122
|
+
var getGeneratorFunction = __webpack_require__("../../node_modules/.pnpm/generator-function@2.0.1/node_modules/generator-function/index.js");
|
|
6124
6123
|
module1.exports = function(fn) {
|
|
6125
6124
|
if ('function' != typeof fn) return false;
|
|
6126
6125
|
if (isFnRegex(fnToStr(fn))) return true;
|
|
@@ -6129,11 +6128,8 @@
|
|
|
6129
6128
|
return '[object GeneratorFunction]' === str;
|
|
6130
6129
|
}
|
|
6131
6130
|
if (!getProto) return false;
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
GeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;
|
|
6135
|
-
}
|
|
6136
|
-
return getProto(fn) === GeneratorFunction;
|
|
6131
|
+
var GeneratorFunction = getGeneratorFunction();
|
|
6132
|
+
return GeneratorFunction && getProto(fn) === GeneratorFunction.prototype;
|
|
6137
6133
|
};
|
|
6138
6134
|
},
|
|
6139
6135
|
"../../node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/implementation.js": function(module1) {
|
|
@@ -12490,7 +12486,7 @@
|
|
|
12490
12486
|
"../../node_modules/.pnpm/util@0.12.5/node_modules/util/support/types.js": function(__unused_webpack_module, exports1, __webpack_require__) {
|
|
12491
12487
|
"use strict";
|
|
12492
12488
|
var isArgumentsObject = __webpack_require__("../../node_modules/.pnpm/is-arguments@1.2.0/node_modules/is-arguments/index.js");
|
|
12493
|
-
var isGeneratorFunction = __webpack_require__("../../node_modules/.pnpm/is-generator-function@1.1.
|
|
12489
|
+
var isGeneratorFunction = __webpack_require__("../../node_modules/.pnpm/is-generator-function@1.1.2/node_modules/is-generator-function/index.js");
|
|
12494
12490
|
var whichTypedArray = __webpack_require__("../../node_modules/.pnpm/which-typed-array@1.1.19/node_modules/which-typed-array/index.js");
|
|
12495
12491
|
var isTypedArray = __webpack_require__("../../node_modules/.pnpm/is-typed-array@1.1.15/node_modules/is-typed-array/index.js");
|
|
12496
12492
|
function uncurryThis(f) {
|
|
@@ -14597,7 +14593,7 @@ and limitations under the License.
|
|
|
14597
14593
|
}
|
|
14598
14594
|
}, validationOptions);
|
|
14599
14595
|
}
|
|
14600
|
-
const
|
|
14596
|
+
const OptionsBuilder_defaultOptions = {
|
|
14601
14597
|
preserveOrder: false,
|
|
14602
14598
|
attributeNamePrefix: '@_',
|
|
14603
14599
|
attributesGroupName: false,
|
|
@@ -14637,7 +14633,7 @@ and limitations under the License.
|
|
|
14637
14633
|
captureMetaData: false
|
|
14638
14634
|
};
|
|
14639
14635
|
const buildOptions = function(options) {
|
|
14640
|
-
return Object.assign({},
|
|
14636
|
+
return Object.assign({}, OptionsBuilder_defaultOptions, options);
|
|
14641
14637
|
};
|
|
14642
14638
|
const nameStartChar = ':A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD';
|
|
14643
14639
|
const nameChar = nameStartChar + '\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040';
|
|
@@ -14694,147 +14690,229 @@ and limitations under the License.
|
|
|
14694
14690
|
return METADATA_SYMBOL;
|
|
14695
14691
|
}
|
|
14696
14692
|
}
|
|
14697
|
-
|
|
14698
|
-
|
|
14699
|
-
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
|
|
14703
|
-
|
|
14704
|
-
|
|
14705
|
-
|
|
14706
|
-
|
|
14707
|
-
|
|
14708
|
-
|
|
14709
|
-
|
|
14710
|
-
|
|
14711
|
-
|
|
14712
|
-
|
|
14713
|
-
|
|
14714
|
-
|
|
14715
|
-
|
|
14716
|
-
|
|
14717
|
-
|
|
14718
|
-
if (
|
|
14719
|
-
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
|
|
14723
|
-
|
|
14724
|
-
|
|
14725
|
-
|
|
14726
|
-
|
|
14727
|
-
|
|
14728
|
-
|
|
14729
|
-
|
|
14730
|
-
i
|
|
14731
|
-
|
|
14732
|
-
|
|
14733
|
-
|
|
14734
|
-
|
|
14735
|
-
|
|
14736
|
-
|
|
14737
|
-
|
|
14738
|
-
|
|
14739
|
-
|
|
14740
|
-
|
|
14741
|
-
|
|
14742
|
-
|
|
14743
|
-
|
|
14744
|
-
|
|
14745
|
-
};
|
|
14746
|
-
function readEntityExp(xmlData, i) {
|
|
14747
|
-
i = skipWhitespace(xmlData, i);
|
|
14748
|
-
let entityName = "";
|
|
14749
|
-
while(i < xmlData.length && !/\s/.test(xmlData[i]) && '"' !== xmlData[i] && "'" !== xmlData[i]){
|
|
14750
|
-
entityName += xmlData[i];
|
|
14751
|
-
i++;
|
|
14693
|
+
class DocTypeReader {
|
|
14694
|
+
constructor(processEntities){
|
|
14695
|
+
this.suppressValidationErr = !processEntities;
|
|
14696
|
+
}
|
|
14697
|
+
readDocType(xmlData, i) {
|
|
14698
|
+
const entities = {};
|
|
14699
|
+
if ('O' === xmlData[i + 3] && 'C' === xmlData[i + 4] && 'T' === xmlData[i + 5] && 'Y' === xmlData[i + 6] && 'P' === xmlData[i + 7] && 'E' === xmlData[i + 8]) {
|
|
14700
|
+
i += 9;
|
|
14701
|
+
let angleBracketsCount = 1;
|
|
14702
|
+
let hasBody = false, comment = false;
|
|
14703
|
+
for(; i < xmlData.length; i++)if ('<' !== xmlData[i] || comment) if ('>' === xmlData[i]) {
|
|
14704
|
+
if (comment) {
|
|
14705
|
+
if ("-" === xmlData[i - 1] && "-" === xmlData[i - 2]) {
|
|
14706
|
+
comment = false;
|
|
14707
|
+
angleBracketsCount--;
|
|
14708
|
+
}
|
|
14709
|
+
} else angleBracketsCount--;
|
|
14710
|
+
if (0 === angleBracketsCount) break;
|
|
14711
|
+
} else if ('[' === xmlData[i]) hasBody = true;
|
|
14712
|
+
else xmlData[i];
|
|
14713
|
+
else {
|
|
14714
|
+
if (hasBody && hasSeq(xmlData, "!ENTITY", i)) {
|
|
14715
|
+
i += 7;
|
|
14716
|
+
let entityName, val;
|
|
14717
|
+
[entityName, val, i] = this.readEntityExp(xmlData, i + 1, this.suppressValidationErr);
|
|
14718
|
+
if (-1 === val.indexOf("&")) entities[entityName] = {
|
|
14719
|
+
regx: RegExp(`&${entityName};`, "g"),
|
|
14720
|
+
val: val
|
|
14721
|
+
};
|
|
14722
|
+
} else if (hasBody && hasSeq(xmlData, "!ELEMENT", i)) {
|
|
14723
|
+
i += 8;
|
|
14724
|
+
const { index } = this.readElementExp(xmlData, i + 1);
|
|
14725
|
+
i = index;
|
|
14726
|
+
} else if (hasBody && hasSeq(xmlData, "!ATTLIST", i)) i += 8;
|
|
14727
|
+
else if (hasBody && hasSeq(xmlData, "!NOTATION", i)) {
|
|
14728
|
+
i += 9;
|
|
14729
|
+
const { index } = this.readNotationExp(xmlData, i + 1, this.suppressValidationErr);
|
|
14730
|
+
i = index;
|
|
14731
|
+
} else if (hasSeq(xmlData, "!--", i)) comment = true;
|
|
14732
|
+
else throw new Error("Invalid DOCTYPE");
|
|
14733
|
+
angleBracketsCount++;
|
|
14734
|
+
}
|
|
14735
|
+
if (0 !== angleBracketsCount) throw new Error("Unclosed DOCTYPE");
|
|
14736
|
+
} else throw new Error("Invalid Tag instead of DOCTYPE");
|
|
14737
|
+
return {
|
|
14738
|
+
entities,
|
|
14739
|
+
i
|
|
14740
|
+
};
|
|
14752
14741
|
}
|
|
14753
|
-
|
|
14754
|
-
|
|
14755
|
-
|
|
14756
|
-
|
|
14757
|
-
|
|
14758
|
-
|
|
14759
|
-
|
|
14760
|
-
|
|
14761
|
-
|
|
14762
|
-
|
|
14763
|
-
|
|
14764
|
-
|
|
14765
|
-
|
|
14766
|
-
|
|
14767
|
-
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14771
|
-
|
|
14742
|
+
readEntityExp(xmlData, i) {
|
|
14743
|
+
i = skipWhitespace(xmlData, i);
|
|
14744
|
+
let entityName = "";
|
|
14745
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i]) && '"' !== xmlData[i] && "'" !== xmlData[i]){
|
|
14746
|
+
entityName += xmlData[i];
|
|
14747
|
+
i++;
|
|
14748
|
+
}
|
|
14749
|
+
validateEntityName(entityName);
|
|
14750
|
+
i = skipWhitespace(xmlData, i);
|
|
14751
|
+
if (!this.suppressValidationErr) {
|
|
14752
|
+
if ("SYSTEM" === xmlData.substring(i, i + 6).toUpperCase()) throw new Error("External entities are not supported");
|
|
14753
|
+
else if ("%" === xmlData[i]) throw new Error("Parameter entities are not supported");
|
|
14754
|
+
}
|
|
14755
|
+
let entityValue = "";
|
|
14756
|
+
[i, entityValue] = this.readIdentifierVal(xmlData, i, "entity");
|
|
14757
|
+
i--;
|
|
14758
|
+
return [
|
|
14759
|
+
entityName,
|
|
14760
|
+
entityValue,
|
|
14761
|
+
i
|
|
14762
|
+
];
|
|
14772
14763
|
}
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14776
|
-
|
|
14777
|
-
|
|
14778
|
-
|
|
14779
|
-
|
|
14780
|
-
|
|
14781
|
-
if ("PUBLIC" === identifierType) {
|
|
14782
|
-
[i, publicIdentifier] = readIdentifierVal(xmlData, i, "publicIdentifier");
|
|
14764
|
+
readNotationExp(xmlData, i) {
|
|
14765
|
+
i = skipWhitespace(xmlData, i);
|
|
14766
|
+
let notationName = "";
|
|
14767
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i])){
|
|
14768
|
+
notationName += xmlData[i];
|
|
14769
|
+
i++;
|
|
14770
|
+
}
|
|
14771
|
+
this.suppressValidationErr || validateEntityName(notationName);
|
|
14783
14772
|
i = skipWhitespace(xmlData, i);
|
|
14784
|
-
|
|
14785
|
-
|
|
14786
|
-
|
|
14787
|
-
|
|
14773
|
+
const identifierType = xmlData.substring(i, i + 6).toUpperCase();
|
|
14774
|
+
if (!this.suppressValidationErr && "SYSTEM" !== identifierType && "PUBLIC" !== identifierType) throw new Error(`Expected SYSTEM or PUBLIC, found "${identifierType}"`);
|
|
14775
|
+
i += identifierType.length;
|
|
14776
|
+
i = skipWhitespace(xmlData, i);
|
|
14777
|
+
let publicIdentifier = null;
|
|
14778
|
+
let systemIdentifier = null;
|
|
14779
|
+
if ("PUBLIC" === identifierType) {
|
|
14780
|
+
[i, publicIdentifier] = this.readIdentifierVal(xmlData, i, "publicIdentifier");
|
|
14781
|
+
i = skipWhitespace(xmlData, i);
|
|
14782
|
+
if ('"' === xmlData[i] || "'" === xmlData[i]) [i, systemIdentifier] = this.readIdentifierVal(xmlData, i, "systemIdentifier");
|
|
14783
|
+
} else if ("SYSTEM" === identifierType) {
|
|
14784
|
+
[i, systemIdentifier] = this.readIdentifierVal(xmlData, i, "systemIdentifier");
|
|
14785
|
+
if (!this.suppressValidationErr && !systemIdentifier) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
|
14786
|
+
}
|
|
14787
|
+
return {
|
|
14788
|
+
notationName,
|
|
14789
|
+
publicIdentifier,
|
|
14790
|
+
systemIdentifier,
|
|
14791
|
+
index: --i
|
|
14792
|
+
};
|
|
14788
14793
|
}
|
|
14789
|
-
|
|
14790
|
-
|
|
14791
|
-
|
|
14792
|
-
|
|
14793
|
-
index: --i
|
|
14794
|
-
};
|
|
14795
|
-
}
|
|
14796
|
-
function readIdentifierVal(xmlData, i, type) {
|
|
14797
|
-
let identifierVal = "";
|
|
14798
|
-
const startChar = xmlData[i];
|
|
14799
|
-
if ('"' !== startChar && "'" !== startChar) throw new Error(`Expected quoted string, found "${startChar}"`);
|
|
14800
|
-
i++;
|
|
14801
|
-
while(i < xmlData.length && xmlData[i] !== startChar){
|
|
14802
|
-
identifierVal += xmlData[i];
|
|
14794
|
+
readIdentifierVal(xmlData, i, type) {
|
|
14795
|
+
let identifierVal = "";
|
|
14796
|
+
const startChar = xmlData[i];
|
|
14797
|
+
if ('"' !== startChar && "'" !== startChar) throw new Error(`Expected quoted string, found "${startChar}"`);
|
|
14803
14798
|
i++;
|
|
14804
|
-
|
|
14805
|
-
|
|
14806
|
-
|
|
14807
|
-
|
|
14808
|
-
i
|
|
14809
|
-
identifierVal
|
|
14810
|
-
];
|
|
14811
|
-
}
|
|
14812
|
-
function readElementExp(xmlData, i) {
|
|
14813
|
-
i = skipWhitespace(xmlData, i);
|
|
14814
|
-
let elementName = "";
|
|
14815
|
-
while(i < xmlData.length && !/\s/.test(xmlData[i])){
|
|
14816
|
-
elementName += xmlData[i];
|
|
14799
|
+
while(i < xmlData.length && xmlData[i] !== startChar){
|
|
14800
|
+
identifierVal += xmlData[i];
|
|
14801
|
+
i++;
|
|
14802
|
+
}
|
|
14803
|
+
if (xmlData[i] !== startChar) throw new Error(`Unterminated ${type} value`);
|
|
14817
14804
|
i++;
|
|
14805
|
+
return [
|
|
14806
|
+
i,
|
|
14807
|
+
identifierVal
|
|
14808
|
+
];
|
|
14818
14809
|
}
|
|
14819
|
-
|
|
14820
|
-
|
|
14821
|
-
|
|
14822
|
-
|
|
14823
|
-
|
|
14824
|
-
else if ("(" === xmlData[i]) {
|
|
14825
|
-
i++;
|
|
14826
|
-
while(i < xmlData.length && ")" !== xmlData[i]){
|
|
14827
|
-
contentModel += xmlData[i];
|
|
14810
|
+
readElementExp(xmlData, i) {
|
|
14811
|
+
i = skipWhitespace(xmlData, i);
|
|
14812
|
+
let elementName = "";
|
|
14813
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i])){
|
|
14814
|
+
elementName += xmlData[i];
|
|
14828
14815
|
i++;
|
|
14829
14816
|
}
|
|
14830
|
-
if (
|
|
14831
|
-
|
|
14832
|
-
|
|
14833
|
-
|
|
14834
|
-
|
|
14835
|
-
|
|
14836
|
-
|
|
14817
|
+
if (!this.suppressValidationErr && !isName(elementName)) throw new Error(`Invalid element name: "${elementName}"`);
|
|
14818
|
+
i = skipWhitespace(xmlData, i);
|
|
14819
|
+
let contentModel = "";
|
|
14820
|
+
if ("E" === xmlData[i] && hasSeq(xmlData, "MPTY", i)) i += 4;
|
|
14821
|
+
else if ("A" === xmlData[i] && hasSeq(xmlData, "NY", i)) i += 2;
|
|
14822
|
+
else if ("(" === xmlData[i]) {
|
|
14823
|
+
i++;
|
|
14824
|
+
while(i < xmlData.length && ")" !== xmlData[i]){
|
|
14825
|
+
contentModel += xmlData[i];
|
|
14826
|
+
i++;
|
|
14827
|
+
}
|
|
14828
|
+
if (")" !== xmlData[i]) throw new Error("Unterminated content model");
|
|
14829
|
+
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${xmlData[i]}"`);
|
|
14830
|
+
return {
|
|
14831
|
+
elementName,
|
|
14832
|
+
contentModel: contentModel.trim(),
|
|
14833
|
+
index: i
|
|
14834
|
+
};
|
|
14835
|
+
}
|
|
14836
|
+
readAttlistExp(xmlData, i) {
|
|
14837
|
+
i = skipWhitespace(xmlData, i);
|
|
14838
|
+
let elementName = "";
|
|
14839
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i])){
|
|
14840
|
+
elementName += xmlData[i];
|
|
14841
|
+
i++;
|
|
14842
|
+
}
|
|
14843
|
+
validateEntityName(elementName);
|
|
14844
|
+
i = skipWhitespace(xmlData, i);
|
|
14845
|
+
let attributeName = "";
|
|
14846
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i])){
|
|
14847
|
+
attributeName += xmlData[i];
|
|
14848
|
+
i++;
|
|
14849
|
+
}
|
|
14850
|
+
if (!validateEntityName(attributeName)) throw new Error(`Invalid attribute name: "${attributeName}"`);
|
|
14851
|
+
i = skipWhitespace(xmlData, i);
|
|
14852
|
+
let attributeType = "";
|
|
14853
|
+
if ("NOTATION" === xmlData.substring(i, i + 8).toUpperCase()) {
|
|
14854
|
+
attributeType = "NOTATION";
|
|
14855
|
+
i += 8;
|
|
14856
|
+
i = skipWhitespace(xmlData, i);
|
|
14857
|
+
if ("(" !== xmlData[i]) throw new Error(`Expected '(', found "${xmlData[i]}"`);
|
|
14858
|
+
i++;
|
|
14859
|
+
let allowedNotations = [];
|
|
14860
|
+
while(i < xmlData.length && ")" !== xmlData[i]){
|
|
14861
|
+
let notation = "";
|
|
14862
|
+
while(i < xmlData.length && "|" !== xmlData[i] && ")" !== xmlData[i]){
|
|
14863
|
+
notation += xmlData[i];
|
|
14864
|
+
i++;
|
|
14865
|
+
}
|
|
14866
|
+
notation = notation.trim();
|
|
14867
|
+
if (!validateEntityName(notation)) throw new Error(`Invalid notation name: "${notation}"`);
|
|
14868
|
+
allowedNotations.push(notation);
|
|
14869
|
+
if ("|" === xmlData[i]) {
|
|
14870
|
+
i++;
|
|
14871
|
+
i = skipWhitespace(xmlData, i);
|
|
14872
|
+
}
|
|
14873
|
+
}
|
|
14874
|
+
if (")" !== xmlData[i]) throw new Error("Unterminated list of notations");
|
|
14875
|
+
i++;
|
|
14876
|
+
attributeType += " (" + allowedNotations.join("|") + ")";
|
|
14877
|
+
} else {
|
|
14878
|
+
while(i < xmlData.length && !/\s/.test(xmlData[i])){
|
|
14879
|
+
attributeType += xmlData[i];
|
|
14880
|
+
i++;
|
|
14881
|
+
}
|
|
14882
|
+
const validTypes = [
|
|
14883
|
+
"CDATA",
|
|
14884
|
+
"ID",
|
|
14885
|
+
"IDREF",
|
|
14886
|
+
"IDREFS",
|
|
14887
|
+
"ENTITY",
|
|
14888
|
+
"ENTITIES",
|
|
14889
|
+
"NMTOKEN",
|
|
14890
|
+
"NMTOKENS"
|
|
14891
|
+
];
|
|
14892
|
+
if (!this.suppressValidationErr && !validTypes.includes(attributeType.toUpperCase())) throw new Error(`Invalid attribute type: "${attributeType}"`);
|
|
14893
|
+
}
|
|
14894
|
+
i = skipWhitespace(xmlData, i);
|
|
14895
|
+
let defaultValue = "";
|
|
14896
|
+
if ("#REQUIRED" === xmlData.substring(i, i + 8).toUpperCase()) {
|
|
14897
|
+
defaultValue = "#REQUIRED";
|
|
14898
|
+
i += 8;
|
|
14899
|
+
} else if ("#IMPLIED" === xmlData.substring(i, i + 7).toUpperCase()) {
|
|
14900
|
+
defaultValue = "#IMPLIED";
|
|
14901
|
+
i += 7;
|
|
14902
|
+
} else [i, defaultValue] = this.readIdentifierVal(xmlData, i, "ATTLIST");
|
|
14903
|
+
return {
|
|
14904
|
+
elementName,
|
|
14905
|
+
attributeName,
|
|
14906
|
+
attributeType,
|
|
14907
|
+
defaultValue,
|
|
14908
|
+
index: i
|
|
14909
|
+
};
|
|
14910
|
+
}
|
|
14837
14911
|
}
|
|
14912
|
+
const skipWhitespace = (data, index)=>{
|
|
14913
|
+
while(index < data.length && /\s/.test(data[index]))index++;
|
|
14914
|
+
return index;
|
|
14915
|
+
};
|
|
14838
14916
|
function hasSeq(data, seq, i) {
|
|
14839
14917
|
for(let j = 0; j < seq.length; j++)if (seq[j] !== data[i + j + 1]) return false;
|
|
14840
14918
|
return true;
|
|
@@ -15085,6 +15163,7 @@ and limitations under the License.
|
|
|
15085
15163
|
let currentNode = xmlObj;
|
|
15086
15164
|
let textData = "";
|
|
15087
15165
|
let jPath = "";
|
|
15166
|
+
const docTypeReader = new DocTypeReader(this.options.processEntities);
|
|
15088
15167
|
for(let i = 0; i < xmlData.length; i++){
|
|
15089
15168
|
const ch = xmlData[i];
|
|
15090
15169
|
if ('<' === ch) if ('/' === xmlData[i + 1]) {
|
|
@@ -15132,7 +15211,7 @@ and limitations under the License.
|
|
|
15132
15211
|
}
|
|
15133
15212
|
i = endIndex;
|
|
15134
15213
|
} else if ('!D' === xmlData.substr(i + 1, 2)) {
|
|
15135
|
-
const result = readDocType(xmlData, i);
|
|
15214
|
+
const result = docTypeReader.readDocType(xmlData, i);
|
|
15136
15215
|
this.docTypeEntities = result.entities;
|
|
15137
15216
|
i = result.i;
|
|
15138
15217
|
} else if ('![' === xmlData.substr(i + 1, 2)) {
|
|
@@ -15651,9 +15730,8 @@ and limitations under the License.
|
|
|
15651
15730
|
this.options = buildOptions(options);
|
|
15652
15731
|
}
|
|
15653
15732
|
parse(xmlData, validationOption) {
|
|
15654
|
-
if ("string"
|
|
15655
|
-
else if (xmlData
|
|
15656
|
-
else throw new Error("XML data is accepted in String or Bytes[] form.");
|
|
15733
|
+
if ("string" != typeof xmlData && xmlData.toString) xmlData = xmlData.toString();
|
|
15734
|
+
else if ("string" != typeof xmlData) throw new Error("XML data is accepted in String or Bytes[] form.");
|
|
15657
15735
|
if (validationOption) {
|
|
15658
15736
|
if (true === validationOption) validationOption = {};
|
|
15659
15737
|
const result = validate(xmlData, validationOption);
|
|
@@ -16156,7 +16234,7 @@ and limitations under the License.
|
|
|
16156
16234
|
const protoInt64 = /*@__PURE__*/ makeInt64Support();
|
|
16157
16235
|
function makeInt64Support() {
|
|
16158
16236
|
const dv = new DataView(new ArrayBuffer(8));
|
|
16159
|
-
const ok = "function" == typeof BigInt && "function" == typeof dv.getBigInt64 && "function" == typeof dv.getBigUint64 && "function" == typeof dv.setBigInt64 && "function" == typeof dv.setBigUint64 && ("object" != typeof process || "object" != typeof process.env || "1" !== process.env.BUF_BIGINT_DISABLE);
|
|
16237
|
+
const ok = "function" == typeof BigInt && "function" == typeof dv.getBigInt64 && "function" == typeof dv.getBigUint64 && "function" == typeof dv.setBigInt64 && "function" == typeof dv.setBigUint64 && (!!globalThis.Deno || "object" != typeof process || "object" != typeof process.env || "1" !== process.env.BUF_BIGINT_DISABLE);
|
|
16160
16238
|
if (ok) {
|
|
16161
16239
|
const MIN = BigInt("-9223372036854775808");
|
|
16162
16240
|
const MAX = BigInt("9223372036854775807");
|
|
@@ -18083,6 +18161,16 @@ and limitations under the License.
|
|
|
18083
18161
|
jsonFormat: 1,
|
|
18084
18162
|
enforceNamingStyle: 2,
|
|
18085
18163
|
defaultSymbolVisibility: 1
|
|
18164
|
+
},
|
|
18165
|
+
1001: {
|
|
18166
|
+
fieldPresence: 1,
|
|
18167
|
+
enumType: 1,
|
|
18168
|
+
repeatedFieldEncoding: 1,
|
|
18169
|
+
utf8Validation: 2,
|
|
18170
|
+
messageEncoding: 1,
|
|
18171
|
+
jsonFormat: 1,
|
|
18172
|
+
enforceNamingStyle: 1,
|
|
18173
|
+
defaultSymbolVisibility: 2
|
|
18086
18174
|
}
|
|
18087
18175
|
};
|
|
18088
18176
|
function addFile(proto, reg) {
|
|
@@ -19586,7 +19674,10 @@ and limitations under the License.
|
|
|
19586
19674
|
number: 10,
|
|
19587
19675
|
type: 8,
|
|
19588
19676
|
label: 1,
|
|
19589
|
-
defaultValue: "false"
|
|
19677
|
+
defaultValue: "false",
|
|
19678
|
+
options: {
|
|
19679
|
+
deprecated: true
|
|
19680
|
+
}
|
|
19590
19681
|
},
|
|
19591
19682
|
{
|
|
19592
19683
|
name: "debug_redact",
|
|
@@ -20890,7 +20981,7 @@ and limitations under the License.
|
|
|
20890
20981
|
function timestamp_timestampMs(timestamp) {
|
|
20891
20982
|
return 1000 * Number(timestamp.seconds) + Math.round(timestamp.nanos / 1000000);
|
|
20892
20983
|
}
|
|
20893
|
-
var package_namespaceObject = JSON.parse('{"
|
|
20984
|
+
var package_namespaceObject = JSON.parse('{"UU":"@dan-uni/dan-any","rE":"0.9.5","TB":"https://github.com/ani-uni/danuni/tree/master/packages/dan-any#readme"}');
|
|
20894
20985
|
const file_bili_dm = /*@__PURE__*/ fileDesc("Cg1iaWxpL2RtLnByb3RvEiBiaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MSJkCgZBdmF0YXISCgoCaWQYASABKAkSCwoDdXJsGAIgASgJEkEKC2F2YXRhcl90eXBlGAMgASgOMiwuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuQXZhdGFyVHlwZSIjCgZCdWJibGUSDAoEdGV4dBgBIAEoCRILCgN1cmwYAiABKAkixgEKCEJ1YmJsZVYyEgwKBHRleHQYASABKAkSCwoDdXJsGAIgASgJEkEKC2J1YmJsZV90eXBlGAMgASgOMiwuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuQnViYmxlVHlwZRIVCg1leHBvc3VyZV9vbmNlGAQgASgIEkUKDWV4cG9zdXJlX3R5cGUYBSABKA4yLi5iaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5FeHBvc3VyZVR5cGUiWwoGQnV0dG9uEgwKBHRleHQYASABKAkSQwoGYWN0aW9uGAIgASgOMjMuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuVG9hc3RGdW5jdGlvblR5cGUiWAoOQnV6endvcmRDb25maWcSRgoIa2V5d29yZHMYASADKAsyNC5iaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5CdXp6d29yZFNob3dDb25maWcieAoSQnV6endvcmRTaG93Q29uZmlnEgwKBG5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aWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5EbVNlZ090dFJlcRovLmJpbGliaWxpLmNvbW11bml0eS5zZXJ2aWNlLmRtLnYxLkRtU2VnT3R0UmVwbHkSagoIRG1TZWdTREsSLS5iaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5EbVNlZ1NES1JlcRovLmJpbGliaWxpLmNvbW11bml0eS5zZXJ2aWNlLmRtLnYxLkRtU2VnU0RLUmVwbHkSdAoMRG1FeHBvUmVwb3J0EjEuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuRG1FeHBvUmVwb3J0UmVxGjEuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuRG1FeHBvUmVwb3J0UmVzYgZwcm90bzM");
|
|
20895
20986
|
const DmSegMobileReplySchema = /*@__PURE__*/ message_messageDesc(file_bili_dm, 30);
|
|
20896
20987
|
const DmWebViewReplySchema = /*@__PURE__*/ message_messageDesc(file_bili_dm, 39);
|
|
@@ -23247,16 +23338,16 @@ and limitations under the License.
|
|
|
23247
23338
|
}({});
|
|
23248
23339
|
const ExtraDanUniChapterTypeDict = {
|
|
23249
23340
|
chs: {
|
|
23250
|
-
ch:
|
|
23251
|
-
rev:
|
|
23252
|
-
op:
|
|
23253
|
-
int:
|
|
23254
|
-
ed:
|
|
23255
|
-
prvw:
|
|
23256
|
-
cut:
|
|
23257
|
-
dup:
|
|
23258
|
-
biz:
|
|
23259
|
-
promo:
|
|
23341
|
+
ch: '其它片段',
|
|
23342
|
+
rev: '回顾',
|
|
23343
|
+
op: '片头',
|
|
23344
|
+
int: '中场',
|
|
23345
|
+
ed: '片尾',
|
|
23346
|
+
prvw: '预告',
|
|
23347
|
+
cut: '删减',
|
|
23348
|
+
dup: '补档',
|
|
23349
|
+
biz: '商业广告',
|
|
23350
|
+
promo: '推广'
|
|
23260
23351
|
}
|
|
23261
23352
|
};
|
|
23262
23353
|
var dm_gen_ExtraDanUniChapterAction = /*#__PURE__*/ function(ExtraDanUniChapterAction) {
|
|
@@ -23355,22 +23446,27 @@ and limitations under the License.
|
|
|
23355
23446
|
minify() {
|
|
23356
23447
|
const def = UniDM.create();
|
|
23357
23448
|
const dan = UniDM.create(this);
|
|
23358
|
-
|
|
23359
|
-
|
|
23360
|
-
|
|
23361
|
-
if (
|
|
23362
|
-
|
|
23363
|
-
|
|
23364
|
-
|
|
23449
|
+
const shouldKeep = (key, value)=>{
|
|
23450
|
+
if ('SOID' === key) return true;
|
|
23451
|
+
if (null == value) return false;
|
|
23452
|
+
if (value === def[key]) return false;
|
|
23453
|
+
if ('attr' === key && Array.isArray(value) && 0 === value.length) return false;
|
|
23454
|
+
if ('extraStr' === key && '{}' === value) return false;
|
|
23455
|
+
return true;
|
|
23456
|
+
};
|
|
23457
|
+
const result = {
|
|
23458
|
+
SOID: dan.SOID
|
|
23459
|
+
};
|
|
23460
|
+
for (const key of Object.keys(dan)){
|
|
23461
|
+
const value = dan[key];
|
|
23462
|
+
if (shouldKeep(key, value)) {
|
|
23463
|
+
if ('SOID' === key) continue;
|
|
23464
|
+
Reflect.set(result, key, value);
|
|
23365
23465
|
}
|
|
23366
|
-
else delete dan[k];
|
|
23367
23466
|
}
|
|
23368
|
-
return
|
|
23467
|
+
return result;
|
|
23369
23468
|
}
|
|
23370
|
-
downgradeAdvcancedDan({ include, exclude, cleanExtra = false } = {
|
|
23371
|
-
include: [],
|
|
23372
|
-
exclude: []
|
|
23373
|
-
}) {
|
|
23469
|
+
downgradeAdvcancedDan({ include, exclude, cleanExtra = false } = {}) {
|
|
23374
23470
|
if (!this.extra) return this;
|
|
23375
23471
|
{
|
|
23376
23472
|
if (!include) include = [];
|
|
@@ -23385,16 +23481,16 @@ and limitations under the License.
|
|
|
23385
23481
|
clone.content = `${this.content} x${merge.count}`;
|
|
23386
23482
|
} else if (danuni.chapter) {
|
|
23387
23483
|
const chapter = danuni.chapter;
|
|
23388
|
-
if ("cut" === chapter.type) clone.content = `[
|
|
23389
|
-
else if ("dup" === chapter.type) clone.content = `[
|
|
23390
|
-
else clone.content = `[
|
|
23484
|
+
if ("cut" === chapter.type) clone.content = `[提示]${clone.platform}源${ExtraDanUniChapterTypeDict.chs[chapter.type]}了${chapter.duration}秒`;
|
|
23485
|
+
else if ("dup" === chapter.type) clone.content = `[提示(${ExtraDanUniChapterTypeDict.chs[chapter.type]})]${clone.platform}源-${chapter.duration}秒`;
|
|
23486
|
+
else clone.content = `[空降(${ExtraDanUniChapterTypeDict.chs[chapter.type]})]${hh_mm_ss_default().fromS(clone.progress + chapter.duration)}`;
|
|
23391
23487
|
}
|
|
23392
23488
|
} else if (check('bili') && clone.extra.bili) {
|
|
23393
23489
|
const bili = clone.extra.bili;
|
|
23394
|
-
if (7 === bili.mode && bili.adv) clone.content = `[B
|
|
23490
|
+
if (7 === bili.mode && bili.adv) clone.content = `[B站高级弹幕]${dm_gen_JSON.parse(bili.adv)[4] || ''}`;
|
|
23395
23491
|
else if (bili.command) {
|
|
23396
23492
|
const command = bili.command;
|
|
23397
|
-
clone.content = `[B
|
|
23493
|
+
clone.content = `[B站指令弹幕]${command.content}`;
|
|
23398
23494
|
clone.fontsize = 36;
|
|
23399
23495
|
}
|
|
23400
23496
|
}
|
|
@@ -23509,7 +23605,7 @@ and limitations under the License.
|
|
|
23509
23605
|
mode,
|
|
23510
23606
|
senderID: senderID.toString(),
|
|
23511
23607
|
ctime: this.transCtime(args.ctime, 's'),
|
|
23512
|
-
weight: args.weight
|
|
23608
|
+
weight: args.weight || (3 === pool ? 1 : 0),
|
|
23513
23609
|
pool,
|
|
23514
23610
|
attr: DMAttrUtils.fromBin(args.attr, platform_PlatformVideoSource.Bilibili),
|
|
23515
23611
|
platform: platform_PlatformVideoSource.Bilibili,
|
|
@@ -23883,7 +23979,7 @@ and limitations under the License.
|
|
|
23883
23979
|
});
|
|
23884
23980
|
const DanUniConvertTipTemplate = {
|
|
23885
23981
|
meassage: 'Converted by DanUni!',
|
|
23886
|
-
version: `JS/TS ${package_namespaceObject.
|
|
23982
|
+
version: `JS/TS ${package_namespaceObject.UU} (v${package_namespaceObject.rE})`
|
|
23887
23983
|
};
|
|
23888
23984
|
class UniPool {
|
|
23889
23985
|
constructor(dans, options = {}, info = {
|
|
@@ -23930,7 +24026,7 @@ and limitations under the License.
|
|
|
23930
24026
|
return stats;
|
|
23931
24027
|
}
|
|
23932
24028
|
getMost(key) {
|
|
23933
|
-
return this.getStat(key).
|
|
24029
|
+
return this.getStat(key).toSorted((a, b)=>b.count - a.count)[0];
|
|
23934
24030
|
}
|
|
23935
24031
|
get most() {
|
|
23936
24032
|
return {
|
|
@@ -23992,7 +24088,7 @@ and limitations under the License.
|
|
|
23992
24088
|
}
|
|
23993
24089
|
merge(lifetime = 0) {
|
|
23994
24090
|
if (!this.shared.SOID) {
|
|
23995
|
-
console.error("
|
|
24091
|
+
console.error("本功能仅支持同弹幕库内使用,可先 .split('SOID') 在分别使用");
|
|
23996
24092
|
return this;
|
|
23997
24093
|
}
|
|
23998
24094
|
if (lifetime <= 0) return this;
|
|
@@ -24095,8 +24191,13 @@ and limitations under the License.
|
|
|
24095
24191
|
minify() {
|
|
24096
24192
|
return this.dans.map((d)=>d.minify());
|
|
24097
24193
|
}
|
|
24098
|
-
static import(file, options) {
|
|
24099
|
-
|
|
24194
|
+
static import(file, options, mod) {
|
|
24195
|
+
if (!mod) mod = [
|
|
24196
|
+
'json',
|
|
24197
|
+
'str',
|
|
24198
|
+
'bin'
|
|
24199
|
+
];
|
|
24200
|
+
const err = '无法识别该文件,请手动指定格式!';
|
|
24100
24201
|
const parseJSON = (json)=>{
|
|
24101
24202
|
try {
|
|
24102
24203
|
if (Array.isArray(json) && json.every((d)=>d.SOID)) return {
|
|
@@ -24118,63 +24219,68 @@ and limitations under the License.
|
|
|
24118
24219
|
} catch {}
|
|
24119
24220
|
};
|
|
24120
24221
|
const parseStr = (file)=>{
|
|
24121
|
-
try {
|
|
24222
|
+
if (mod.includes('json')) try {
|
|
24122
24223
|
if (IsJSON_isJSON(file)) {
|
|
24123
24224
|
const json = src_JSON.parse(file);
|
|
24124
24225
|
return parseJSON(json);
|
|
24125
24226
|
}
|
|
24126
24227
|
} catch {}
|
|
24127
|
-
|
|
24128
|
-
|
|
24129
|
-
|
|
24130
|
-
|
|
24131
|
-
|
|
24132
|
-
|
|
24133
|
-
|
|
24134
|
-
|
|
24135
|
-
|
|
24136
|
-
|
|
24137
|
-
|
|
24138
|
-
|
|
24139
|
-
|
|
24140
|
-
|
|
24141
|
-
|
|
24142
|
-
|
|
24228
|
+
if (mod.includes('str')) {
|
|
24229
|
+
try {
|
|
24230
|
+
const xmlParser = new XMLParser({
|
|
24231
|
+
ignoreAttributes: false
|
|
24232
|
+
});
|
|
24233
|
+
const xml = xmlParser.parse(file);
|
|
24234
|
+
if (xml?.i?.d) return {
|
|
24235
|
+
pool: this.fromBiliXML(file, options),
|
|
24236
|
+
fmt: 'bili.xml'
|
|
24237
|
+
};
|
|
24238
|
+
} catch {}
|
|
24239
|
+
try {
|
|
24240
|
+
return {
|
|
24241
|
+
pool: this.fromASS(file, options),
|
|
24242
|
+
fmt: 'common.ass'
|
|
24243
|
+
};
|
|
24244
|
+
} catch {}
|
|
24245
|
+
}
|
|
24143
24246
|
};
|
|
24144
24247
|
let errmesg;
|
|
24145
|
-
if (isObject(file))
|
|
24146
|
-
|
|
24147
|
-
|
|
24148
|
-
|
|
24149
|
-
|
|
24150
|
-
|
|
24151
|
-
|
|
24152
|
-
|
|
24153
|
-
|
|
24154
|
-
|
|
24155
|
-
|
|
24156
|
-
|
|
24157
|
-
|
|
24158
|
-
|
|
24159
|
-
|
|
24160
|
-
|
|
24161
|
-
|
|
24162
|
-
|
|
24163
|
-
|
|
24164
|
-
|
|
24165
|
-
|
|
24166
|
-
|
|
24167
|
-
|
|
24168
|
-
|
|
24169
|
-
|
|
24170
|
-
|
|
24171
|
-
|
|
24172
|
-
|
|
24173
|
-
|
|
24174
|
-
|
|
24175
|
-
|
|
24248
|
+
if (isObject(file)) {
|
|
24249
|
+
if (file instanceof ArrayBuffer || file instanceof Uint8Array) {
|
|
24250
|
+
if (mod.includes('bin')) {
|
|
24251
|
+
try {
|
|
24252
|
+
return {
|
|
24253
|
+
pool: this.fromPb(file),
|
|
24254
|
+
fmt: 'danuni.pb.bin'
|
|
24255
|
+
};
|
|
24256
|
+
} catch {}
|
|
24257
|
+
try {
|
|
24258
|
+
return {
|
|
24259
|
+
pool: this.fromBiliGrpc(file),
|
|
24260
|
+
fmt: 'bili.pb.bin'
|
|
24261
|
+
};
|
|
24262
|
+
} catch {}
|
|
24263
|
+
try {
|
|
24264
|
+
return {
|
|
24265
|
+
pool: this.fromBiliCommandGrpc(file),
|
|
24266
|
+
fmt: 'bili.cmd.pb.bin'
|
|
24267
|
+
};
|
|
24268
|
+
} catch {}
|
|
24269
|
+
}
|
|
24270
|
+
try {
|
|
24271
|
+
const fileStr = new TextDecoder().decode(file);
|
|
24272
|
+
const prStr = parseStr(fileStr);
|
|
24273
|
+
if (prStr) return prStr;
|
|
24274
|
+
errmesg = `${err}(定位: bin->string)`;
|
|
24275
|
+
} catch {}
|
|
24276
|
+
} else if (mod.includes('json')) {
|
|
24277
|
+
const prJSON = parseJSON(file);
|
|
24278
|
+
if (!prJSON) throw new Error(`${err}(定位: json)`);
|
|
24279
|
+
return prJSON;
|
|
24280
|
+
}
|
|
24281
|
+
} else if (isString(file)) {
|
|
24176
24282
|
const prStr = parseStr(file);
|
|
24177
|
-
if (!prStr) throw new Error(`${err}(
|
|
24283
|
+
if (!prStr) throw new Error(`${err}(定位: string)`);
|
|
24178
24284
|
return prStr;
|
|
24179
24285
|
}
|
|
24180
24286
|
throw new Error(errmesg ?? err);
|
|
@@ -24272,7 +24378,7 @@ and limitations under the License.
|
|
|
24272
24378
|
};
|
|
24273
24379
|
if (options?.avoidSenderIDWithAt) {
|
|
24274
24380
|
const ok = this.dans.every((d)=>d.senderID.endsWith(`@${platform_PlatformVideoSource.Bilibili}`));
|
|
24275
|
-
if (!ok) throw new Error(
|
|
24381
|
+
if (!ok) throw new Error('存在其他来源的senderID,请关闭该功能再试!');
|
|
24276
24382
|
}
|
|
24277
24383
|
const builder = new Builder({
|
|
24278
24384
|
ignoreAttributes: false
|
|
@@ -24407,14 +24513,16 @@ and limitations under the License.
|
|
|
24407
24513
|
static fromASS(ass, options) {
|
|
24408
24514
|
return parseAssRawField(ass, options);
|
|
24409
24515
|
}
|
|
24410
|
-
toASS(canvasCtx, options
|
|
24411
|
-
|
|
24412
|
-
|
|
24516
|
+
toASS(canvasCtx, options) {
|
|
24517
|
+
const defaultOptions = {
|
|
24518
|
+
substyle: {}
|
|
24519
|
+
};
|
|
24520
|
+
const finalOptions = options ?? defaultOptions;
|
|
24413
24521
|
const fn = this.shared.SOID;
|
|
24414
24522
|
return generateASS(this, {
|
|
24415
24523
|
filename: fn,
|
|
24416
24524
|
title: fn,
|
|
24417
|
-
...
|
|
24525
|
+
...finalOptions
|
|
24418
24526
|
}, canvasCtx);
|
|
24419
24527
|
}
|
|
24420
24528
|
}
|
|
@@ -24526,7 +24634,7 @@ and limitations under the License.
|
|
|
24526
24634
|
};
|
|
24527
24635
|
};
|
|
24528
24636
|
const measureTextWidthConstructor = (canvasContext)=>{
|
|
24529
|
-
const supportTextMeasure = !!canvasContext.measureText(
|
|
24637
|
+
const supportTextMeasure = !!canvasContext.measureText('中');
|
|
24530
24638
|
if (supportTextMeasure) return (fontName, fontSize, bold, text)=>{
|
|
24531
24639
|
canvasContext.font = `${bold ? 'bold' : 'normal'} ${fontSize}px ${fontName}`;
|
|
24532
24640
|
const textWidth = canvasContext.measureText(text).width;
|
|
@@ -24604,7 +24712,7 @@ and limitations under the License.
|
|
|
24604
24712
|
const layoutDanmaku = (inputList, config, canvasCtx)=>{
|
|
24605
24713
|
const list = [
|
|
24606
24714
|
...UniPool2DanmakuLists(inputList)
|
|
24607
|
-
].
|
|
24715
|
+
].toSorted((x, y)=>x.time - y.time);
|
|
24608
24716
|
const layout = initializeLayout(config, canvasCtx);
|
|
24609
24717
|
return DanmakuList2UniPool(list.map(layout).filter((danmaku)=>!!danmaku));
|
|
24610
24718
|
};
|
|
@@ -24618,7 +24726,7 @@ and limitations under the License.
|
|
|
24618
24726
|
const minorSecond = Math.floor((seconds - integer) * 100);
|
|
24619
24727
|
return `${hour}:${pad(minute)}:${pad(second)}.${minorSecond}`;
|
|
24620
24728
|
};
|
|
24621
|
-
const encode = (text)=>text.toString().replaceAll('{',
|
|
24729
|
+
const encode = (text)=>text.toString().replaceAll('{', '{').replaceAll('}', '}').replaceAll(/\r|\n/g, '');
|
|
24622
24730
|
const scrollCommand = ({ start, end, top })=>`\\move(${start},${top},${end},${top})`;
|
|
24623
24731
|
const fixCommand = ({ top, left })=>`\\an8\\pos(${left},${top})`;
|
|
24624
24732
|
const colorCommand = (color)=>`\\c${formatColor(color)}`;
|
|
@@ -24687,7 +24795,7 @@ and limitations under the License.
|
|
|
24687
24795
|
throw new Error(`Unknown danmaku type: ${danmaku.type}`);
|
|
24688
24796
|
}
|
|
24689
24797
|
};
|
|
24690
|
-
const
|
|
24798
|
+
const event_event = (list, config)=>{
|
|
24691
24799
|
const content = [
|
|
24692
24800
|
'[Events]',
|
|
24693
24801
|
'Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text',
|
|
@@ -24698,11 +24806,11 @@ and limitations under the License.
|
|
|
24698
24806
|
];
|
|
24699
24807
|
return content.join('\n');
|
|
24700
24808
|
};
|
|
24701
|
-
const
|
|
24809
|
+
const info_info = ({ playResX, playResY }, { filename, title })=>{
|
|
24702
24810
|
const content = [
|
|
24703
24811
|
'[Script Info]',
|
|
24704
24812
|
`Title: ${title}`,
|
|
24705
|
-
`Original Script:
|
|
24813
|
+
`Original Script: 根据 ${filename} 的弹幕信息,由 ${package_namespaceObject.TB} 生成`,
|
|
24706
24814
|
'ScriptType: v4.00+',
|
|
24707
24815
|
'Collisions: Reverse',
|
|
24708
24816
|
`PlayResX: ${playResX}`,
|
|
@@ -24714,17 +24822,17 @@ and limitations under the License.
|
|
|
24714
24822
|
var lib = __webpack_require__("../../node_modules/.pnpm/browserify-zlib@0.2.0/node_modules/browserify-zlib/lib/index.js");
|
|
24715
24823
|
var base16384_lib = __webpack_require__("../../node_modules/.pnpm/base16384@1.0.0/node_modules/base16384/lib/index.js");
|
|
24716
24824
|
var raw_Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["Buffer"];
|
|
24717
|
-
const compressTypes = [
|
|
24825
|
+
const compressTypes = new Set([
|
|
24718
24826
|
'brotli',
|
|
24719
24827
|
'gzip'
|
|
24720
|
-
];
|
|
24721
|
-
const baseTypes = [
|
|
24828
|
+
]);
|
|
24829
|
+
const baseTypes = new Set([
|
|
24722
24830
|
'base64',
|
|
24723
24831
|
'base18384'
|
|
24724
|
-
];
|
|
24832
|
+
]);
|
|
24725
24833
|
function fromUint16Array(array) {
|
|
24726
24834
|
let result = '';
|
|
24727
|
-
for (const element of array)result += String.
|
|
24835
|
+
for (const element of array)result += String.fromCodePoint(element);
|
|
24728
24836
|
return result;
|
|
24729
24837
|
}
|
|
24730
24838
|
function raw_raw(list, config, context, compressType = 'brotli', baseType = 'base18384') {
|
|
@@ -24747,14 +24855,14 @@ and limitations under the License.
|
|
|
24747
24855
|
{
|
|
24748
24856
|
let compressType = lineCompressType.replace(';RawCompressType: ', '').trim();
|
|
24749
24857
|
let baseType = lineBaseType.replace(';RawBaseType: ', '').trim();
|
|
24750
|
-
if (!compressTypes.
|
|
24751
|
-
if (!baseTypes.
|
|
24858
|
+
if (!compressTypes.has(compressType)) compressType = 'gzip';
|
|
24859
|
+
if (!baseTypes.has(baseType)) baseType = 'base64';
|
|
24752
24860
|
const text = lineRaw.replace(';Raw: ', '').trim();
|
|
24753
|
-
const buffer = 'base64' === baseType ? raw_Buffer.from(text, 'base64') : raw_Buffer.from(base16384_lib.decode(raw_Buffer.from(text, '
|
|
24861
|
+
const buffer = 'base64' === baseType ? raw_Buffer.from(text, 'base64') : raw_Buffer.from(base16384_lib.decode(raw_Buffer.from(text, 'utf8').toString('utf8')));
|
|
24754
24862
|
let decompress;
|
|
24755
24863
|
decompress = 'brotli' === compressType ? (0, lib.brotliDecompressSync)(buffer) : (0, lib.gunzipSync)(buffer);
|
|
24756
24864
|
try {
|
|
24757
|
-
return JSON.parse(decompress.toString('
|
|
24865
|
+
return JSON.parse(decompress.toString('utf8'));
|
|
24758
24866
|
} catch {
|
|
24759
24867
|
return;
|
|
24760
24868
|
}
|
|
@@ -24801,21 +24909,22 @@ and limitations under the License.
|
|
|
24801
24909
|
];
|
|
24802
24910
|
return content.join('\n');
|
|
24803
24911
|
};
|
|
24804
|
-
const
|
|
24912
|
+
const default_context = {
|
|
24805
24913
|
filename: 'unknown',
|
|
24806
24914
|
title: 'unknown'
|
|
24807
|
-
}
|
|
24915
|
+
};
|
|
24916
|
+
const create_ass = (list, rawList, config, context = default_context, rawConfig)=>{
|
|
24808
24917
|
const Elist = UniPool2DanmakuLists(list);
|
|
24809
24918
|
const ErawList = UniPool2DanmakuLists(rawList);
|
|
24810
24919
|
const content = [
|
|
24811
|
-
|
|
24920
|
+
info_info(config, context),
|
|
24812
24921
|
style(config),
|
|
24813
|
-
|
|
24922
|
+
event_event(Elist, config)
|
|
24814
24923
|
];
|
|
24815
24924
|
if (config.includeRaw) content.push(raw_raw(ErawList, config, context, rawConfig?.compressType, rawConfig?.baseType));
|
|
24816
24925
|
return `${content.join('\n\n')}\n`;
|
|
24817
24926
|
};
|
|
24818
|
-
const
|
|
24927
|
+
const getConfig = (overrides = {})=>{
|
|
24819
24928
|
const defaults = {
|
|
24820
24929
|
fontSize: [
|
|
24821
24930
|
25,
|
|
@@ -24851,10 +24960,10 @@ and limitations under the License.
|
|
|
24851
24960
|
return config;
|
|
24852
24961
|
};
|
|
24853
24962
|
function generateASS(danmaku, options, canvasCtx) {
|
|
24854
|
-
const config =
|
|
24963
|
+
const config = getConfig(options.substyle);
|
|
24855
24964
|
const mergedList = danmaku.merge(config.mergeIn);
|
|
24856
24965
|
const layoutList = layoutDanmaku(mergedList, config, canvasCtx);
|
|
24857
|
-
const content =
|
|
24966
|
+
const content = create_ass(layoutList, danmaku, config, {
|
|
24858
24967
|
filename: options?.filename || 'unknown',
|
|
24859
24968
|
title: options?.title || 'unknown'
|
|
24860
24969
|
}, options.raw);
|
|
@@ -24862,15 +24971,15 @@ and limitations under the License.
|
|
|
24862
24971
|
}
|
|
24863
24972
|
function parseAssRawField(ass, options) {
|
|
24864
24973
|
const raw = deRaw(ass);
|
|
24865
|
-
if (
|
|
24866
|
-
return
|
|
24974
|
+
if (raw) return DanmakuList2UniPool(raw.list, options);
|
|
24975
|
+
return UniPool.create();
|
|
24867
24976
|
}
|
|
24868
24977
|
const src_JSON_0 = json_bigint_default()({
|
|
24869
24978
|
useNativeBigInt: true
|
|
24870
24979
|
});
|
|
24871
24980
|
const src_DanUniConvertTipTemplate = {
|
|
24872
24981
|
meassage: 'Converted by DanUni!',
|
|
24873
|
-
version: `JS/TS ${package_namespaceObject.
|
|
24982
|
+
version: `JS/TS ${package_namespaceObject.UU} (v${package_namespaceObject.rE})`
|
|
24874
24983
|
};
|
|
24875
24984
|
class src_UniPool {
|
|
24876
24985
|
constructor(dans, options = {}, info = {
|
|
@@ -24917,7 +25026,7 @@ and limitations under the License.
|
|
|
24917
25026
|
return stats;
|
|
24918
25027
|
}
|
|
24919
25028
|
getMost(key) {
|
|
24920
|
-
return this.getStat(key).
|
|
25029
|
+
return this.getStat(key).toSorted((a, b)=>b.count - a.count)[0];
|
|
24921
25030
|
}
|
|
24922
25031
|
get most() {
|
|
24923
25032
|
return {
|
|
@@ -24979,7 +25088,7 @@ and limitations under the License.
|
|
|
24979
25088
|
}
|
|
24980
25089
|
merge(lifetime = 0) {
|
|
24981
25090
|
if (!this.shared.SOID) {
|
|
24982
|
-
console.error("
|
|
25091
|
+
console.error("本功能仅支持同弹幕库内使用,可先 .split('SOID') 在分别使用");
|
|
24983
25092
|
return this;
|
|
24984
25093
|
}
|
|
24985
25094
|
if (lifetime <= 0) return this;
|
|
@@ -25082,8 +25191,13 @@ and limitations under the License.
|
|
|
25082
25191
|
minify() {
|
|
25083
25192
|
return this.dans.map((d)=>d.minify());
|
|
25084
25193
|
}
|
|
25085
|
-
static import(file, options) {
|
|
25086
|
-
|
|
25194
|
+
static import(file, options, mod) {
|
|
25195
|
+
if (!mod) mod = [
|
|
25196
|
+
'json',
|
|
25197
|
+
'str',
|
|
25198
|
+
'bin'
|
|
25199
|
+
];
|
|
25200
|
+
const err = '无法识别该文件,请手动指定格式!';
|
|
25087
25201
|
const parseJSON = (json)=>{
|
|
25088
25202
|
try {
|
|
25089
25203
|
if (Array.isArray(json) && json.every((d)=>d.SOID)) return {
|
|
@@ -25105,63 +25219,68 @@ and limitations under the License.
|
|
|
25105
25219
|
} catch {}
|
|
25106
25220
|
};
|
|
25107
25221
|
const parseStr = (file)=>{
|
|
25108
|
-
try {
|
|
25222
|
+
if (mod.includes('json')) try {
|
|
25109
25223
|
if (IsJSON_isJSON(file)) {
|
|
25110
25224
|
const json = src_JSON_0.parse(file);
|
|
25111
25225
|
return parseJSON(json);
|
|
25112
25226
|
}
|
|
25113
25227
|
} catch {}
|
|
25114
|
-
|
|
25115
|
-
|
|
25116
|
-
|
|
25117
|
-
|
|
25118
|
-
|
|
25119
|
-
|
|
25120
|
-
|
|
25121
|
-
|
|
25122
|
-
|
|
25123
|
-
|
|
25124
|
-
|
|
25125
|
-
|
|
25126
|
-
|
|
25127
|
-
|
|
25128
|
-
|
|
25129
|
-
|
|
25228
|
+
if (mod.includes('str')) {
|
|
25229
|
+
try {
|
|
25230
|
+
const xmlParser = new XMLParser({
|
|
25231
|
+
ignoreAttributes: false
|
|
25232
|
+
});
|
|
25233
|
+
const xml = xmlParser.parse(file);
|
|
25234
|
+
if (xml?.i?.d) return {
|
|
25235
|
+
pool: this.fromBiliXML(file, options),
|
|
25236
|
+
fmt: 'bili.xml'
|
|
25237
|
+
};
|
|
25238
|
+
} catch {}
|
|
25239
|
+
try {
|
|
25240
|
+
return {
|
|
25241
|
+
pool: this.fromASS(file, options),
|
|
25242
|
+
fmt: 'common.ass'
|
|
25243
|
+
};
|
|
25244
|
+
} catch {}
|
|
25245
|
+
}
|
|
25130
25246
|
};
|
|
25131
25247
|
let errmesg;
|
|
25132
|
-
if (isObject(file))
|
|
25133
|
-
|
|
25134
|
-
|
|
25135
|
-
|
|
25136
|
-
|
|
25137
|
-
|
|
25138
|
-
|
|
25139
|
-
|
|
25140
|
-
|
|
25141
|
-
|
|
25142
|
-
|
|
25143
|
-
|
|
25144
|
-
|
|
25145
|
-
|
|
25146
|
-
|
|
25147
|
-
|
|
25148
|
-
|
|
25149
|
-
|
|
25150
|
-
|
|
25151
|
-
|
|
25152
|
-
|
|
25153
|
-
|
|
25154
|
-
|
|
25155
|
-
|
|
25156
|
-
|
|
25157
|
-
|
|
25158
|
-
|
|
25159
|
-
|
|
25160
|
-
|
|
25161
|
-
|
|
25162
|
-
|
|
25248
|
+
if (isObject(file)) {
|
|
25249
|
+
if (file instanceof ArrayBuffer || file instanceof Uint8Array) {
|
|
25250
|
+
if (mod.includes('bin')) {
|
|
25251
|
+
try {
|
|
25252
|
+
return {
|
|
25253
|
+
pool: this.fromPb(file),
|
|
25254
|
+
fmt: 'danuni.pb.bin'
|
|
25255
|
+
};
|
|
25256
|
+
} catch {}
|
|
25257
|
+
try {
|
|
25258
|
+
return {
|
|
25259
|
+
pool: this.fromBiliGrpc(file),
|
|
25260
|
+
fmt: 'bili.pb.bin'
|
|
25261
|
+
};
|
|
25262
|
+
} catch {}
|
|
25263
|
+
try {
|
|
25264
|
+
return {
|
|
25265
|
+
pool: this.fromBiliCommandGrpc(file),
|
|
25266
|
+
fmt: 'bili.cmd.pb.bin'
|
|
25267
|
+
};
|
|
25268
|
+
} catch {}
|
|
25269
|
+
}
|
|
25270
|
+
try {
|
|
25271
|
+
const fileStr = new TextDecoder().decode(file);
|
|
25272
|
+
const prStr = parseStr(fileStr);
|
|
25273
|
+
if (prStr) return prStr;
|
|
25274
|
+
errmesg = `${err}(定位: bin->string)`;
|
|
25275
|
+
} catch {}
|
|
25276
|
+
} else if (mod.includes('json')) {
|
|
25277
|
+
const prJSON = parseJSON(file);
|
|
25278
|
+
if (!prJSON) throw new Error(`${err}(定位: json)`);
|
|
25279
|
+
return prJSON;
|
|
25280
|
+
}
|
|
25281
|
+
} else if (isString(file)) {
|
|
25163
25282
|
const prStr = parseStr(file);
|
|
25164
|
-
if (!prStr) throw new Error(`${err}(
|
|
25283
|
+
if (!prStr) throw new Error(`${err}(定位: string)`);
|
|
25165
25284
|
return prStr;
|
|
25166
25285
|
}
|
|
25167
25286
|
throw new Error(errmesg ?? err);
|
|
@@ -25259,7 +25378,7 @@ and limitations under the License.
|
|
|
25259
25378
|
};
|
|
25260
25379
|
if (options?.avoidSenderIDWithAt) {
|
|
25261
25380
|
const ok = this.dans.every((d)=>d.senderID.endsWith(`@${platform_PlatformVideoSource.Bilibili}`));
|
|
25262
|
-
if (!ok) throw new Error(
|
|
25381
|
+
if (!ok) throw new Error('存在其他来源的senderID,请关闭该功能再试!');
|
|
25263
25382
|
}
|
|
25264
25383
|
const builder = new Builder({
|
|
25265
25384
|
ignoreAttributes: false
|
|
@@ -25394,14 +25513,16 @@ and limitations under the License.
|
|
|
25394
25513
|
static fromASS(ass, options) {
|
|
25395
25514
|
return parseAssRawField(ass, options);
|
|
25396
25515
|
}
|
|
25397
|
-
toASS(canvasCtx, options
|
|
25398
|
-
|
|
25399
|
-
|
|
25516
|
+
toASS(canvasCtx, options) {
|
|
25517
|
+
const defaultOptions = {
|
|
25518
|
+
substyle: {}
|
|
25519
|
+
};
|
|
25520
|
+
const finalOptions = options ?? defaultOptions;
|
|
25400
25521
|
const fn = this.shared.SOID;
|
|
25401
25522
|
return generateASS(this, {
|
|
25402
25523
|
filename: fn,
|
|
25403
25524
|
title: fn,
|
|
25404
|
-
...
|
|
25525
|
+
...finalOptions
|
|
25405
25526
|
}, canvasCtx);
|
|
25406
25527
|
}
|
|
25407
25528
|
}
|