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/web
File: viewer.js
}
[6500] Fix | Delete
}
[6501] Fix | Delete
[Symbol.asyncIterator]() {
[6502] Fix | Delete
const cached = this;
[6503] Fix | Delete
let cur = 0;
[6504] Fix | Delete
return {
[6505] Fix | Delete
async next() {
[6506] Fix | Delete
if (cached.length <= cur) {
[6507] Fix | Delete
cached.push(cached.iterator.next());
[6508] Fix | Delete
}
[6509] Fix | Delete
return cached[cur++];
[6510] Fix | Delete
}
[6511] Fix | Delete
};
[6512] Fix | Delete
}
[6513] Fix | Delete
async touchNext(count = 1) {
[6514] Fix | Delete
let idx = 0;
[6515] Fix | Delete
while (idx++ < count) {
[6516] Fix | Delete
const last = this[this.length - 1];
[6517] Fix | Delete
if (last && (await last).done) {
[6518] Fix | Delete
break;
[6519] Fix | Delete
}
[6520] Fix | Delete
this.push(this.iterator.next());
[6521] Fix | Delete
}
[6522] Fix | Delete
return this[this.length - 1];
[6523] Fix | Delete
}
[6524] Fix | Delete
}
[6525] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/cached-iterable/src/index.js
[6526] Fix | Delete
[6527] Fix | Delete
[6528] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@fluent/dom/esm/localization.js
[6529] Fix | Delete
[6530] Fix | Delete
[6531] Fix | Delete
[6532] Fix | Delete
[6533] Fix | Delete
[6534] Fix | Delete
[6535] Fix | Delete
[6536] Fix | Delete
[6537] Fix | Delete
[6538] Fix | Delete
[6539] Fix | Delete
[6540] Fix | Delete
[6541] Fix | Delete
class Localization {
[6542] Fix | Delete
constructor(resourceIds = [], generateBundles) {
[6543] Fix | Delete
this.resourceIds = resourceIds;
[6544] Fix | Delete
this.generateBundles = generateBundles;
[6545] Fix | Delete
this.onChange(true);
[6546] Fix | Delete
}
[6547] Fix | Delete
addResourceIds(resourceIds, eager = false) {
[6548] Fix | Delete
this.resourceIds.push(...resourceIds);
[6549] Fix | Delete
this.onChange(eager);
[6550] Fix | Delete
return this.resourceIds.length;
[6551] Fix | Delete
}
[6552] Fix | Delete
removeResourceIds(resourceIds) {
[6553] Fix | Delete
this.resourceIds = this.resourceIds.filter(r => !resourceIds.includes(r));
[6554] Fix | Delete
this.onChange();
[6555] Fix | Delete
return this.resourceIds.length;
[6556] Fix | Delete
}
[6557] Fix | Delete
async formatWithFallback(keys, method) {
[6558] Fix | Delete
const translations = [];
[6559] Fix | Delete
let hasAtLeastOneBundle = false;
[6560] Fix | Delete
for await (const bundle of this.bundles) {
[6561] Fix | Delete
hasAtLeastOneBundle = true;
[6562] Fix | Delete
const missingIds = keysFromBundle(method, bundle, keys, translations);
[6563] Fix | Delete
if (missingIds.size === 0) {
[6564] Fix | Delete
break;
[6565] Fix | Delete
}
[6566] Fix | Delete
if (typeof console !== "undefined") {
[6567] Fix | Delete
const locale = bundle.locales[0];
[6568] Fix | Delete
const ids = Array.from(missingIds).join(", ");
[6569] Fix | Delete
console.warn(`[fluent] Missing translations in ${locale}: ${ids}`);
[6570] Fix | Delete
}
[6571] Fix | Delete
}
[6572] Fix | Delete
if (!hasAtLeastOneBundle && typeof console !== "undefined") {
[6573] Fix | Delete
console.warn(`[fluent] Request for keys failed because no resource bundles got generated.
[6574] Fix | Delete
keys: ${JSON.stringify(keys)}.
[6575] Fix | Delete
resourceIds: ${JSON.stringify(this.resourceIds)}.`);
[6576] Fix | Delete
}
[6577] Fix | Delete
return translations;
[6578] Fix | Delete
}
[6579] Fix | Delete
formatMessages(keys) {
[6580] Fix | Delete
return this.formatWithFallback(keys, messageFromBundle);
[6581] Fix | Delete
}
[6582] Fix | Delete
formatValues(keys) {
[6583] Fix | Delete
return this.formatWithFallback(keys, valueFromBundle);
[6584] Fix | Delete
}
[6585] Fix | Delete
async formatValue(id, args) {
[6586] Fix | Delete
const [val] = await this.formatValues([{
[6587] Fix | Delete
id,
[6588] Fix | Delete
args
[6589] Fix | Delete
}]);
[6590] Fix | Delete
return val;
[6591] Fix | Delete
}
[6592] Fix | Delete
handleEvent() {
[6593] Fix | Delete
this.onChange();
[6594] Fix | Delete
}
[6595] Fix | Delete
onChange(eager = false) {
[6596] Fix | Delete
this.bundles = CachedAsyncIterable.from(this.generateBundles(this.resourceIds));
[6597] Fix | Delete
if (eager) {
[6598] Fix | Delete
this.bundles.touchNext(2);
[6599] Fix | Delete
}
[6600] Fix | Delete
}
[6601] Fix | Delete
}
[6602] Fix | Delete
function valueFromBundle(bundle, errors, message, args) {
[6603] Fix | Delete
if (message.value) {
[6604] Fix | Delete
return bundle.formatPattern(message.value, args, errors);
[6605] Fix | Delete
}
[6606] Fix | Delete
return null;
[6607] Fix | Delete
}
[6608] Fix | Delete
function messageFromBundle(bundle, errors, message, args) {
[6609] Fix | Delete
const formatted = {
[6610] Fix | Delete
value: null,
[6611] Fix | Delete
attributes: null
[6612] Fix | Delete
};
[6613] Fix | Delete
if (message.value) {
[6614] Fix | Delete
formatted.value = bundle.formatPattern(message.value, args, errors);
[6615] Fix | Delete
}
[6616] Fix | Delete
let attrNames = Object.keys(message.attributes);
[6617] Fix | Delete
if (attrNames.length > 0) {
[6618] Fix | Delete
formatted.attributes = new Array(attrNames.length);
[6619] Fix | Delete
for (let [i, name] of attrNames.entries()) {
[6620] Fix | Delete
let value = bundle.formatPattern(message.attributes[name], args, errors);
[6621] Fix | Delete
formatted.attributes[i] = {
[6622] Fix | Delete
name,
[6623] Fix | Delete
value
[6624] Fix | Delete
};
[6625] Fix | Delete
}
[6626] Fix | Delete
}
[6627] Fix | Delete
return formatted;
[6628] Fix | Delete
}
[6629] Fix | Delete
function keysFromBundle(method, bundle, keys, translations) {
[6630] Fix | Delete
const messageErrors = [];
[6631] Fix | Delete
const missingIds = new Set();
[6632] Fix | Delete
keys.forEach(({
[6633] Fix | Delete
id,
[6634] Fix | Delete
args
[6635] Fix | Delete
}, i) => {
[6636] Fix | Delete
if (translations[i] !== undefined) {
[6637] Fix | Delete
return;
[6638] Fix | Delete
}
[6639] Fix | Delete
let message = bundle.getMessage(id);
[6640] Fix | Delete
if (message) {
[6641] Fix | Delete
messageErrors.length = 0;
[6642] Fix | Delete
translations[i] = method(bundle, messageErrors, message, args);
[6643] Fix | Delete
if (messageErrors.length > 0 && typeof console !== "undefined") {
[6644] Fix | Delete
const locale = bundle.locales[0];
[6645] Fix | Delete
const errors = messageErrors.join(", ");
[6646] Fix | Delete
console.warn(`[fluent][resolver] errors in ${locale}/${id}: ${errors}.`);
[6647] Fix | Delete
}
[6648] Fix | Delete
} else {
[6649] Fix | Delete
missingIds.add(id);
[6650] Fix | Delete
}
[6651] Fix | Delete
});
[6652] Fix | Delete
return missingIds;
[6653] Fix | Delete
}
[6654] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@fluent/dom/esm/dom_localization.js
[6655] Fix | Delete
[6656] Fix | Delete
[6657] Fix | Delete
[6658] Fix | Delete
[6659] Fix | Delete
[6660] Fix | Delete
[6661] Fix | Delete
[6662] Fix | Delete
[6663] Fix | Delete
[6664] Fix | Delete
[6665] Fix | Delete
[6666] Fix | Delete
[6667] Fix | Delete
const L10NID_ATTR_NAME = "data-l10n-id";
[6668] Fix | Delete
const L10NARGS_ATTR_NAME = "data-l10n-args";
[6669] Fix | Delete
const L10N_ELEMENT_QUERY = `[${L10NID_ATTR_NAME}]`;
[6670] Fix | Delete
class DOMLocalization extends Localization {
[6671] Fix | Delete
constructor(resourceIds, generateBundles) {
[6672] Fix | Delete
super(resourceIds, generateBundles);
[6673] Fix | Delete
this.roots = new Set();
[6674] Fix | Delete
this.pendingrAF = null;
[6675] Fix | Delete
this.pendingElements = new Set();
[6676] Fix | Delete
this.windowElement = null;
[6677] Fix | Delete
this.mutationObserver = null;
[6678] Fix | Delete
this.observerConfig = {
[6679] Fix | Delete
attributes: true,
[6680] Fix | Delete
characterData: false,
[6681] Fix | Delete
childList: true,
[6682] Fix | Delete
subtree: true,
[6683] Fix | Delete
attributeFilter: [L10NID_ATTR_NAME, L10NARGS_ATTR_NAME]
[6684] Fix | Delete
};
[6685] Fix | Delete
}
[6686] Fix | Delete
onChange(eager = false) {
[6687] Fix | Delete
super.onChange(eager);
[6688] Fix | Delete
if (this.roots) {
[6689] Fix | Delete
this.translateRoots();
[6690] Fix | Delete
}
[6691] Fix | Delete
}
[6692] Fix | Delete
setAttributes(element, id, args) {
[6693] Fix | Delete
element.setAttribute(L10NID_ATTR_NAME, id);
[6694] Fix | Delete
if (args) {
[6695] Fix | Delete
element.setAttribute(L10NARGS_ATTR_NAME, JSON.stringify(args));
[6696] Fix | Delete
} else {
[6697] Fix | Delete
element.removeAttribute(L10NARGS_ATTR_NAME);
[6698] Fix | Delete
}
[6699] Fix | Delete
return element;
[6700] Fix | Delete
}
[6701] Fix | Delete
getAttributes(element) {
[6702] Fix | Delete
return {
[6703] Fix | Delete
id: element.getAttribute(L10NID_ATTR_NAME),
[6704] Fix | Delete
args: JSON.parse(element.getAttribute(L10NARGS_ATTR_NAME) || null)
[6705] Fix | Delete
};
[6706] Fix | Delete
}
[6707] Fix | Delete
connectRoot(newRoot) {
[6708] Fix | Delete
for (const root of this.roots) {
[6709] Fix | Delete
if (root === newRoot || root.contains(newRoot) || newRoot.contains(root)) {
[6710] Fix | Delete
throw new Error("Cannot add a root that overlaps with existing root.");
[6711] Fix | Delete
}
[6712] Fix | Delete
}
[6713] Fix | Delete
if (this.windowElement) {
[6714] Fix | Delete
if (this.windowElement !== newRoot.ownerDocument.defaultView) {
[6715] Fix | Delete
throw new Error(`Cannot connect a root:
[6716] Fix | Delete
DOMLocalization already has a root from a different window.`);
[6717] Fix | Delete
}
[6718] Fix | Delete
} else {
[6719] Fix | Delete
this.windowElement = newRoot.ownerDocument.defaultView;
[6720] Fix | Delete
this.mutationObserver = new this.windowElement.MutationObserver(mutations => this.translateMutations(mutations));
[6721] Fix | Delete
}
[6722] Fix | Delete
this.roots.add(newRoot);
[6723] Fix | Delete
this.mutationObserver.observe(newRoot, this.observerConfig);
[6724] Fix | Delete
}
[6725] Fix | Delete
disconnectRoot(root) {
[6726] Fix | Delete
this.roots.delete(root);
[6727] Fix | Delete
this.pauseObserving();
[6728] Fix | Delete
if (this.roots.size === 0) {
[6729] Fix | Delete
this.mutationObserver = null;
[6730] Fix | Delete
this.windowElement = null;
[6731] Fix | Delete
this.pendingrAF = null;
[6732] Fix | Delete
this.pendingElements.clear();
[6733] Fix | Delete
return true;
[6734] Fix | Delete
}
[6735] Fix | Delete
this.resumeObserving();
[6736] Fix | Delete
return false;
[6737] Fix | Delete
}
[6738] Fix | Delete
translateRoots() {
[6739] Fix | Delete
const roots = Array.from(this.roots);
[6740] Fix | Delete
return Promise.all(roots.map(root => this.translateFragment(root)));
[6741] Fix | Delete
}
[6742] Fix | Delete
pauseObserving() {
[6743] Fix | Delete
if (!this.mutationObserver) {
[6744] Fix | Delete
return;
[6745] Fix | Delete
}
[6746] Fix | Delete
this.translateMutations(this.mutationObserver.takeRecords());
[6747] Fix | Delete
this.mutationObserver.disconnect();
[6748] Fix | Delete
}
[6749] Fix | Delete
resumeObserving() {
[6750] Fix | Delete
if (!this.mutationObserver) {
[6751] Fix | Delete
return;
[6752] Fix | Delete
}
[6753] Fix | Delete
for (const root of this.roots) {
[6754] Fix | Delete
this.mutationObserver.observe(root, this.observerConfig);
[6755] Fix | Delete
}
[6756] Fix | Delete
}
[6757] Fix | Delete
translateMutations(mutations) {
[6758] Fix | Delete
for (const mutation of mutations) {
[6759] Fix | Delete
switch (mutation.type) {
[6760] Fix | Delete
case "attributes":
[6761] Fix | Delete
if (mutation.target.hasAttribute("data-l10n-id")) {
[6762] Fix | Delete
this.pendingElements.add(mutation.target);
[6763] Fix | Delete
}
[6764] Fix | Delete
break;
[6765] Fix | Delete
case "childList":
[6766] Fix | Delete
for (const addedNode of mutation.addedNodes) {
[6767] Fix | Delete
if (addedNode.nodeType === addedNode.ELEMENT_NODE) {
[6768] Fix | Delete
if (addedNode.childElementCount) {
[6769] Fix | Delete
for (const element of this.getTranslatables(addedNode)) {
[6770] Fix | Delete
this.pendingElements.add(element);
[6771] Fix | Delete
}
[6772] Fix | Delete
} else if (addedNode.hasAttribute(L10NID_ATTR_NAME)) {
[6773] Fix | Delete
this.pendingElements.add(addedNode);
[6774] Fix | Delete
}
[6775] Fix | Delete
}
[6776] Fix | Delete
}
[6777] Fix | Delete
break;
[6778] Fix | Delete
}
[6779] Fix | Delete
}
[6780] Fix | Delete
if (this.pendingElements.size > 0) {
[6781] Fix | Delete
if (this.pendingrAF === null) {
[6782] Fix | Delete
this.pendingrAF = this.windowElement.requestAnimationFrame(() => {
[6783] Fix | Delete
this.translateElements(Array.from(this.pendingElements));
[6784] Fix | Delete
this.pendingElements.clear();
[6785] Fix | Delete
this.pendingrAF = null;
[6786] Fix | Delete
});
[6787] Fix | Delete
}
[6788] Fix | Delete
}
[6789] Fix | Delete
}
[6790] Fix | Delete
translateFragment(frag) {
[6791] Fix | Delete
return this.translateElements(this.getTranslatables(frag));
[6792] Fix | Delete
}
[6793] Fix | Delete
async translateElements(elements) {
[6794] Fix | Delete
if (!elements.length) {
[6795] Fix | Delete
return undefined;
[6796] Fix | Delete
}
[6797] Fix | Delete
const keys = elements.map(this.getKeysForElement);
[6798] Fix | Delete
const translations = await this.formatMessages(keys);
[6799] Fix | Delete
return this.applyTranslations(elements, translations);
[6800] Fix | Delete
}
[6801] Fix | Delete
applyTranslations(elements, translations) {
[6802] Fix | Delete
this.pauseObserving();
[6803] Fix | Delete
for (let i = 0; i < elements.length; i++) {
[6804] Fix | Delete
if (translations[i] !== undefined) {
[6805] Fix | Delete
translateElement(elements[i], translations[i]);
[6806] Fix | Delete
}
[6807] Fix | Delete
}
[6808] Fix | Delete
this.resumeObserving();
[6809] Fix | Delete
}
[6810] Fix | Delete
getTranslatables(element) {
[6811] Fix | Delete
const nodes = Array.from(element.querySelectorAll(L10N_ELEMENT_QUERY));
[6812] Fix | Delete
if (typeof element.hasAttribute === "function" && element.hasAttribute(L10NID_ATTR_NAME)) {
[6813] Fix | Delete
nodes.push(element);
[6814] Fix | Delete
}
[6815] Fix | Delete
return nodes;
[6816] Fix | Delete
}
[6817] Fix | Delete
getKeysForElement(element) {
[6818] Fix | Delete
return {
[6819] Fix | Delete
id: element.getAttribute(L10NID_ATTR_NAME),
[6820] Fix | Delete
args: JSON.parse(element.getAttribute(L10NARGS_ATTR_NAME) || null)
[6821] Fix | Delete
};
[6822] Fix | Delete
}
[6823] Fix | Delete
}
[6824] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@fluent/dom/esm/index.js
[6825] Fix | Delete
[6826] Fix | Delete
[6827] Fix | Delete
;// CONCATENATED MODULE: ./web/l10n.js
[6828] Fix | Delete
[6829] Fix | Delete
class L10n {
[6830] Fix | Delete
#dir;
[6831] Fix | Delete
#lang;
[6832] Fix | Delete
#l10n;
[6833] Fix | Delete
constructor({
[6834] Fix | Delete
lang,
[6835] Fix | Delete
isRTL
[6836] Fix | Delete
}, l10n = null) {
[6837] Fix | Delete
this.#lang = L10n.#fixupLangCode(lang);
[6838] Fix | Delete
this.#l10n = l10n;
[6839] Fix | Delete
this.#dir = isRTL ?? L10n.#isRTL(this.#lang) ? "rtl" : "ltr";
[6840] Fix | Delete
}
[6841] Fix | Delete
_setL10n(l10n) {
[6842] Fix | Delete
this.#l10n = l10n;
[6843] Fix | Delete
}
[6844] Fix | Delete
getLanguage() {
[6845] Fix | Delete
return this.#lang;
[6846] Fix | Delete
}
[6847] Fix | Delete
getDirection() {
[6848] Fix | Delete
return this.#dir;
[6849] Fix | Delete
}
[6850] Fix | Delete
async get(ids, args = null, fallback) {
[6851] Fix | Delete
if (Array.isArray(ids)) {
[6852] Fix | Delete
ids = ids.map(id => ({
[6853] Fix | Delete
id
[6854] Fix | Delete
}));
[6855] Fix | Delete
const messages = await this.#l10n.formatMessages(ids);
[6856] Fix | Delete
return messages.map(message => message.value);
[6857] Fix | Delete
}
[6858] Fix | Delete
const messages = await this.#l10n.formatMessages([{
[6859] Fix | Delete
id: ids,
[6860] Fix | Delete
args
[6861] Fix | Delete
}]);
[6862] Fix | Delete
return messages?.[0].value || fallback;
[6863] Fix | Delete
}
[6864] Fix | Delete
async translate(element) {
[6865] Fix | Delete
try {
[6866] Fix | Delete
this.#l10n.connectRoot(element);
[6867] Fix | Delete
await this.#l10n.translateRoots();
[6868] Fix | Delete
} catch {}
[6869] Fix | Delete
}
[6870] Fix | Delete
pause() {
[6871] Fix | Delete
this.#l10n.pauseObserving();
[6872] Fix | Delete
}
[6873] Fix | Delete
resume() {
[6874] Fix | Delete
this.#l10n.resumeObserving();
[6875] Fix | Delete
}
[6876] Fix | Delete
static #fixupLangCode(langCode) {
[6877] Fix | Delete
langCode = langCode?.toLowerCase() || "en-us";
[6878] Fix | Delete
const PARTIAL_LANG_CODES = {
[6879] Fix | Delete
en: "en-us",
[6880] Fix | Delete
es: "es-es",
[6881] Fix | Delete
fy: "fy-nl",
[6882] Fix | Delete
ga: "ga-ie",
[6883] Fix | Delete
gu: "gu-in",
[6884] Fix | Delete
hi: "hi-in",
[6885] Fix | Delete
hy: "hy-am",
[6886] Fix | Delete
nb: "nb-no",
[6887] Fix | Delete
ne: "ne-np",
[6888] Fix | Delete
nn: "nn-no",
[6889] Fix | Delete
pa: "pa-in",
[6890] Fix | Delete
pt: "pt-pt",
[6891] Fix | Delete
sv: "sv-se",
[6892] Fix | Delete
zh: "zh-cn"
[6893] Fix | Delete
};
[6894] Fix | Delete
return PARTIAL_LANG_CODES[langCode] || langCode;
[6895] Fix | Delete
}
[6896] Fix | Delete
static #isRTL(lang) {
[6897] Fix | Delete
const shortCode = lang.split("-", 1)[0];
[6898] Fix | Delete
return ["ar", "he", "fa", "ps", "ur"].includes(shortCode);
[6899] Fix | Delete
}
[6900] Fix | Delete
}
[6901] Fix | Delete
const GenericL10n = null;
[6902] Fix | Delete
[6903] Fix | Delete
;// CONCATENATED MODULE: ./web/genericl10n.js
[6904] Fix | Delete
[6905] Fix | Delete
[6906] Fix | Delete
[6907] Fix | Delete
[6908] Fix | Delete
[6909] Fix | Delete
[6910] Fix | Delete
[6911] Fix | Delete
[6912] Fix | Delete
function createBundle(lang, text) {
[6913] Fix | Delete
const resource = new FluentResource(text);
[6914] Fix | Delete
const bundle = new FluentBundle(lang);
[6915] Fix | Delete
const errors = bundle.addResource(resource);
[6916] Fix | Delete
if (errors.length) {
[6917] Fix | Delete
console.error("L10n errors", errors);
[6918] Fix | Delete
}
[6919] Fix | Delete
return bundle;
[6920] Fix | Delete
}
[6921] Fix | Delete
class genericl10n_GenericL10n extends L10n {
[6922] Fix | Delete
constructor(lang) {
[6923] Fix | Delete
super({
[6924] Fix | Delete
lang
[6925] Fix | Delete
});
[6926] Fix | Delete
const generateBundles = !lang ? genericl10n_GenericL10n.#generateBundlesFallback.bind(genericl10n_GenericL10n, this.getLanguage()) : genericl10n_GenericL10n.#generateBundles.bind(genericl10n_GenericL10n, "en-us", this.getLanguage());
[6927] Fix | Delete
this._setL10n(new DOMLocalization([], generateBundles));
[6928] Fix | Delete
}
[6929] Fix | Delete
static async *#generateBundles(defaultLang, baseLang) {
[6930] Fix | Delete
const {
[6931] Fix | Delete
baseURL,
[6932] Fix | Delete
paths
[6933] Fix | Delete
} = await this.#getPaths();
[6934] Fix | Delete
const langs = [baseLang];
[6935] Fix | Delete
if (defaultLang !== baseLang) {
[6936] Fix | Delete
const shortLang = baseLang.split("-", 1)[0];
[6937] Fix | Delete
if (shortLang !== baseLang) {
[6938] Fix | Delete
langs.push(shortLang);
[6939] Fix | Delete
}
[6940] Fix | Delete
langs.push(defaultLang);
[6941] Fix | Delete
}
[6942] Fix | Delete
for (const lang of langs) {
[6943] Fix | Delete
const bundle = await this.#createBundle(lang, baseURL, paths);
[6944] Fix | Delete
if (bundle) {
[6945] Fix | Delete
yield bundle;
[6946] Fix | Delete
}
[6947] Fix | Delete
if (lang === "en-us") {
[6948] Fix | Delete
yield this.#createBundleFallback(lang);
[6949] Fix | Delete
}
[6950] Fix | Delete
}
[6951] Fix | Delete
}
[6952] Fix | Delete
static async #createBundle(lang, baseURL, paths) {
[6953] Fix | Delete
const path = paths[lang];
[6954] Fix | Delete
if (!path) {
[6955] Fix | Delete
return null;
[6956] Fix | Delete
}
[6957] Fix | Delete
const url = new URL(path, baseURL);
[6958] Fix | Delete
const text = await fetchData(url, "text");
[6959] Fix | Delete
return createBundle(lang, text);
[6960] Fix | Delete
}
[6961] Fix | Delete
static async #getPaths() {
[6962] Fix | Delete
try {
[6963] Fix | Delete
const {
[6964] Fix | Delete
href
[6965] Fix | Delete
} = document.querySelector(`link[type="application/l10n"]`);
[6966] Fix | Delete
const paths = await fetchData(href, "json");
[6967] Fix | Delete
return {
[6968] Fix | Delete
baseURL: href.replace(/[^/]*$/, "") || "./",
[6969] Fix | Delete
paths
[6970] Fix | Delete
};
[6971] Fix | Delete
} catch {}
[6972] Fix | Delete
return {
[6973] Fix | Delete
baseURL: "./",
[6974] Fix | Delete
paths: Object.create(null)
[6975] Fix | Delete
};
[6976] Fix | Delete
}
[6977] Fix | Delete
static async *#generateBundlesFallback(lang) {
[6978] Fix | Delete
yield this.#createBundleFallback(lang);
[6979] Fix | Delete
}
[6980] Fix | Delete
static async #createBundleFallback(lang) {
[6981] Fix | Delete
const text = "pdfjs-previous-button =\n .title = Previous Page\npdfjs-previous-button-label = Previous\npdfjs-next-button =\n .title = Next Page\npdfjs-next-button-label = Next\npdfjs-page-input =\n .title = Page\npdfjs-of-pages = of { $pagesCount }\npdfjs-page-of-pages = ({ $pageNumber } of { $pagesCount })\npdfjs-zoom-out-button =\n .title = Zoom Out\npdfjs-zoom-out-button-label = Zoom Out\npdfjs-zoom-in-button =\n .title = Zoom In\npdfjs-zoom-in-button-label = Zoom In\npdfjs-zoom-select =\n .title = Zoom\npdfjs-presentation-mode-button =\n .title = Switch to Presentation Mode\npdfjs-presentation-mode-button-label = Presentation Mode\npdfjs-open-file-button =\n .title = Open File\npdfjs-open-file-button-label = Open\npdfjs-print-button =\n .title = Print\npdfjs-print-button-label = Print\npdfjs-save-button =\n .title = Save\npdfjs-save-button-label = Save\npdfjs-download-button =\n .title = Download\npdfjs-download-button-label = Download\npdfjs-bookmark-button =\n .title = Current Page (View URL from Current Page)\npdfjs-bookmark-button-label = Current Page\npdfjs-tools-button =\n .title = Tools\npdfjs-tools-button-label = Tools\npdfjs-first-page-button =\n .title = Go to First Page\npdfjs-first-page-button-label = Go to First Page\npdfjs-last-page-button =\n .title = Go to Last Page\npdfjs-last-page-button-label = Go to Last Page\npdfjs-page-rotate-cw-button =\n .title = Rotate Clockwise\npdfjs-page-rotate-cw-button-label = Rotate Clockwise\npdfjs-page-rotate-ccw-button =\n .title = Rotate Counterclockwise\npdfjs-page-rotate-ccw-button-label = Rotate Counterclockwise\npdfjs-cursor-text-select-tool-button =\n .title = Enable Text Selection Tool\npdfjs-cursor-text-select-tool-button-label = Text Selection Tool\npdfjs-cursor-hand-tool-button =\n .title = Enable Hand Tool\npdfjs-cursor-hand-tool-button-label = Hand Tool\npdfjs-scroll-page-button =\n .title = Use Page Scrolling\npdfjs-scroll-page-button-label = Page Scrolling\npdfjs-scroll-vertical-button =\n .title = Use Vertical Scrolling\npdfjs-scroll-vertical-button-label = Vertical Scrolling\npdfjs-scroll-horizontal-button =\n .title = Use Horizontal Scrolling\npdfjs-scroll-horizontal-button-label = Horizontal Scrolling\npdfjs-scroll-wrapped-button =\n .title = Use Wrapped Scrolling\npdfjs-scroll-wrapped-button-label = Wrapped Scrolling\npdfjs-spread-none-button =\n .title = Do not join page spreads\npdfjs-spread-none-button-label = No Spreads\npdfjs-spread-odd-button =\n .title = Join page spreads starting with odd-numbered pages\npdfjs-spread-odd-button-label = Odd Spreads\npdfjs-spread-even-button =\n .title = Join page spreads starting with even-numbered pages\npdfjs-spread-even-button-label = Even Spreads\npdfjs-document-properties-button =\n .title = Document Properties\u2026\npdfjs-document-properties-button-label = Document Properties\u2026\npdfjs-document-properties-file-name = File name:\npdfjs-document-properties-file-size = File size:\npdfjs-document-properties-kb = { $size_kb } KB ({ $size_b } bytes)\npdfjs-document-properties-mb = { $size_mb } MB ({ $size_b } bytes)\npdfjs-document-properties-title = Title:\npdfjs-document-properties-author = Author:\npdfjs-document-properties-subject = Subject:\npdfjs-document-properties-keywords = Keywords:\npdfjs-document-properties-creation-date = Creation Date:\npdfjs-document-properties-modification-date = Modification Date:\npdfjs-document-properties-date-string = { $date }, { $time }\npdfjs-document-properties-creator = Creator:\npdfjs-document-properties-producer = PDF Producer:\npdfjs-document-properties-version = PDF Version:\npdfjs-document-properties-page-count = Page Count:\npdfjs-document-properties-page-size = Page Size:\npdfjs-document-properties-page-size-unit-inches = in\npdfjs-document-properties-page-size-unit-millimeters = mm\npdfjs-document-properties-page-size-orientation-portrait = portrait\npdfjs-document-properties-page-size-orientation-landscape = landscape\npdfjs-document-properties-page-size-name-a-three = A3\npdfjs-document-properties-page-size-name-a-four = A4\npdfjs-document-properties-page-size-name-letter = Letter\npdfjs-document-properties-page-size-name-legal = Legal\npdfjs-document-properties-page-size-dimension-string = { $width } \xD7 { $height } { $unit } ({ $orientation })\npdfjs-document-properties-page-size-dimension-name-string = { $width } \xD7 { $height } { $unit } ({ $name }, { $orientation })\npdfjs-document-properties-linearized = Fast Web View:\npdfjs-document-properties-linearized-yes = Yes\npdfjs-document-properties-linearized-no = No\npdfjs-document-properties-close-button = Close\npdfjs-print-progress-message = Preparing document for printing\u2026\npdfjs-print-progress-percent = { $progress }%\npdfjs-print-progress-close-button = Cancel\npdfjs-printing-not-supported = Warning: Printing is not fully supported by this browser.\npdfjs-printing-not-ready = Warning: The PDF is not fully loaded for printing.\npdfjs-toggle-sidebar-button =\n .title = Toggle Sidebar\npdfjs-toggle-sidebar-notification-button =\n .title = Toggle Sidebar (document contains outline/attachments/layers)\npdfjs-toggle-sidebar-button-label = Toggle Sidebar\npdfjs-document-outline-button =\n .title = Show Document Outline (double-click to expand/collapse all items)\npdfjs-document-outline-button-label = Document Outline\npdfjs-attachments-button =\n .title = Show Attachments\npdfjs-attachments-button-label = Attachments\npdfjs-layers-button =\n .title = Show Layers (double-click to reset all layers to the default state)\npdfjs-layers-button-label = Layers\npdfjs-thumbs-button =\n .title = Show Thumbnails\npdfjs-thumbs-button-label = Thumbnails\npdfjs-current-outline-item-button =\n .title = Find Current Outline Item\npdfjs-current-outline-item-button-label = Current Outline Item\npdfjs-findbar-button =\n .title = Find in Document\npdfjs-findbar-button-label = Find\npdfjs-additional-layers = Additional Layers\npdfjs-thumb-page-title =\n .title = Page { $page }\npdfjs-thumb-page-canvas =\n .aria-label = Thumbnail of Page { $page }\npdfjs-find-input =\n .title = Find\n .placeholder = Find in document\u2026\npdfjs-find-previous-button =\n .title = Find the previous occurrence of the phrase\npdfjs-find-previous-button-label = Previous\npdfjs-find-next-button =\n .title = Find the next occurrence of the phrase\npdfjs-find-next-button-label = Next\npdfjs-find-highlight-checkbox = Highlight All\npdfjs-find-match-case-checkbox-label = Match Case\npdfjs-find-match-diacritics-checkbox-label = Match Diacritics\npdfjs-find-entire-word-checkbox-label = Whole Words\npdfjs-find-reached-top = Reached top of document, continued from bottom\npdfjs-find-reached-bottom = Reached end of document, continued from top\npdfjs-find-match-count =\n { $total ->\n [one] { $current } of { $total } match\n *[other] { $current } of { $total } matches\n }\npdfjs-find-match-count-limit =\n { $limit ->\n [one] More than { $limit } match\n *[other] More than { $limit } matches\n }\npdfjs-find-not-found = Phrase not found\npdfjs-page-scale-width = Page Width\npdfjs-page-scale-fit = Page Fit\npdfjs-page-scale-auto = Automatic Zoom\npdfjs-page-scale-actual = Actual Size\npdfjs-page-scale-percent = { $scale }%\npdfjs-page-landmark =\n .aria-label = Page { $page }\npdfjs-loading-error = An error occurred while loading the PDF.\npdfjs-invalid-file-error = Invalid or corrupted PDF file.\npdfjs-missing-file-error = Missing PDF file.\npdfjs-unexpected-response-error = Unexpected server response.\npdfjs-rendering-error = An error occurred while rendering the page.\npdfjs-annotation-date-string = { $date }, { $time }\npdfjs-text-annotation-type =\n .alt = [{ $type } Annotation]\npdfjs-password-label = Enter the password to open this PDF file.\npdfjs-password-invalid = Invalid password. Please try again.\npdfjs-password-ok-button = OK\npdfjs-password-cancel-button = Cancel\npdfjs-web-fonts-disabled = Web fonts are disabled: unable to use embedded PDF fonts.\npdfjs-editor-free-text-button =\n .title = Text\npdfjs-editor-free-text-button-label = Text\npdfjs-editor-ink-button =\n .title = Draw\npdfjs-editor-ink-button-label = Draw\npdfjs-editor-stamp-button =\n .title = Add or edit images\npdfjs-editor-stamp-button-label = Add or edit images\npdfjs-editor-highlight-button =\n .title = Highlight\npdfjs-editor-highlight-button-label = Highlight\npdfjs-highlight-floating-button1 =\n .title = Highlight\n .aria-label = Highlight\npdfjs-highlight-floating-button-label = Highlight\npdfjs-editor-remove-ink-button =\n .title = Remove drawing\npdfjs-editor-remove-freetext-button =\n .title = Remove text\npdfjs-editor-remove-stamp-button =\n .title = Remove image\npdfjs-editor-remove-highlight-button =\n .title = Remove highlight\npdfjs-editor-free-text-color-input = Color\npdfjs-editor-free-text-size-input = Size\npdfjs-editor-ink-color-input = Color\npdfjs-editor-ink-thickness-input = Thickness\npdfjs-editor-ink-opacity-input = Opacity\npdfjs-editor-stamp-add-image-button =\n .title = Add image\npdfjs-editor-stamp-add-image-button-label = Add image\npdfjs-editor-free-highlight-thickness-input = Thickness\npdfjs-editor-free-highlight-thickness-title =\n .title = Change thickness when highlighting items other than text\npdfjs-free-text =\n .aria-label = Text Editor\npdfjs-free-text-default-content = Start typing\u2026\npdfjs-ink =\n .aria-label = Draw Editor\npdfjs-ink-canvas =\n .aria-label = User-created image\npdfjs-editor-alt-text-button-label = Alt text\npdfjs-editor-alt-text-edit-button-label = Edit alt text\npdfjs-editor-alt-text-dialog-label = Choose an option\npdfjs-editor-alt-text-dialog-description = Alt text (alternative text) helps when people can\u2019t see the image or when it doesn\u2019t load.\npdfjs-editor-alt-text-add-description-label = Add a description\npdfjs-editor-alt-text-add-description-description = Aim for 1-2 sentences that describe the subject, setting, or actions.\npdfjs-editor-alt-text-mark-decorative-label = Mark as decorative\npdfjs-editor-alt-text-mark-decorative-description = This is used for ornamental images, like borders or watermarks.\npdfjs-editor-alt-text-cancel-button = Cancel\npdfjs-editor-alt-text-save-button = Save\npdfjs-editor-alt-text-decorative-tooltip = Marked as decorative\npdfjs-editor-alt-text-textarea =\n .placeholder = For example, \u201CA young man sits down at a table to eat a meal\u201D\npdfjs-editor-resizer-label-top-left = Top left corner \u2014 resize\npdfjs-editor-resizer-label-top-middle = Top middle \u2014 resize\npdfjs-editor-resizer-label-top-right = Top right corner \u2014 resize\npdfjs-editor-resizer-label-middle-right = Middle right \u2014 resize\npdfjs-editor-resizer-label-bottom-right = Bottom right corner \u2014 resize\npdfjs-editor-resizer-label-bottom-middle = Bottom middle \u2014 resize\npdfjs-editor-resizer-label-bottom-left = Bottom left corner \u2014 resize\npdfjs-editor-resizer-label-middle-left = Middle left \u2014 resize\npdfjs-editor-highlight-colorpicker-label = Highlight color\npdfjs-editor-colorpicker-button =\n .title = Change color\npdfjs-editor-colorpicker-dropdown =\n .aria-label = Color choices\npdfjs-editor-colorpicker-yellow =\n .title = Yellow\npdfjs-editor-colorpicker-green =\n .title = Green\npdfjs-editor-colorpicker-blue =\n .title = Blue\npdfjs-editor-colorpicker-pink =\n .title = Pink\npdfjs-editor-colorpicker-red =\n .title = Red\npdfjs-editor-highlight-show-all-button-label = Show all\npdfjs-editor-highlight-show-all-button =\n .title = Show all";
[6982] Fix | Delete
return createBundle(lang, text);
[6983] Fix | Delete
}
[6984] Fix | Delete
}
[6985] Fix | Delete
[6986] Fix | Delete
;// CONCATENATED MODULE: ./web/generic_scripting.js
[6987] Fix | Delete
[6988] Fix | Delete
async function docProperties(pdfDocument) {
[6989] Fix | Delete
const url = "",
[6990] Fix | Delete
baseUrl = url.split("#", 1)[0];
[6991] Fix | Delete
let {
[6992] Fix | Delete
info,
[6993] Fix | Delete
metadata,
[6994] Fix | Delete
contentDispositionFilename,
[6995] Fix | Delete
contentLength
[6996] Fix | Delete
} = await pdfDocument.getMetadata();
[6997] Fix | Delete
if (!contentLength) {
[6998] Fix | Delete
const {
[6999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function