decord/source/__polyfill/01xxx/module_1164.js
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

61 lines
1.8 KiB
JavaScript

// Module ID: 1164
// Function ID: 1165
// Dependencies: [1165, 1162]
// Exports: parseNumberSkeleton, parseNumberSkeletonFromString
// Module 1164
import WHITE_SPACE_REGEX from "WHITE_SPACE_REGEX" /* 1165 */;
require = arg1;
const dependencyMap = arg6;
const re2 = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
const re3 = /^(@+)?(\+|#+)?[rs]?$/g;
const re4 = /(\*)(0+)|(#+)(0+)|(0+)/g;
const re5 = /^(0+)$/;
export const parseNumberSkeletonFromString = function parseNumberSkeletonFromString(str) {
if (0 === str.length) {
const _Error3 = Error;
const error = new Error("Number skeleton cannot be empty");
throw error;
} else {
const items = [];
const parts = str.split(WHITE_SPACE_REGEX.WHITE_SPACE_REGEX);
const found = parts.filter((item) => item.length > 0);
let num2 = 0;
if (0 < found.length) {
const parts1 = found[num2].split("/");
while (0 !== parts1.length) {
let substr = parts1.slice(1);
let num = 0;
if (0 < substr.length) {
while (0 !== substr[num].length) {
num = num + 1;
continue;
}
let tmp4 = globalThis;
let _Error = Error;
let tmp5 = new.target;
let str2 = "Invalid number skeleton";
let tmp6 = new.target;
let error1 = new Error("Invalid number skeleton");
throw error1;
}
let obj = { stem: parts1[0], options: substr };
let arr = items.push(obj);
num2 = num2 + 1;
}
const _Error2 = Error;
const error2 = new Error("Invalid number skeleton");
throw error2;
}
return items;
}
};
export const parseNumberSkeleton = function parseNumberSkeleton(arg0) {
const obj = {};
if (0 < arg0.length) {
const stem = arg0[num].stem;
}
return obj;
};