Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/embedpre.../assets/pdf/build
File: pdf.worker.js
return;
[44000] Fix | Delete
}
[44001] Fix | Delete
this.xfaFont = {
[44002] Fix | Delete
typeface: xfaFont.typeface,
[44003] Fix | Delete
posture: xfaFont.posture,
[44004] Fix | Delete
weight: xfaFont.weight,
[44005] Fix | Delete
size: xfaFont.size,
[44006] Fix | Delete
letterSpacing: xfaFont.letterSpacing
[44007] Fix | Delete
};
[44008] Fix | Delete
const typeface = fontFinder.find(xfaFont.typeface);
[44009] Fix | Delete
if (!typeface) {
[44010] Fix | Delete
[this.pdfFont, this.xfaFont] = this.defaultFont(fontFinder);
[44011] Fix | Delete
return;
[44012] Fix | Delete
}
[44013] Fix | Delete
this.pdfFont = selectFont(xfaFont, typeface);
[44014] Fix | Delete
if (!this.pdfFont) {
[44015] Fix | Delete
[this.pdfFont, this.xfaFont] = this.defaultFont(fontFinder);
[44016] Fix | Delete
}
[44017] Fix | Delete
}
[44018] Fix | Delete
defaultFont(fontFinder) {
[44019] Fix | Delete
const font = fontFinder.find("Helvetica", false) || fontFinder.find("Myriad Pro", false) || fontFinder.find("Arial", false) || fontFinder.getDefault();
[44020] Fix | Delete
if (font?.regular) {
[44021] Fix | Delete
const pdfFont = font.regular;
[44022] Fix | Delete
const info = pdfFont.cssFontInfo;
[44023] Fix | Delete
const xfaFont = {
[44024] Fix | Delete
typeface: info.fontFamily,
[44025] Fix | Delete
posture: "normal",
[44026] Fix | Delete
weight: "normal",
[44027] Fix | Delete
size: 10,
[44028] Fix | Delete
letterSpacing: 0
[44029] Fix | Delete
};
[44030] Fix | Delete
return [pdfFont, xfaFont];
[44031] Fix | Delete
}
[44032] Fix | Delete
const xfaFont = {
[44033] Fix | Delete
typeface: "Courier",
[44034] Fix | Delete
posture: "normal",
[44035] Fix | Delete
weight: "normal",
[44036] Fix | Delete
size: 10,
[44037] Fix | Delete
letterSpacing: 0
[44038] Fix | Delete
};
[44039] Fix | Delete
return [null, xfaFont];
[44040] Fix | Delete
}
[44041] Fix | Delete
}
[44042] Fix | Delete
class FontSelector {
[44043] Fix | Delete
constructor(defaultXfaFont, defaultParaMargin, defaultLineHeight, fontFinder) {
[44044] Fix | Delete
this.fontFinder = fontFinder;
[44045] Fix | Delete
this.stack = [new FontInfo(defaultXfaFont, defaultParaMargin, defaultLineHeight, fontFinder)];
[44046] Fix | Delete
}
[44047] Fix | Delete
pushData(xfaFont, margin, lineHeight) {
[44048] Fix | Delete
const lastFont = this.stack.at(-1);
[44049] Fix | Delete
for (const name of ["typeface", "posture", "weight", "size", "letterSpacing"]) {
[44050] Fix | Delete
if (!xfaFont[name]) {
[44051] Fix | Delete
xfaFont[name] = lastFont.xfaFont[name];
[44052] Fix | Delete
}
[44053] Fix | Delete
}
[44054] Fix | Delete
for (const name of ["top", "bottom", "left", "right"]) {
[44055] Fix | Delete
if (isNaN(margin[name])) {
[44056] Fix | Delete
margin[name] = lastFont.paraMargin[name];
[44057] Fix | Delete
}
[44058] Fix | Delete
}
[44059] Fix | Delete
const fontInfo = new FontInfo(xfaFont, margin, lineHeight || lastFont.lineHeight, this.fontFinder);
[44060] Fix | Delete
if (!fontInfo.pdfFont) {
[44061] Fix | Delete
fontInfo.pdfFont = lastFont.pdfFont;
[44062] Fix | Delete
}
[44063] Fix | Delete
this.stack.push(fontInfo);
[44064] Fix | Delete
}
[44065] Fix | Delete
popFont() {
[44066] Fix | Delete
this.stack.pop();
[44067] Fix | Delete
}
[44068] Fix | Delete
topFont() {
[44069] Fix | Delete
return this.stack.at(-1);
[44070] Fix | Delete
}
[44071] Fix | Delete
}
[44072] Fix | Delete
class TextMeasure {
[44073] Fix | Delete
constructor(defaultXfaFont, defaultParaMargin, defaultLineHeight, fonts) {
[44074] Fix | Delete
this.glyphs = [];
[44075] Fix | Delete
this.fontSelector = new FontSelector(defaultXfaFont, defaultParaMargin, defaultLineHeight, fonts);
[44076] Fix | Delete
this.extraHeight = 0;
[44077] Fix | Delete
}
[44078] Fix | Delete
pushData(xfaFont, margin, lineHeight) {
[44079] Fix | Delete
this.fontSelector.pushData(xfaFont, margin, lineHeight);
[44080] Fix | Delete
}
[44081] Fix | Delete
popFont(xfaFont) {
[44082] Fix | Delete
return this.fontSelector.popFont();
[44083] Fix | Delete
}
[44084] Fix | Delete
addPara() {
[44085] Fix | Delete
const lastFont = this.fontSelector.topFont();
[44086] Fix | Delete
this.extraHeight += lastFont.paraMargin.top + lastFont.paraMargin.bottom;
[44087] Fix | Delete
}
[44088] Fix | Delete
addString(str) {
[44089] Fix | Delete
if (!str) {
[44090] Fix | Delete
return;
[44091] Fix | Delete
}
[44092] Fix | Delete
const lastFont = this.fontSelector.topFont();
[44093] Fix | Delete
const fontSize = lastFont.xfaFont.size;
[44094] Fix | Delete
if (lastFont.pdfFont) {
[44095] Fix | Delete
const letterSpacing = lastFont.xfaFont.letterSpacing;
[44096] Fix | Delete
const pdfFont = lastFont.pdfFont;
[44097] Fix | Delete
const fontLineHeight = pdfFont.lineHeight || 1.2;
[44098] Fix | Delete
const lineHeight = lastFont.lineHeight || Math.max(1.2, fontLineHeight) * fontSize;
[44099] Fix | Delete
const lineGap = pdfFont.lineGap === undefined ? 0.2 : pdfFont.lineGap;
[44100] Fix | Delete
const noGap = fontLineHeight - lineGap;
[44101] Fix | Delete
const firstLineHeight = Math.max(1, noGap) * fontSize;
[44102] Fix | Delete
const scale = fontSize / 1000;
[44103] Fix | Delete
const fallbackWidth = pdfFont.defaultWidth || pdfFont.charsToGlyphs(" ")[0].width;
[44104] Fix | Delete
for (const line of str.split(/[\u2029\n]/)) {
[44105] Fix | Delete
const encodedLine = pdfFont.encodeString(line).join("");
[44106] Fix | Delete
const glyphs = pdfFont.charsToGlyphs(encodedLine);
[44107] Fix | Delete
for (const glyph of glyphs) {
[44108] Fix | Delete
const width = glyph.width || fallbackWidth;
[44109] Fix | Delete
this.glyphs.push([width * scale + letterSpacing, lineHeight, firstLineHeight, glyph.unicode, false]);
[44110] Fix | Delete
}
[44111] Fix | Delete
this.glyphs.push([0, 0, 0, "\n", true]);
[44112] Fix | Delete
}
[44113] Fix | Delete
this.glyphs.pop();
[44114] Fix | Delete
return;
[44115] Fix | Delete
}
[44116] Fix | Delete
for (const line of str.split(/[\u2029\n]/)) {
[44117] Fix | Delete
for (const char of line.split("")) {
[44118] Fix | Delete
this.glyphs.push([fontSize, 1.2 * fontSize, fontSize, char, false]);
[44119] Fix | Delete
}
[44120] Fix | Delete
this.glyphs.push([0, 0, 0, "\n", true]);
[44121] Fix | Delete
}
[44122] Fix | Delete
this.glyphs.pop();
[44123] Fix | Delete
}
[44124] Fix | Delete
compute(maxWidth) {
[44125] Fix | Delete
let lastSpacePos = -1,
[44126] Fix | Delete
lastSpaceWidth = 0,
[44127] Fix | Delete
width = 0,
[44128] Fix | Delete
height = 0,
[44129] Fix | Delete
currentLineWidth = 0,
[44130] Fix | Delete
currentLineHeight = 0;
[44131] Fix | Delete
let isBroken = false;
[44132] Fix | Delete
let isFirstLine = true;
[44133] Fix | Delete
for (let i = 0, ii = this.glyphs.length; i < ii; i++) {
[44134] Fix | Delete
const [glyphWidth, lineHeight, firstLineHeight, char, isEOL] = this.glyphs[i];
[44135] Fix | Delete
const isSpace = char === " ";
[44136] Fix | Delete
const glyphHeight = isFirstLine ? firstLineHeight : lineHeight;
[44137] Fix | Delete
if (isEOL) {
[44138] Fix | Delete
width = Math.max(width, currentLineWidth);
[44139] Fix | Delete
currentLineWidth = 0;
[44140] Fix | Delete
height += currentLineHeight;
[44141] Fix | Delete
currentLineHeight = glyphHeight;
[44142] Fix | Delete
lastSpacePos = -1;
[44143] Fix | Delete
lastSpaceWidth = 0;
[44144] Fix | Delete
isFirstLine = false;
[44145] Fix | Delete
continue;
[44146] Fix | Delete
}
[44147] Fix | Delete
if (isSpace) {
[44148] Fix | Delete
if (currentLineWidth + glyphWidth > maxWidth) {
[44149] Fix | Delete
width = Math.max(width, currentLineWidth);
[44150] Fix | Delete
currentLineWidth = 0;
[44151] Fix | Delete
height += currentLineHeight;
[44152] Fix | Delete
currentLineHeight = glyphHeight;
[44153] Fix | Delete
lastSpacePos = -1;
[44154] Fix | Delete
lastSpaceWidth = 0;
[44155] Fix | Delete
isBroken = true;
[44156] Fix | Delete
isFirstLine = false;
[44157] Fix | Delete
} else {
[44158] Fix | Delete
currentLineHeight = Math.max(glyphHeight, currentLineHeight);
[44159] Fix | Delete
lastSpaceWidth = currentLineWidth;
[44160] Fix | Delete
currentLineWidth += glyphWidth;
[44161] Fix | Delete
lastSpacePos = i;
[44162] Fix | Delete
}
[44163] Fix | Delete
continue;
[44164] Fix | Delete
}
[44165] Fix | Delete
if (currentLineWidth + glyphWidth > maxWidth) {
[44166] Fix | Delete
height += currentLineHeight;
[44167] Fix | Delete
currentLineHeight = glyphHeight;
[44168] Fix | Delete
if (lastSpacePos !== -1) {
[44169] Fix | Delete
i = lastSpacePos;
[44170] Fix | Delete
width = Math.max(width, lastSpaceWidth);
[44171] Fix | Delete
currentLineWidth = 0;
[44172] Fix | Delete
lastSpacePos = -1;
[44173] Fix | Delete
lastSpaceWidth = 0;
[44174] Fix | Delete
} else {
[44175] Fix | Delete
width = Math.max(width, currentLineWidth);
[44176] Fix | Delete
currentLineWidth = glyphWidth;
[44177] Fix | Delete
}
[44178] Fix | Delete
isBroken = true;
[44179] Fix | Delete
isFirstLine = false;
[44180] Fix | Delete
continue;
[44181] Fix | Delete
}
[44182] Fix | Delete
currentLineWidth += glyphWidth;
[44183] Fix | Delete
currentLineHeight = Math.max(glyphHeight, currentLineHeight);
[44184] Fix | Delete
}
[44185] Fix | Delete
width = Math.max(width, currentLineWidth);
[44186] Fix | Delete
height += currentLineHeight + this.extraHeight;
[44187] Fix | Delete
return {
[44188] Fix | Delete
width: WIDTH_FACTOR * width,
[44189] Fix | Delete
height,
[44190] Fix | Delete
isBroken
[44191] Fix | Delete
};
[44192] Fix | Delete
}
[44193] Fix | Delete
}
[44194] Fix | Delete
[44195] Fix | Delete
;// CONCATENATED MODULE: ./src/core/xfa/som.js
[44196] Fix | Delete
[44197] Fix | Delete
[44198] Fix | Delete
[44199] Fix | Delete
[44200] Fix | Delete
[44201] Fix | Delete
[44202] Fix | Delete
const namePattern = /^[^.[]+/;
[44203] Fix | Delete
const indexPattern = /^[^\]]+/;
[44204] Fix | Delete
const operators = {
[44205] Fix | Delete
dot: 0,
[44206] Fix | Delete
dotDot: 1,
[44207] Fix | Delete
dotHash: 2,
[44208] Fix | Delete
dotBracket: 3,
[44209] Fix | Delete
dotParen: 4
[44210] Fix | Delete
};
[44211] Fix | Delete
const shortcuts = new Map([["$data", (root, current) => root.datasets ? root.datasets.data : root], ["$record", (root, current) => (root.datasets ? root.datasets.data : root)[$getChildren]()[0]], ["$template", (root, current) => root.template], ["$connectionSet", (root, current) => root.connectionSet], ["$form", (root, current) => root.form], ["$layout", (root, current) => root.layout], ["$host", (root, current) => root.host], ["$dataWindow", (root, current) => root.dataWindow], ["$event", (root, current) => root.event], ["!", (root, current) => root.datasets], ["$xfa", (root, current) => root], ["xfa", (root, current) => root], ["$", (root, current) => current]]);
[44212] Fix | Delete
const somCache = new WeakMap();
[44213] Fix | Delete
function parseIndex(index) {
[44214] Fix | Delete
index = index.trim();
[44215] Fix | Delete
if (index === "*") {
[44216] Fix | Delete
return Infinity;
[44217] Fix | Delete
}
[44218] Fix | Delete
return parseInt(index, 10) || 0;
[44219] Fix | Delete
}
[44220] Fix | Delete
function parseExpression(expr, dotDotAllowed, noExpr = true) {
[44221] Fix | Delete
let match = expr.match(namePattern);
[44222] Fix | Delete
if (!match) {
[44223] Fix | Delete
return null;
[44224] Fix | Delete
}
[44225] Fix | Delete
let [name] = match;
[44226] Fix | Delete
const parsed = [{
[44227] Fix | Delete
name,
[44228] Fix | Delete
cacheName: "." + name,
[44229] Fix | Delete
index: 0,
[44230] Fix | Delete
js: null,
[44231] Fix | Delete
formCalc: null,
[44232] Fix | Delete
operator: operators.dot
[44233] Fix | Delete
}];
[44234] Fix | Delete
let pos = name.length;
[44235] Fix | Delete
while (pos < expr.length) {
[44236] Fix | Delete
const spos = pos;
[44237] Fix | Delete
const char = expr.charAt(pos++);
[44238] Fix | Delete
if (char === "[") {
[44239] Fix | Delete
match = expr.slice(pos).match(indexPattern);
[44240] Fix | Delete
if (!match) {
[44241] Fix | Delete
warn("XFA - Invalid index in SOM expression");
[44242] Fix | Delete
return null;
[44243] Fix | Delete
}
[44244] Fix | Delete
parsed.at(-1).index = parseIndex(match[0]);
[44245] Fix | Delete
pos += match[0].length + 1;
[44246] Fix | Delete
continue;
[44247] Fix | Delete
}
[44248] Fix | Delete
let operator;
[44249] Fix | Delete
switch (expr.charAt(pos)) {
[44250] Fix | Delete
case ".":
[44251] Fix | Delete
if (!dotDotAllowed) {
[44252] Fix | Delete
return null;
[44253] Fix | Delete
}
[44254] Fix | Delete
pos++;
[44255] Fix | Delete
operator = operators.dotDot;
[44256] Fix | Delete
break;
[44257] Fix | Delete
case "#":
[44258] Fix | Delete
pos++;
[44259] Fix | Delete
operator = operators.dotHash;
[44260] Fix | Delete
break;
[44261] Fix | Delete
case "[":
[44262] Fix | Delete
if (noExpr) {
[44263] Fix | Delete
warn("XFA - SOM expression contains a FormCalc subexpression which is not supported for now.");
[44264] Fix | Delete
return null;
[44265] Fix | Delete
}
[44266] Fix | Delete
operator = operators.dotBracket;
[44267] Fix | Delete
break;
[44268] Fix | Delete
case "(":
[44269] Fix | Delete
if (noExpr) {
[44270] Fix | Delete
warn("XFA - SOM expression contains a JavaScript subexpression which is not supported for now.");
[44271] Fix | Delete
return null;
[44272] Fix | Delete
}
[44273] Fix | Delete
operator = operators.dotParen;
[44274] Fix | Delete
break;
[44275] Fix | Delete
default:
[44276] Fix | Delete
operator = operators.dot;
[44277] Fix | Delete
break;
[44278] Fix | Delete
}
[44279] Fix | Delete
match = expr.slice(pos).match(namePattern);
[44280] Fix | Delete
if (!match) {
[44281] Fix | Delete
break;
[44282] Fix | Delete
}
[44283] Fix | Delete
[name] = match;
[44284] Fix | Delete
pos += name.length;
[44285] Fix | Delete
parsed.push({
[44286] Fix | Delete
name,
[44287] Fix | Delete
cacheName: expr.slice(spos, pos),
[44288] Fix | Delete
operator,
[44289] Fix | Delete
index: 0,
[44290] Fix | Delete
js: null,
[44291] Fix | Delete
formCalc: null
[44292] Fix | Delete
});
[44293] Fix | Delete
}
[44294] Fix | Delete
return parsed;
[44295] Fix | Delete
}
[44296] Fix | Delete
function searchNode(root, container, expr, dotDotAllowed = true, useCache = true) {
[44297] Fix | Delete
const parsed = parseExpression(expr, dotDotAllowed);
[44298] Fix | Delete
if (!parsed) {
[44299] Fix | Delete
return null;
[44300] Fix | Delete
}
[44301] Fix | Delete
const fn = shortcuts.get(parsed[0].name);
[44302] Fix | Delete
let i = 0;
[44303] Fix | Delete
let isQualified;
[44304] Fix | Delete
if (fn) {
[44305] Fix | Delete
isQualified = true;
[44306] Fix | Delete
root = [fn(root, container)];
[44307] Fix | Delete
i = 1;
[44308] Fix | Delete
} else {
[44309] Fix | Delete
isQualified = container === null;
[44310] Fix | Delete
root = [container || root];
[44311] Fix | Delete
}
[44312] Fix | Delete
for (let ii = parsed.length; i < ii; i++) {
[44313] Fix | Delete
const {
[44314] Fix | Delete
name,
[44315] Fix | Delete
cacheName,
[44316] Fix | Delete
operator,
[44317] Fix | Delete
index
[44318] Fix | Delete
} = parsed[i];
[44319] Fix | Delete
const nodes = [];
[44320] Fix | Delete
for (const node of root) {
[44321] Fix | Delete
if (!node.isXFAObject) {
[44322] Fix | Delete
continue;
[44323] Fix | Delete
}
[44324] Fix | Delete
let children, cached;
[44325] Fix | Delete
if (useCache) {
[44326] Fix | Delete
cached = somCache.get(node);
[44327] Fix | Delete
if (!cached) {
[44328] Fix | Delete
cached = new Map();
[44329] Fix | Delete
somCache.set(node, cached);
[44330] Fix | Delete
}
[44331] Fix | Delete
children = cached.get(cacheName);
[44332] Fix | Delete
}
[44333] Fix | Delete
if (!children) {
[44334] Fix | Delete
switch (operator) {
[44335] Fix | Delete
case operators.dot:
[44336] Fix | Delete
children = node[$getChildrenByName](name, false);
[44337] Fix | Delete
break;
[44338] Fix | Delete
case operators.dotDot:
[44339] Fix | Delete
children = node[$getChildrenByName](name, true);
[44340] Fix | Delete
break;
[44341] Fix | Delete
case operators.dotHash:
[44342] Fix | Delete
children = node[$getChildrenByClass](name);
[44343] Fix | Delete
children = children.isXFAObjectArray ? children.children : [children];
[44344] Fix | Delete
break;
[44345] Fix | Delete
default:
[44346] Fix | Delete
break;
[44347] Fix | Delete
}
[44348] Fix | Delete
if (useCache) {
[44349] Fix | Delete
cached.set(cacheName, children);
[44350] Fix | Delete
}
[44351] Fix | Delete
}
[44352] Fix | Delete
if (children.length > 0) {
[44353] Fix | Delete
nodes.push(children);
[44354] Fix | Delete
}
[44355] Fix | Delete
}
[44356] Fix | Delete
if (nodes.length === 0 && !isQualified && i === 0) {
[44357] Fix | Delete
const parent = container[$getParent]();
[44358] Fix | Delete
container = parent;
[44359] Fix | Delete
if (!container) {
[44360] Fix | Delete
return null;
[44361] Fix | Delete
}
[44362] Fix | Delete
i = -1;
[44363] Fix | Delete
root = [container];
[44364] Fix | Delete
continue;
[44365] Fix | Delete
}
[44366] Fix | Delete
root = isFinite(index) ? nodes.filter(node => index < node.length).map(node => node[index]) : nodes.flat();
[44367] Fix | Delete
}
[44368] Fix | Delete
if (root.length === 0) {
[44369] Fix | Delete
return null;
[44370] Fix | Delete
}
[44371] Fix | Delete
return root;
[44372] Fix | Delete
}
[44373] Fix | Delete
function createDataNode(root, container, expr) {
[44374] Fix | Delete
const parsed = parseExpression(expr);
[44375] Fix | Delete
if (!parsed) {
[44376] Fix | Delete
return null;
[44377] Fix | Delete
}
[44378] Fix | Delete
if (parsed.some(x => x.operator === operators.dotDot)) {
[44379] Fix | Delete
return null;
[44380] Fix | Delete
}
[44381] Fix | Delete
const fn = shortcuts.get(parsed[0].name);
[44382] Fix | Delete
let i = 0;
[44383] Fix | Delete
if (fn) {
[44384] Fix | Delete
root = fn(root, container);
[44385] Fix | Delete
i = 1;
[44386] Fix | Delete
} else {
[44387] Fix | Delete
root = container || root;
[44388] Fix | Delete
}
[44389] Fix | Delete
for (let ii = parsed.length; i < ii; i++) {
[44390] Fix | Delete
const {
[44391] Fix | Delete
name,
[44392] Fix | Delete
operator,
[44393] Fix | Delete
index
[44394] Fix | Delete
} = parsed[i];
[44395] Fix | Delete
if (!isFinite(index)) {
[44396] Fix | Delete
parsed[i].index = 0;
[44397] Fix | Delete
return root.createNodes(parsed.slice(i));
[44398] Fix | Delete
}
[44399] Fix | Delete
let children;
[44400] Fix | Delete
switch (operator) {
[44401] Fix | Delete
case operators.dot:
[44402] Fix | Delete
children = root[$getChildrenByName](name, false);
[44403] Fix | Delete
break;
[44404] Fix | Delete
case operators.dotDot:
[44405] Fix | Delete
children = root[$getChildrenByName](name, true);
[44406] Fix | Delete
break;
[44407] Fix | Delete
case operators.dotHash:
[44408] Fix | Delete
children = root[$getChildrenByClass](name);
[44409] Fix | Delete
children = children.isXFAObjectArray ? children.children : [children];
[44410] Fix | Delete
break;
[44411] Fix | Delete
default:
[44412] Fix | Delete
break;
[44413] Fix | Delete
}
[44414] Fix | Delete
if (children.length === 0) {
[44415] Fix | Delete
return root.createNodes(parsed.slice(i));
[44416] Fix | Delete
}
[44417] Fix | Delete
if (index < children.length) {
[44418] Fix | Delete
const child = children[index];
[44419] Fix | Delete
if (!child.isXFAObject) {
[44420] Fix | Delete
warn(`XFA - Cannot create a node.`);
[44421] Fix | Delete
return null;
[44422] Fix | Delete
}
[44423] Fix | Delete
root = child;
[44424] Fix | Delete
} else {
[44425] Fix | Delete
parsed[i].index = index - children.length;
[44426] Fix | Delete
return root.createNodes(parsed.slice(i));
[44427] Fix | Delete
}
[44428] Fix | Delete
}
[44429] Fix | Delete
return null;
[44430] Fix | Delete
}
[44431] Fix | Delete
[44432] Fix | Delete
;// CONCATENATED MODULE: ./src/core/xfa/xfa_object.js
[44433] Fix | Delete
[44434] Fix | Delete
[44435] Fix | Delete
[44436] Fix | Delete
[44437] Fix | Delete
[44438] Fix | Delete
[44439] Fix | Delete
[44440] Fix | Delete
[44441] Fix | Delete
[44442] Fix | Delete
[44443] Fix | Delete
[44444] Fix | Delete
[44445] Fix | Delete
[44446] Fix | Delete
[44447] Fix | Delete
[44448] Fix | Delete
[44449] Fix | Delete
[44450] Fix | Delete
const _applyPrototype = Symbol();
[44451] Fix | Delete
const _attributes = Symbol();
[44452] Fix | Delete
const _attributeNames = Symbol();
[44453] Fix | Delete
const _children = Symbol("_children");
[44454] Fix | Delete
const _cloneAttribute = Symbol();
[44455] Fix | Delete
const _dataValue = Symbol();
[44456] Fix | Delete
const _defaultValue = Symbol();
[44457] Fix | Delete
const _filteredChildrenGenerator = Symbol();
[44458] Fix | Delete
const _getPrototype = Symbol();
[44459] Fix | Delete
const _getUnsetAttributes = Symbol();
[44460] Fix | Delete
const _hasChildren = Symbol();
[44461] Fix | Delete
const _max = Symbol();
[44462] Fix | Delete
const _options = Symbol();
[44463] Fix | Delete
const _parent = Symbol("parent");
[44464] Fix | Delete
const _resolvePrototypesHelper = Symbol();
[44465] Fix | Delete
const _setAttributes = Symbol();
[44466] Fix | Delete
const _validator = Symbol();
[44467] Fix | Delete
let uid = 0;
[44468] Fix | Delete
const NS_DATASETS = NamespaceIds.datasets.id;
[44469] Fix | Delete
class XFAObject {
[44470] Fix | Delete
constructor(nsId, name, hasChildren = false) {
[44471] Fix | Delete
this[$namespaceId] = nsId;
[44472] Fix | Delete
this[$nodeName] = name;
[44473] Fix | Delete
this[_hasChildren] = hasChildren;
[44474] Fix | Delete
this[_parent] = null;
[44475] Fix | Delete
this[_children] = [];
[44476] Fix | Delete
this[$uid] = `${name}${uid++}`;
[44477] Fix | Delete
this[$globalData] = null;
[44478] Fix | Delete
}
[44479] Fix | Delete
get isXFAObject() {
[44480] Fix | Delete
return true;
[44481] Fix | Delete
}
[44482] Fix | Delete
get isXFAObjectArray() {
[44483] Fix | Delete
return false;
[44484] Fix | Delete
}
[44485] Fix | Delete
createNodes(path) {
[44486] Fix | Delete
let root = this,
[44487] Fix | Delete
node = null;
[44488] Fix | Delete
for (const {
[44489] Fix | Delete
name,
[44490] Fix | Delete
index
[44491] Fix | Delete
} of path) {
[44492] Fix | Delete
for (let i = 0, ii = isFinite(index) ? index : 0; i <= ii; i++) {
[44493] Fix | Delete
const nsId = root[$namespaceId] === NS_DATASETS ? -1 : root[$namespaceId];
[44494] Fix | Delete
node = new XmlObject(nsId, name);
[44495] Fix | Delete
root[$appendChild](node);
[44496] Fix | Delete
}
[44497] Fix | Delete
root = node;
[44498] Fix | Delete
}
[44499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function