@dan-uni/dan-any 0.9.4 → 0.9.6
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 +129 -79
- package/dist/index.min.js +138 -93
- package/dist/index.umd.min.js +373 -232
- 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 +68 -1
- package/dist/src/utils/dm-gen.d.ts +3 -0
- 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.test.ts +0 -1
- package/src/index.ts +120 -12
- 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 +38 -28
- 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.6","TB":"https://github.com/ani-uni/danuni/tree/master/packages/dan-any#readme"}');
|
|
20894
20985
|
const file_bili_dm = /*@__PURE__*/ fileDesc("Cg1iaWxpL2RtLnByb3RvEiBiaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MSJkCgZBdmF0YXISCgoCaWQYASABKAkSCwoDdXJsGAIgASgJEkEKC2F2YXRhcl90eXBlGAMgASgOMiwuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuQXZhdGFyVHlwZSIjCgZCdWJibGUSDAoEdGV4dBgBIAEoCRILCgN1cmwYAiABKAkixgEKCEJ1YmJsZVYyEgwKBHRleHQYASABKAkSCwoDdXJsGAIgASgJEkEKC2J1YmJsZV90eXBlGAMgASgOMiwuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuQnViYmxlVHlwZRIVCg1leHBvc3VyZV9vbmNlGAQgASgIEkUKDWV4cG9zdXJlX3R5cGUYBSABKA4yLi5iaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5FeHBvc3VyZVR5cGUiWwoGQnV0dG9uEgwKBHRleHQYASABKAkSQwoGYWN0aW9uGAIgASgOMjMuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuVG9hc3RGdW5jdGlvblR5cGUiWAoOQnV6endvcmRDb25maWcSRgoIa2V5d29yZHMYASADKAsyNC5iaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5CdXp6d29y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nZpY2UuZG0udjEuUmVzcG9uc2USagoIRG1TZWdPdHQSLS5iaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5EbVNlZ090dFJlcRovLmJpbGliaWxpLmNvbW11bml0eS5zZXJ2aWNlLmRtLnYxLkRtU2VnT3R0UmVwbHkSagoIRG1TZWdTREsSLS5iaWxpYmlsaS5jb21tdW5pdHkuc2VydmljZS5kbS52MS5EbVNlZ1NES1JlcRovLmJpbGliaWxpLmNvbW11bml0eS5zZXJ2aWNlLmRtLnYxLkRtU2VnU0RLUmVwbHkSdAoMRG1FeHBvUmVwb3J0EjEuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuRG1FeHBvUmVwb3J0UmVxGjEuYmlsaWJpbGkuY29tbXVuaXR5LnNlcnZpY2UuZG0udjEuRG1FeHBvUmVwb3J0UmVzYgZwcm90bzM");
|
|
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
|
}
|
|
@@ -23474,7 +23570,9 @@ and limitations under the License.
|
|
|
23474
23570
|
bili: {
|
|
23475
23571
|
mode: args.mode,
|
|
23476
23572
|
pool: args.pool,
|
|
23477
|
-
dmid: args.id
|
|
23573
|
+
dmid: args.id,
|
|
23574
|
+
attr: args.attr,
|
|
23575
|
+
mid: args.mid
|
|
23478
23576
|
}
|
|
23479
23577
|
};
|
|
23480
23578
|
switch(args.mode){
|
|
@@ -23509,7 +23607,7 @@ and limitations under the License.
|
|
|
23509
23607
|
mode,
|
|
23510
23608
|
senderID: senderID.toString(),
|
|
23511
23609
|
ctime: this.transCtime(args.ctime, 's'),
|
|
23512
|
-
weight: args.weight
|
|
23610
|
+
weight: args.weight || (3 === pool ? 1 : 0),
|
|
23513
23611
|
pool,
|
|
23514
23612
|
attr: DMAttrUtils.fromBin(args.attr, platform_PlatformVideoSource.Bilibili),
|
|
23515
23613
|
platform: platform_PlatformVideoSource.Bilibili,
|
|
@@ -23883,7 +23981,7 @@ and limitations under the License.
|
|
|
23883
23981
|
});
|
|
23884
23982
|
const DanUniConvertTipTemplate = {
|
|
23885
23983
|
meassage: 'Converted by DanUni!',
|
|
23886
|
-
version: `JS/TS ${package_namespaceObject.
|
|
23984
|
+
version: `JS/TS ${package_namespaceObject.UU} (v${package_namespaceObject.rE})`
|
|
23887
23985
|
};
|
|
23888
23986
|
class UniPool {
|
|
23889
23987
|
constructor(dans, options = {}, info = {
|
|
@@ -23930,7 +24028,7 @@ and limitations under the License.
|
|
|
23930
24028
|
return stats;
|
|
23931
24029
|
}
|
|
23932
24030
|
getMost(key) {
|
|
23933
|
-
return this.getStat(key).
|
|
24031
|
+
return this.getStat(key).toSorted((a, b)=>b.count - a.count)[0];
|
|
23934
24032
|
}
|
|
23935
24033
|
get most() {
|
|
23936
24034
|
return {
|
|
@@ -23992,7 +24090,7 @@ and limitations under the License.
|
|
|
23992
24090
|
}
|
|
23993
24091
|
merge(lifetime = 0) {
|
|
23994
24092
|
if (!this.shared.SOID) {
|
|
23995
|
-
console.error("
|
|
24093
|
+
console.error("本功能仅支持同弹幕库内使用,可先 .split('SOID') 在分别使用");
|
|
23996
24094
|
return this;
|
|
23997
24095
|
}
|
|
23998
24096
|
if (lifetime <= 0) return this;
|
|
@@ -24101,7 +24199,7 @@ and limitations under the License.
|
|
|
24101
24199
|
'str',
|
|
24102
24200
|
'bin'
|
|
24103
24201
|
];
|
|
24104
|
-
const err =
|
|
24202
|
+
const err = '无法识别该文件,请手动指定格式!';
|
|
24105
24203
|
const parseJSON = (json)=>{
|
|
24106
24204
|
try {
|
|
24107
24205
|
if (Array.isArray(json) && json.every((d)=>d.SOID)) return {
|
|
@@ -24175,16 +24273,16 @@ and limitations under the License.
|
|
|
24175
24273
|
const fileStr = new TextDecoder().decode(file);
|
|
24176
24274
|
const prStr = parseStr(fileStr);
|
|
24177
24275
|
if (prStr) return prStr;
|
|
24178
|
-
errmesg = `${err}(
|
|
24276
|
+
errmesg = `${err}(定位: bin->string)`;
|
|
24179
24277
|
} catch {}
|
|
24180
24278
|
} else if (mod.includes('json')) {
|
|
24181
24279
|
const prJSON = parseJSON(file);
|
|
24182
|
-
if (!prJSON) throw new Error(`${err}(
|
|
24280
|
+
if (!prJSON) throw new Error(`${err}(定位: json)`);
|
|
24183
24281
|
return prJSON;
|
|
24184
24282
|
}
|
|
24185
24283
|
} else if (isString(file)) {
|
|
24186
24284
|
const prStr = parseStr(file);
|
|
24187
|
-
if (!prStr) throw new Error(`${err}(
|
|
24285
|
+
if (!prStr) throw new Error(`${err}(定位: string)`);
|
|
24188
24286
|
return prStr;
|
|
24189
24287
|
}
|
|
24190
24288
|
throw new Error(errmesg ?? err);
|
|
@@ -24282,7 +24380,7 @@ and limitations under the License.
|
|
|
24282
24380
|
};
|
|
24283
24381
|
if (options?.avoidSenderIDWithAt) {
|
|
24284
24382
|
const ok = this.dans.every((d)=>d.senderID.endsWith(`@${platform_PlatformVideoSource.Bilibili}`));
|
|
24285
|
-
if (!ok) throw new Error(
|
|
24383
|
+
if (!ok) throw new Error('存在其他来源的senderID,请关闭该功能再试!');
|
|
24286
24384
|
}
|
|
24287
24385
|
const builder = new Builder({
|
|
24288
24386
|
ignoreAttributes: false
|
|
@@ -24321,6 +24419,25 @@ and limitations under the License.
|
|
|
24321
24419
|
const json = data.commandDms;
|
|
24322
24420
|
return new UniPool(json.map((d)=>UniDM.fromBiliCommand(d, d.oid, options)), options);
|
|
24323
24421
|
}
|
|
24422
|
+
static fromBiliUp(json, options) {
|
|
24423
|
+
return new UniPool(json.data.result.map((d)=>{
|
|
24424
|
+
const attrBin = d.attrs ? d.attrs.split(',').map(Number).reduce((bin, bitPosition)=>bin | 1 << bitPosition - 1, 0) : 0;
|
|
24425
|
+
return UniDM.fromBili({
|
|
24426
|
+
id: BigInt(d.id_str || d.id),
|
|
24427
|
+
progress: d.progress / 1000,
|
|
24428
|
+
mode: d.mode,
|
|
24429
|
+
fontsize: d.fontsize,
|
|
24430
|
+
color: Number.parseInt(d.color, 16),
|
|
24431
|
+
mid: d.mid,
|
|
24432
|
+
midHash: d.mid_hash,
|
|
24433
|
+
content: d.msg,
|
|
24434
|
+
ctime: BigInt(d.ctime),
|
|
24435
|
+
pool: d.pool,
|
|
24436
|
+
attr: attrBin,
|
|
24437
|
+
oid: BigInt(d.oid)
|
|
24438
|
+
}, BigInt(d.oid), options);
|
|
24439
|
+
}), options);
|
|
24440
|
+
}
|
|
24324
24441
|
static fromDplayer(json, playerID, domain = 'other', options) {
|
|
24325
24442
|
return new UniPool(json.data.map((d)=>UniDM.fromDplayer({
|
|
24326
24443
|
content: d[4],
|
|
@@ -24417,14 +24534,16 @@ and limitations under the License.
|
|
|
24417
24534
|
static fromASS(ass, options) {
|
|
24418
24535
|
return parseAssRawField(ass, options);
|
|
24419
24536
|
}
|
|
24420
|
-
toASS(canvasCtx, options
|
|
24421
|
-
|
|
24422
|
-
|
|
24537
|
+
toASS(canvasCtx, options) {
|
|
24538
|
+
const defaultOptions = {
|
|
24539
|
+
substyle: {}
|
|
24540
|
+
};
|
|
24541
|
+
const finalOptions = options ?? defaultOptions;
|
|
24423
24542
|
const fn = this.shared.SOID;
|
|
24424
24543
|
return generateASS(this, {
|
|
24425
24544
|
filename: fn,
|
|
24426
24545
|
title: fn,
|
|
24427
|
-
...
|
|
24546
|
+
...finalOptions
|
|
24428
24547
|
}, canvasCtx);
|
|
24429
24548
|
}
|
|
24430
24549
|
}
|
|
@@ -24536,7 +24655,7 @@ and limitations under the License.
|
|
|
24536
24655
|
};
|
|
24537
24656
|
};
|
|
24538
24657
|
const measureTextWidthConstructor = (canvasContext)=>{
|
|
24539
|
-
const supportTextMeasure = !!canvasContext.measureText(
|
|
24658
|
+
const supportTextMeasure = !!canvasContext.measureText('中');
|
|
24540
24659
|
if (supportTextMeasure) return (fontName, fontSize, bold, text)=>{
|
|
24541
24660
|
canvasContext.font = `${bold ? 'bold' : 'normal'} ${fontSize}px ${fontName}`;
|
|
24542
24661
|
const textWidth = canvasContext.measureText(text).width;
|
|
@@ -24614,7 +24733,7 @@ and limitations under the License.
|
|
|
24614
24733
|
const layoutDanmaku = (inputList, config, canvasCtx)=>{
|
|
24615
24734
|
const list = [
|
|
24616
24735
|
...UniPool2DanmakuLists(inputList)
|
|
24617
|
-
].
|
|
24736
|
+
].toSorted((x, y)=>x.time - y.time);
|
|
24618
24737
|
const layout = initializeLayout(config, canvasCtx);
|
|
24619
24738
|
return DanmakuList2UniPool(list.map(layout).filter((danmaku)=>!!danmaku));
|
|
24620
24739
|
};
|
|
@@ -24628,7 +24747,7 @@ and limitations under the License.
|
|
|
24628
24747
|
const minorSecond = Math.floor((seconds - integer) * 100);
|
|
24629
24748
|
return `${hour}:${pad(minute)}:${pad(second)}.${minorSecond}`;
|
|
24630
24749
|
};
|
|
24631
|
-
const encode = (text)=>text.toString().replaceAll('{',
|
|
24750
|
+
const encode = (text)=>text.toString().replaceAll('{', '{').replaceAll('}', '}').replaceAll(/\r|\n/g, '');
|
|
24632
24751
|
const scrollCommand = ({ start, end, top })=>`\\move(${start},${top},${end},${top})`;
|
|
24633
24752
|
const fixCommand = ({ top, left })=>`\\an8\\pos(${left},${top})`;
|
|
24634
24753
|
const colorCommand = (color)=>`\\c${formatColor(color)}`;
|
|
@@ -24697,7 +24816,7 @@ and limitations under the License.
|
|
|
24697
24816
|
throw new Error(`Unknown danmaku type: ${danmaku.type}`);
|
|
24698
24817
|
}
|
|
24699
24818
|
};
|
|
24700
|
-
const
|
|
24819
|
+
const event_event = (list, config)=>{
|
|
24701
24820
|
const content = [
|
|
24702
24821
|
'[Events]',
|
|
24703
24822
|
'Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text',
|
|
@@ -24708,11 +24827,11 @@ and limitations under the License.
|
|
|
24708
24827
|
];
|
|
24709
24828
|
return content.join('\n');
|
|
24710
24829
|
};
|
|
24711
|
-
const
|
|
24830
|
+
const info_info = ({ playResX, playResY }, { filename, title })=>{
|
|
24712
24831
|
const content = [
|
|
24713
24832
|
'[Script Info]',
|
|
24714
24833
|
`Title: ${title}`,
|
|
24715
|
-
`Original Script:
|
|
24834
|
+
`Original Script: 根据 ${filename} 的弹幕信息,由 ${package_namespaceObject.TB} 生成`,
|
|
24716
24835
|
'ScriptType: v4.00+',
|
|
24717
24836
|
'Collisions: Reverse',
|
|
24718
24837
|
`PlayResX: ${playResX}`,
|
|
@@ -24724,17 +24843,17 @@ and limitations under the License.
|
|
|
24724
24843
|
var lib = __webpack_require__("../../node_modules/.pnpm/browserify-zlib@0.2.0/node_modules/browserify-zlib/lib/index.js");
|
|
24725
24844
|
var base16384_lib = __webpack_require__("../../node_modules/.pnpm/base16384@1.0.0/node_modules/base16384/lib/index.js");
|
|
24726
24845
|
var raw_Buffer = __webpack_require__("../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.js")["Buffer"];
|
|
24727
|
-
const compressTypes = [
|
|
24846
|
+
const compressTypes = new Set([
|
|
24728
24847
|
'brotli',
|
|
24729
24848
|
'gzip'
|
|
24730
|
-
];
|
|
24731
|
-
const baseTypes = [
|
|
24849
|
+
]);
|
|
24850
|
+
const baseTypes = new Set([
|
|
24732
24851
|
'base64',
|
|
24733
24852
|
'base18384'
|
|
24734
|
-
];
|
|
24853
|
+
]);
|
|
24735
24854
|
function fromUint16Array(array) {
|
|
24736
24855
|
let result = '';
|
|
24737
|
-
for (const element of array)result += String.
|
|
24856
|
+
for (const element of array)result += String.fromCodePoint(element);
|
|
24738
24857
|
return result;
|
|
24739
24858
|
}
|
|
24740
24859
|
function raw_raw(list, config, context, compressType = 'brotli', baseType = 'base18384') {
|
|
@@ -24757,14 +24876,14 @@ and limitations under the License.
|
|
|
24757
24876
|
{
|
|
24758
24877
|
let compressType = lineCompressType.replace(';RawCompressType: ', '').trim();
|
|
24759
24878
|
let baseType = lineBaseType.replace(';RawBaseType: ', '').trim();
|
|
24760
|
-
if (!compressTypes.
|
|
24761
|
-
if (!baseTypes.
|
|
24879
|
+
if (!compressTypes.has(compressType)) compressType = 'gzip';
|
|
24880
|
+
if (!baseTypes.has(baseType)) baseType = 'base64';
|
|
24762
24881
|
const text = lineRaw.replace(';Raw: ', '').trim();
|
|
24763
|
-
const buffer = 'base64' === baseType ? raw_Buffer.from(text, 'base64') : raw_Buffer.from(base16384_lib.decode(raw_Buffer.from(text, '
|
|
24882
|
+
const buffer = 'base64' === baseType ? raw_Buffer.from(text, 'base64') : raw_Buffer.from(base16384_lib.decode(raw_Buffer.from(text, 'utf8').toString('utf8')));
|
|
24764
24883
|
let decompress;
|
|
24765
24884
|
decompress = 'brotli' === compressType ? (0, lib.brotliDecompressSync)(buffer) : (0, lib.gunzipSync)(buffer);
|
|
24766
24885
|
try {
|
|
24767
|
-
return JSON.parse(decompress.toString('
|
|
24886
|
+
return JSON.parse(decompress.toString('utf8'));
|
|
24768
24887
|
} catch {
|
|
24769
24888
|
return;
|
|
24770
24889
|
}
|
|
@@ -24811,21 +24930,22 @@ and limitations under the License.
|
|
|
24811
24930
|
];
|
|
24812
24931
|
return content.join('\n');
|
|
24813
24932
|
};
|
|
24814
|
-
const
|
|
24933
|
+
const default_context = {
|
|
24815
24934
|
filename: 'unknown',
|
|
24816
24935
|
title: 'unknown'
|
|
24817
|
-
}
|
|
24936
|
+
};
|
|
24937
|
+
const create_ass = (list, rawList, config, context = default_context, rawConfig)=>{
|
|
24818
24938
|
const Elist = UniPool2DanmakuLists(list);
|
|
24819
24939
|
const ErawList = UniPool2DanmakuLists(rawList);
|
|
24820
24940
|
const content = [
|
|
24821
|
-
|
|
24941
|
+
info_info(config, context),
|
|
24822
24942
|
style(config),
|
|
24823
|
-
|
|
24943
|
+
event_event(Elist, config)
|
|
24824
24944
|
];
|
|
24825
24945
|
if (config.includeRaw) content.push(raw_raw(ErawList, config, context, rawConfig?.compressType, rawConfig?.baseType));
|
|
24826
24946
|
return `${content.join('\n\n')}\n`;
|
|
24827
24947
|
};
|
|
24828
|
-
const
|
|
24948
|
+
const getConfig = (overrides = {})=>{
|
|
24829
24949
|
const defaults = {
|
|
24830
24950
|
fontSize: [
|
|
24831
24951
|
25,
|
|
@@ -24861,10 +24981,10 @@ and limitations under the License.
|
|
|
24861
24981
|
return config;
|
|
24862
24982
|
};
|
|
24863
24983
|
function generateASS(danmaku, options, canvasCtx) {
|
|
24864
|
-
const config =
|
|
24984
|
+
const config = getConfig(options.substyle);
|
|
24865
24985
|
const mergedList = danmaku.merge(config.mergeIn);
|
|
24866
24986
|
const layoutList = layoutDanmaku(mergedList, config, canvasCtx);
|
|
24867
|
-
const content =
|
|
24987
|
+
const content = create_ass(layoutList, danmaku, config, {
|
|
24868
24988
|
filename: options?.filename || 'unknown',
|
|
24869
24989
|
title: options?.title || 'unknown'
|
|
24870
24990
|
}, options.raw);
|
|
@@ -24872,15 +24992,15 @@ and limitations under the License.
|
|
|
24872
24992
|
}
|
|
24873
24993
|
function parseAssRawField(ass, options) {
|
|
24874
24994
|
const raw = deRaw(ass);
|
|
24875
|
-
if (
|
|
24876
|
-
return
|
|
24995
|
+
if (raw) return DanmakuList2UniPool(raw.list, options);
|
|
24996
|
+
return UniPool.create();
|
|
24877
24997
|
}
|
|
24878
24998
|
const src_JSON_0 = json_bigint_default()({
|
|
24879
24999
|
useNativeBigInt: true
|
|
24880
25000
|
});
|
|
24881
25001
|
const src_DanUniConvertTipTemplate = {
|
|
24882
25002
|
meassage: 'Converted by DanUni!',
|
|
24883
|
-
version: `JS/TS ${package_namespaceObject.
|
|
25003
|
+
version: `JS/TS ${package_namespaceObject.UU} (v${package_namespaceObject.rE})`
|
|
24884
25004
|
};
|
|
24885
25005
|
class src_UniPool {
|
|
24886
25006
|
constructor(dans, options = {}, info = {
|
|
@@ -24927,7 +25047,7 @@ and limitations under the License.
|
|
|
24927
25047
|
return stats;
|
|
24928
25048
|
}
|
|
24929
25049
|
getMost(key) {
|
|
24930
|
-
return this.getStat(key).
|
|
25050
|
+
return this.getStat(key).toSorted((a, b)=>b.count - a.count)[0];
|
|
24931
25051
|
}
|
|
24932
25052
|
get most() {
|
|
24933
25053
|
return {
|
|
@@ -24989,7 +25109,7 @@ and limitations under the License.
|
|
|
24989
25109
|
}
|
|
24990
25110
|
merge(lifetime = 0) {
|
|
24991
25111
|
if (!this.shared.SOID) {
|
|
24992
|
-
console.error("
|
|
25112
|
+
console.error("本功能仅支持同弹幕库内使用,可先 .split('SOID') 在分别使用");
|
|
24993
25113
|
return this;
|
|
24994
25114
|
}
|
|
24995
25115
|
if (lifetime <= 0) return this;
|
|
@@ -25098,7 +25218,7 @@ and limitations under the License.
|
|
|
25098
25218
|
'str',
|
|
25099
25219
|
'bin'
|
|
25100
25220
|
];
|
|
25101
|
-
const err =
|
|
25221
|
+
const err = '无法识别该文件,请手动指定格式!';
|
|
25102
25222
|
const parseJSON = (json)=>{
|
|
25103
25223
|
try {
|
|
25104
25224
|
if (Array.isArray(json) && json.every((d)=>d.SOID)) return {
|
|
@@ -25172,16 +25292,16 @@ and limitations under the License.
|
|
|
25172
25292
|
const fileStr = new TextDecoder().decode(file);
|
|
25173
25293
|
const prStr = parseStr(fileStr);
|
|
25174
25294
|
if (prStr) return prStr;
|
|
25175
|
-
errmesg = `${err}(
|
|
25295
|
+
errmesg = `${err}(定位: bin->string)`;
|
|
25176
25296
|
} catch {}
|
|
25177
25297
|
} else if (mod.includes('json')) {
|
|
25178
25298
|
const prJSON = parseJSON(file);
|
|
25179
|
-
if (!prJSON) throw new Error(`${err}(
|
|
25299
|
+
if (!prJSON) throw new Error(`${err}(定位: json)`);
|
|
25180
25300
|
return prJSON;
|
|
25181
25301
|
}
|
|
25182
25302
|
} else if (isString(file)) {
|
|
25183
25303
|
const prStr = parseStr(file);
|
|
25184
|
-
if (!prStr) throw new Error(`${err}(
|
|
25304
|
+
if (!prStr) throw new Error(`${err}(定位: string)`);
|
|
25185
25305
|
return prStr;
|
|
25186
25306
|
}
|
|
25187
25307
|
throw new Error(errmesg ?? err);
|
|
@@ -25279,7 +25399,7 @@ and limitations under the License.
|
|
|
25279
25399
|
};
|
|
25280
25400
|
if (options?.avoidSenderIDWithAt) {
|
|
25281
25401
|
const ok = this.dans.every((d)=>d.senderID.endsWith(`@${platform_PlatformVideoSource.Bilibili}`));
|
|
25282
|
-
if (!ok) throw new Error(
|
|
25402
|
+
if (!ok) throw new Error('存在其他来源的senderID,请关闭该功能再试!');
|
|
25283
25403
|
}
|
|
25284
25404
|
const builder = new Builder({
|
|
25285
25405
|
ignoreAttributes: false
|
|
@@ -25318,6 +25438,25 @@ and limitations under the License.
|
|
|
25318
25438
|
const json = data.commandDms;
|
|
25319
25439
|
return new src_UniPool(json.map((d)=>UniDM.fromBiliCommand(d, d.oid, options)), options);
|
|
25320
25440
|
}
|
|
25441
|
+
static fromBiliUp(json, options) {
|
|
25442
|
+
return new src_UniPool(json.data.result.map((d)=>{
|
|
25443
|
+
const attrBin = d.attrs ? d.attrs.split(',').map(Number).reduce((bin, bitPosition)=>bin | 1 << bitPosition - 1, 0) : 0;
|
|
25444
|
+
return UniDM.fromBili({
|
|
25445
|
+
id: BigInt(d.id_str || d.id),
|
|
25446
|
+
progress: d.progress / 1000,
|
|
25447
|
+
mode: d.mode,
|
|
25448
|
+
fontsize: d.fontsize,
|
|
25449
|
+
color: Number.parseInt(d.color, 16),
|
|
25450
|
+
mid: d.mid,
|
|
25451
|
+
midHash: d.mid_hash,
|
|
25452
|
+
content: d.msg,
|
|
25453
|
+
ctime: BigInt(d.ctime),
|
|
25454
|
+
pool: d.pool,
|
|
25455
|
+
attr: attrBin,
|
|
25456
|
+
oid: BigInt(d.oid)
|
|
25457
|
+
}, BigInt(d.oid), options);
|
|
25458
|
+
}), options);
|
|
25459
|
+
}
|
|
25321
25460
|
static fromDplayer(json, playerID, domain = 'other', options) {
|
|
25322
25461
|
return new src_UniPool(json.data.map((d)=>UniDM.fromDplayer({
|
|
25323
25462
|
content: d[4],
|
|
@@ -25414,14 +25553,16 @@ and limitations under the License.
|
|
|
25414
25553
|
static fromASS(ass, options) {
|
|
25415
25554
|
return parseAssRawField(ass, options);
|
|
25416
25555
|
}
|
|
25417
|
-
toASS(canvasCtx, options
|
|
25418
|
-
|
|
25419
|
-
|
|
25556
|
+
toASS(canvasCtx, options) {
|
|
25557
|
+
const defaultOptions = {
|
|
25558
|
+
substyle: {}
|
|
25559
|
+
};
|
|
25560
|
+
const finalOptions = options ?? defaultOptions;
|
|
25420
25561
|
const fn = this.shared.SOID;
|
|
25421
25562
|
return generateASS(this, {
|
|
25422
25563
|
filename: fn,
|
|
25423
25564
|
title: fn,
|
|
25424
|
-
...
|
|
25565
|
+
...finalOptions
|
|
25425
25566
|
}, canvasCtx);
|
|
25426
25567
|
}
|
|
25427
25568
|
}
|