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
}
[9000] Fix | Delete
[this._pageContents[i], this._pageDiffs[i], this._hasDiacritics[i]] = normalize(strBuf.join(""));
[9001] Fix | Delete
resolve();
[9002] Fix | Delete
}, reason => {
[9003] Fix | Delete
console.error(`Unable to get text content for page ${i + 1}`, reason);
[9004] Fix | Delete
this._pageContents[i] = "";
[9005] Fix | Delete
this._pageDiffs[i] = null;
[9006] Fix | Delete
this._hasDiacritics[i] = false;
[9007] Fix | Delete
resolve();
[9008] Fix | Delete
});
[9009] Fix | Delete
});
[9010] Fix | Delete
}
[9011] Fix | Delete
}
[9012] Fix | Delete
#updatePage(index) {
[9013] Fix | Delete
if (this._scrollMatches && this._selected.pageIdx === index) {
[9014] Fix | Delete
this._linkService.page = index + 1;
[9015] Fix | Delete
}
[9016] Fix | Delete
this._eventBus.dispatch("updatetextlayermatches", {
[9017] Fix | Delete
source: this,
[9018] Fix | Delete
pageIndex: index
[9019] Fix | Delete
});
[9020] Fix | Delete
}
[9021] Fix | Delete
#updateAllPages() {
[9022] Fix | Delete
this._eventBus.dispatch("updatetextlayermatches", {
[9023] Fix | Delete
source: this,
[9024] Fix | Delete
pageIndex: -1
[9025] Fix | Delete
});
[9026] Fix | Delete
}
[9027] Fix | Delete
#nextMatch() {
[9028] Fix | Delete
const previous = this.#state.findPrevious;
[9029] Fix | Delete
const currentPageIndex = this._linkService.page - 1;
[9030] Fix | Delete
const numPages = this._linkService.pagesCount;
[9031] Fix | Delete
this._highlightMatches = true;
[9032] Fix | Delete
if (this._dirtyMatch) {
[9033] Fix | Delete
this._dirtyMatch = false;
[9034] Fix | Delete
this._selected.pageIdx = this._selected.matchIdx = -1;
[9035] Fix | Delete
this._offset.pageIdx = currentPageIndex;
[9036] Fix | Delete
this._offset.matchIdx = null;
[9037] Fix | Delete
this._offset.wrapped = false;
[9038] Fix | Delete
this._resumePageIdx = null;
[9039] Fix | Delete
this._pageMatches.length = 0;
[9040] Fix | Delete
this._pageMatchesLength.length = 0;
[9041] Fix | Delete
this.#visitedPagesCount = 0;
[9042] Fix | Delete
this._matchesCountTotal = 0;
[9043] Fix | Delete
this.#updateAllPages();
[9044] Fix | Delete
for (let i = 0; i < numPages; i++) {
[9045] Fix | Delete
if (this._pendingFindMatches.has(i)) {
[9046] Fix | Delete
continue;
[9047] Fix | Delete
}
[9048] Fix | Delete
this._pendingFindMatches.add(i);
[9049] Fix | Delete
this._extractTextPromises[i].then(() => {
[9050] Fix | Delete
this._pendingFindMatches.delete(i);
[9051] Fix | Delete
this.#calculateMatch(i);
[9052] Fix | Delete
});
[9053] Fix | Delete
}
[9054] Fix | Delete
}
[9055] Fix | Delete
const query = this.#query;
[9056] Fix | Delete
if (query.length === 0) {
[9057] Fix | Delete
this.#updateUIState(FindState.FOUND);
[9058] Fix | Delete
return;
[9059] Fix | Delete
}
[9060] Fix | Delete
if (this._resumePageIdx) {
[9061] Fix | Delete
return;
[9062] Fix | Delete
}
[9063] Fix | Delete
const offset = this._offset;
[9064] Fix | Delete
this._pagesToSearch = numPages;
[9065] Fix | Delete
if (offset.matchIdx !== null) {
[9066] Fix | Delete
const numPageMatches = this._pageMatches[offset.pageIdx].length;
[9067] Fix | Delete
if (!previous && offset.matchIdx + 1 < numPageMatches || previous && offset.matchIdx > 0) {
[9068] Fix | Delete
offset.matchIdx = previous ? offset.matchIdx - 1 : offset.matchIdx + 1;
[9069] Fix | Delete
this.#updateMatch(true);
[9070] Fix | Delete
return;
[9071] Fix | Delete
}
[9072] Fix | Delete
this.#advanceOffsetPage(previous);
[9073] Fix | Delete
}
[9074] Fix | Delete
this.#nextPageMatch();
[9075] Fix | Delete
}
[9076] Fix | Delete
#matchesReady(matches) {
[9077] Fix | Delete
const offset = this._offset;
[9078] Fix | Delete
const numMatches = matches.length;
[9079] Fix | Delete
const previous = this.#state.findPrevious;
[9080] Fix | Delete
if (numMatches) {
[9081] Fix | Delete
offset.matchIdx = previous ? numMatches - 1 : 0;
[9082] Fix | Delete
this.#updateMatch(true);
[9083] Fix | Delete
return true;
[9084] Fix | Delete
}
[9085] Fix | Delete
this.#advanceOffsetPage(previous);
[9086] Fix | Delete
if (offset.wrapped) {
[9087] Fix | Delete
offset.matchIdx = null;
[9088] Fix | Delete
if (this._pagesToSearch < 0) {
[9089] Fix | Delete
this.#updateMatch(false);
[9090] Fix | Delete
return true;
[9091] Fix | Delete
}
[9092] Fix | Delete
}
[9093] Fix | Delete
return false;
[9094] Fix | Delete
}
[9095] Fix | Delete
#nextPageMatch() {
[9096] Fix | Delete
if (this._resumePageIdx !== null) {
[9097] Fix | Delete
console.error("There can only be one pending page.");
[9098] Fix | Delete
}
[9099] Fix | Delete
let matches = null;
[9100] Fix | Delete
do {
[9101] Fix | Delete
const pageIdx = this._offset.pageIdx;
[9102] Fix | Delete
matches = this._pageMatches[pageIdx];
[9103] Fix | Delete
if (!matches) {
[9104] Fix | Delete
this._resumePageIdx = pageIdx;
[9105] Fix | Delete
break;
[9106] Fix | Delete
}
[9107] Fix | Delete
} while (!this.#matchesReady(matches));
[9108] Fix | Delete
}
[9109] Fix | Delete
#advanceOffsetPage(previous) {
[9110] Fix | Delete
const offset = this._offset;
[9111] Fix | Delete
const numPages = this._linkService.pagesCount;
[9112] Fix | Delete
offset.pageIdx = previous ? offset.pageIdx - 1 : offset.pageIdx + 1;
[9113] Fix | Delete
offset.matchIdx = null;
[9114] Fix | Delete
this._pagesToSearch--;
[9115] Fix | Delete
if (offset.pageIdx >= numPages || offset.pageIdx < 0) {
[9116] Fix | Delete
offset.pageIdx = previous ? numPages - 1 : 0;
[9117] Fix | Delete
offset.wrapped = true;
[9118] Fix | Delete
}
[9119] Fix | Delete
}
[9120] Fix | Delete
#updateMatch(found = false) {
[9121] Fix | Delete
let state = FindState.NOT_FOUND;
[9122] Fix | Delete
const wrapped = this._offset.wrapped;
[9123] Fix | Delete
this._offset.wrapped = false;
[9124] Fix | Delete
if (found) {
[9125] Fix | Delete
const previousPage = this._selected.pageIdx;
[9126] Fix | Delete
this._selected.pageIdx = this._offset.pageIdx;
[9127] Fix | Delete
this._selected.matchIdx = this._offset.matchIdx;
[9128] Fix | Delete
state = wrapped ? FindState.WRAPPED : FindState.FOUND;
[9129] Fix | Delete
if (previousPage !== -1 && previousPage !== this._selected.pageIdx) {
[9130] Fix | Delete
this.#updatePage(previousPage);
[9131] Fix | Delete
}
[9132] Fix | Delete
}
[9133] Fix | Delete
this.#updateUIState(state, this.#state.findPrevious);
[9134] Fix | Delete
if (this._selected.pageIdx !== -1) {
[9135] Fix | Delete
this._scrollMatches = true;
[9136] Fix | Delete
this.#updatePage(this._selected.pageIdx);
[9137] Fix | Delete
}
[9138] Fix | Delete
}
[9139] Fix | Delete
#onFindBarClose(evt) {
[9140] Fix | Delete
const pdfDocument = this._pdfDocument;
[9141] Fix | Delete
this._firstPageCapability.promise.then(() => {
[9142] Fix | Delete
if (!this._pdfDocument || pdfDocument && this._pdfDocument !== pdfDocument) {
[9143] Fix | Delete
return;
[9144] Fix | Delete
}
[9145] Fix | Delete
if (this._findTimeout) {
[9146] Fix | Delete
clearTimeout(this._findTimeout);
[9147] Fix | Delete
this._findTimeout = null;
[9148] Fix | Delete
}
[9149] Fix | Delete
if (this._resumePageIdx) {
[9150] Fix | Delete
this._resumePageIdx = null;
[9151] Fix | Delete
this._dirtyMatch = true;
[9152] Fix | Delete
}
[9153] Fix | Delete
this.#updateUIState(FindState.FOUND);
[9154] Fix | Delete
this._highlightMatches = false;
[9155] Fix | Delete
this.#updateAllPages();
[9156] Fix | Delete
});
[9157] Fix | Delete
}
[9158] Fix | Delete
#requestMatchesCount() {
[9159] Fix | Delete
const {
[9160] Fix | Delete
pageIdx,
[9161] Fix | Delete
matchIdx
[9162] Fix | Delete
} = this._selected;
[9163] Fix | Delete
let current = 0,
[9164] Fix | Delete
total = this._matchesCountTotal;
[9165] Fix | Delete
if (matchIdx !== -1) {
[9166] Fix | Delete
for (let i = 0; i < pageIdx; i++) {
[9167] Fix | Delete
current += this._pageMatches[i]?.length || 0;
[9168] Fix | Delete
}
[9169] Fix | Delete
current += matchIdx + 1;
[9170] Fix | Delete
}
[9171] Fix | Delete
if (current < 1 || current > total) {
[9172] Fix | Delete
current = total = 0;
[9173] Fix | Delete
}
[9174] Fix | Delete
return {
[9175] Fix | Delete
current,
[9176] Fix | Delete
total
[9177] Fix | Delete
};
[9178] Fix | Delete
}
[9179] Fix | Delete
#updateUIResultsCount() {
[9180] Fix | Delete
this._eventBus.dispatch("updatefindmatchescount", {
[9181] Fix | Delete
source: this,
[9182] Fix | Delete
matchesCount: this.#requestMatchesCount()
[9183] Fix | Delete
});
[9184] Fix | Delete
}
[9185] Fix | Delete
#updateUIState(state, previous = false) {
[9186] Fix | Delete
if (!this.#updateMatchesCountOnProgress && (this.#visitedPagesCount !== this._linkService.pagesCount || state === FindState.PENDING)) {
[9187] Fix | Delete
return;
[9188] Fix | Delete
}
[9189] Fix | Delete
this._eventBus.dispatch("updatefindcontrolstate", {
[9190] Fix | Delete
source: this,
[9191] Fix | Delete
state,
[9192] Fix | Delete
previous,
[9193] Fix | Delete
matchesCount: this.#requestMatchesCount(),
[9194] Fix | Delete
rawQuery: this.#state?.query ?? null
[9195] Fix | Delete
});
[9196] Fix | Delete
}
[9197] Fix | Delete
}
[9198] Fix | Delete
[9199] Fix | Delete
;// CONCATENATED MODULE: ./web/pdf_find_bar.js
[9200] Fix | Delete
[9201] Fix | Delete
[9202] Fix | Delete
const MATCHES_COUNT_LIMIT = 1000;
[9203] Fix | Delete
class PDFFindBar {
[9204] Fix | Delete
#resizeObserver = new ResizeObserver(this.#resizeObserverCallback.bind(this));
[9205] Fix | Delete
constructor(options, eventBus) {
[9206] Fix | Delete
this.opened = false;
[9207] Fix | Delete
this.bar = options.bar;
[9208] Fix | Delete
this.toggleButton = options.toggleButton;
[9209] Fix | Delete
this.findField = options.findField;
[9210] Fix | Delete
this.highlightAll = options.highlightAllCheckbox;
[9211] Fix | Delete
this.caseSensitive = options.caseSensitiveCheckbox;
[9212] Fix | Delete
this.matchDiacritics = options.matchDiacriticsCheckbox;
[9213] Fix | Delete
this.entireWord = options.entireWordCheckbox;
[9214] Fix | Delete
this.findMsg = options.findMsg;
[9215] Fix | Delete
this.findResultsCount = options.findResultsCount;
[9216] Fix | Delete
this.findPreviousButton = options.findPreviousButton;
[9217] Fix | Delete
this.findNextButton = options.findNextButton;
[9218] Fix | Delete
this.eventBus = eventBus;
[9219] Fix | Delete
this.toggleButton.addEventListener("click", () => {
[9220] Fix | Delete
this.toggle();
[9221] Fix | Delete
});
[9222] Fix | Delete
this.findField.addEventListener("input", () => {
[9223] Fix | Delete
this.dispatchEvent("");
[9224] Fix | Delete
});
[9225] Fix | Delete
this.bar.addEventListener("keydown", e => {
[9226] Fix | Delete
switch (e.keyCode) {
[9227] Fix | Delete
case 13:
[9228] Fix | Delete
if (e.target === this.findField) {
[9229] Fix | Delete
this.dispatchEvent("again", e.shiftKey);
[9230] Fix | Delete
}
[9231] Fix | Delete
break;
[9232] Fix | Delete
case 27:
[9233] Fix | Delete
this.close();
[9234] Fix | Delete
break;
[9235] Fix | Delete
}
[9236] Fix | Delete
});
[9237] Fix | Delete
this.findPreviousButton.addEventListener("click", () => {
[9238] Fix | Delete
this.dispatchEvent("again", true);
[9239] Fix | Delete
});
[9240] Fix | Delete
this.findNextButton.addEventListener("click", () => {
[9241] Fix | Delete
this.dispatchEvent("again", false);
[9242] Fix | Delete
});
[9243] Fix | Delete
this.highlightAll.addEventListener("click", () => {
[9244] Fix | Delete
this.dispatchEvent("highlightallchange");
[9245] Fix | Delete
});
[9246] Fix | Delete
this.caseSensitive.addEventListener("click", () => {
[9247] Fix | Delete
this.dispatchEvent("casesensitivitychange");
[9248] Fix | Delete
});
[9249] Fix | Delete
this.entireWord.addEventListener("click", () => {
[9250] Fix | Delete
this.dispatchEvent("entirewordchange");
[9251] Fix | Delete
});
[9252] Fix | Delete
this.matchDiacritics.addEventListener("click", () => {
[9253] Fix | Delete
this.dispatchEvent("diacriticmatchingchange");
[9254] Fix | Delete
});
[9255] Fix | Delete
}
[9256] Fix | Delete
reset() {
[9257] Fix | Delete
this.updateUIState();
[9258] Fix | Delete
}
[9259] Fix | Delete
dispatchEvent(type, findPrev = false) {
[9260] Fix | Delete
this.eventBus.dispatch("find", {
[9261] Fix | Delete
source: this,
[9262] Fix | Delete
type,
[9263] Fix | Delete
query: this.findField.value,
[9264] Fix | Delete
caseSensitive: this.caseSensitive.checked,
[9265] Fix | Delete
entireWord: this.entireWord.checked,
[9266] Fix | Delete
highlightAll: this.highlightAll.checked,
[9267] Fix | Delete
findPrevious: findPrev,
[9268] Fix | Delete
matchDiacritics: this.matchDiacritics.checked
[9269] Fix | Delete
});
[9270] Fix | Delete
}
[9271] Fix | Delete
updateUIState(state, previous, matchesCount) {
[9272] Fix | Delete
const {
[9273] Fix | Delete
findField,
[9274] Fix | Delete
findMsg
[9275] Fix | Delete
} = this;
[9276] Fix | Delete
let findMsgId = "",
[9277] Fix | Delete
status = "";
[9278] Fix | Delete
switch (state) {
[9279] Fix | Delete
case FindState.FOUND:
[9280] Fix | Delete
break;
[9281] Fix | Delete
case FindState.PENDING:
[9282] Fix | Delete
status = "pending";
[9283] Fix | Delete
break;
[9284] Fix | Delete
case FindState.NOT_FOUND:
[9285] Fix | Delete
findMsgId = "pdfjs-find-not-found";
[9286] Fix | Delete
status = "notFound";
[9287] Fix | Delete
break;
[9288] Fix | Delete
case FindState.WRAPPED:
[9289] Fix | Delete
findMsgId = `pdfjs-find-reached-${previous ? "top" : "bottom"}`;
[9290] Fix | Delete
break;
[9291] Fix | Delete
}
[9292] Fix | Delete
findField.setAttribute("data-status", status);
[9293] Fix | Delete
findField.setAttribute("aria-invalid", state === FindState.NOT_FOUND);
[9294] Fix | Delete
findMsg.setAttribute("data-status", status);
[9295] Fix | Delete
if (findMsgId) {
[9296] Fix | Delete
findMsg.setAttribute("data-l10n-id", findMsgId);
[9297] Fix | Delete
} else {
[9298] Fix | Delete
findMsg.removeAttribute("data-l10n-id");
[9299] Fix | Delete
findMsg.textContent = "";
[9300] Fix | Delete
}
[9301] Fix | Delete
this.updateResultsCount(matchesCount);
[9302] Fix | Delete
}
[9303] Fix | Delete
updateResultsCount({
[9304] Fix | Delete
current = 0,
[9305] Fix | Delete
total = 0
[9306] Fix | Delete
} = {}) {
[9307] Fix | Delete
const {
[9308] Fix | Delete
findResultsCount
[9309] Fix | Delete
} = this;
[9310] Fix | Delete
if (total > 0) {
[9311] Fix | Delete
const limit = MATCHES_COUNT_LIMIT;
[9312] Fix | Delete
findResultsCount.setAttribute("data-l10n-id", `pdfjs-find-match-count${total > limit ? "-limit" : ""}`);
[9313] Fix | Delete
findResultsCount.setAttribute("data-l10n-args", JSON.stringify({
[9314] Fix | Delete
limit,
[9315] Fix | Delete
current,
[9316] Fix | Delete
total
[9317] Fix | Delete
}));
[9318] Fix | Delete
} else {
[9319] Fix | Delete
findResultsCount.removeAttribute("data-l10n-id");
[9320] Fix | Delete
findResultsCount.textContent = "";
[9321] Fix | Delete
}
[9322] Fix | Delete
}
[9323] Fix | Delete
open() {
[9324] Fix | Delete
if (!this.opened) {
[9325] Fix | Delete
this.#resizeObserver.observe(this.bar.parentNode);
[9326] Fix | Delete
this.#resizeObserver.observe(this.bar);
[9327] Fix | Delete
this.opened = true;
[9328] Fix | Delete
toggleExpandedBtn(this.toggleButton, true, this.bar);
[9329] Fix | Delete
}
[9330] Fix | Delete
this.findField.select();
[9331] Fix | Delete
this.findField.focus();
[9332] Fix | Delete
}
[9333] Fix | Delete
close() {
[9334] Fix | Delete
if (!this.opened) {
[9335] Fix | Delete
return;
[9336] Fix | Delete
}
[9337] Fix | Delete
this.#resizeObserver.disconnect();
[9338] Fix | Delete
this.opened = false;
[9339] Fix | Delete
toggleExpandedBtn(this.toggleButton, false, this.bar);
[9340] Fix | Delete
this.eventBus.dispatch("findbarclose", {
[9341] Fix | Delete
source: this
[9342] Fix | Delete
});
[9343] Fix | Delete
}
[9344] Fix | Delete
toggle() {
[9345] Fix | Delete
if (this.opened) {
[9346] Fix | Delete
this.close();
[9347] Fix | Delete
} else {
[9348] Fix | Delete
this.open();
[9349] Fix | Delete
}
[9350] Fix | Delete
}
[9351] Fix | Delete
#resizeObserverCallback(entries) {
[9352] Fix | Delete
const {
[9353] Fix | Delete
bar
[9354] Fix | Delete
} = this;
[9355] Fix | Delete
bar.classList.remove("wrapContainers");
[9356] Fix | Delete
const findbarHeight = bar.clientHeight;
[9357] Fix | Delete
const inputContainerHeight = bar.firstElementChild.clientHeight;
[9358] Fix | Delete
if (findbarHeight > inputContainerHeight) {
[9359] Fix | Delete
bar.classList.add("wrapContainers");
[9360] Fix | Delete
}
[9361] Fix | Delete
}
[9362] Fix | Delete
}
[9363] Fix | Delete
[9364] Fix | Delete
;// CONCATENATED MODULE: ./web/pdf_history.js
[9365] Fix | Delete
[9366] Fix | Delete
[9367] Fix | Delete
const HASH_CHANGE_TIMEOUT = 1000;
[9368] Fix | Delete
const POSITION_UPDATED_THRESHOLD = 50;
[9369] Fix | Delete
const UPDATE_VIEWAREA_TIMEOUT = 1000;
[9370] Fix | Delete
function getCurrentHash() {
[9371] Fix | Delete
return document.location.hash;
[9372] Fix | Delete
}
[9373] Fix | Delete
class PDFHistory {
[9374] Fix | Delete
#eventAbortController = null;
[9375] Fix | Delete
constructor({
[9376] Fix | Delete
linkService,
[9377] Fix | Delete
eventBus
[9378] Fix | Delete
}) {
[9379] Fix | Delete
this.linkService = linkService;
[9380] Fix | Delete
this.eventBus = eventBus;
[9381] Fix | Delete
this._initialized = false;
[9382] Fix | Delete
this._fingerprint = "";
[9383] Fix | Delete
this.reset();
[9384] Fix | Delete
this.eventBus._on("pagesinit", () => {
[9385] Fix | Delete
this._isPagesLoaded = false;
[9386] Fix | Delete
this.eventBus._on("pagesloaded", evt => {
[9387] Fix | Delete
this._isPagesLoaded = !!evt.pagesCount;
[9388] Fix | Delete
}, {
[9389] Fix | Delete
once: true
[9390] Fix | Delete
});
[9391] Fix | Delete
});
[9392] Fix | Delete
}
[9393] Fix | Delete
initialize({
[9394] Fix | Delete
fingerprint,
[9395] Fix | Delete
resetHistory = false,
[9396] Fix | Delete
updateUrl = false
[9397] Fix | Delete
}) {
[9398] Fix | Delete
if (!fingerprint || typeof fingerprint !== "string") {
[9399] Fix | Delete
console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.');
[9400] Fix | Delete
return;
[9401] Fix | Delete
}
[9402] Fix | Delete
if (this._initialized) {
[9403] Fix | Delete
this.reset();
[9404] Fix | Delete
}
[9405] Fix | Delete
const reInitialized = this._fingerprint !== "" && this._fingerprint !== fingerprint;
[9406] Fix | Delete
this._fingerprint = fingerprint;
[9407] Fix | Delete
this._updateUrl = updateUrl === true;
[9408] Fix | Delete
this._initialized = true;
[9409] Fix | Delete
this.#bindEvents();
[9410] Fix | Delete
const state = window.history.state;
[9411] Fix | Delete
this._popStateInProgress = false;
[9412] Fix | Delete
this._blockHashChange = 0;
[9413] Fix | Delete
this._currentHash = getCurrentHash();
[9414] Fix | Delete
this._numPositionUpdates = 0;
[9415] Fix | Delete
this._uid = this._maxUid = 0;
[9416] Fix | Delete
this._destination = null;
[9417] Fix | Delete
this._position = null;
[9418] Fix | Delete
if (!this.#isValidState(state, true) || resetHistory) {
[9419] Fix | Delete
const {
[9420] Fix | Delete
hash,
[9421] Fix | Delete
page,
[9422] Fix | Delete
rotation
[9423] Fix | Delete
} = this.#parseCurrentHash(true);
[9424] Fix | Delete
if (!hash || reInitialized || resetHistory) {
[9425] Fix | Delete
this.#pushOrReplaceState(null, true);
[9426] Fix | Delete
return;
[9427] Fix | Delete
}
[9428] Fix | Delete
this.#pushOrReplaceState({
[9429] Fix | Delete
hash,
[9430] Fix | Delete
page,
[9431] Fix | Delete
rotation
[9432] Fix | Delete
}, true);
[9433] Fix | Delete
return;
[9434] Fix | Delete
}
[9435] Fix | Delete
const destination = state.destination;
[9436] Fix | Delete
this.#updateInternalState(destination, state.uid, true);
[9437] Fix | Delete
if (destination.rotation !== undefined) {
[9438] Fix | Delete
this._initialRotation = destination.rotation;
[9439] Fix | Delete
}
[9440] Fix | Delete
if (destination.dest) {
[9441] Fix | Delete
this._initialBookmark = JSON.stringify(destination.dest);
[9442] Fix | Delete
this._destination.page = null;
[9443] Fix | Delete
} else if (destination.hash) {
[9444] Fix | Delete
this._initialBookmark = destination.hash;
[9445] Fix | Delete
} else if (destination.page) {
[9446] Fix | Delete
this._initialBookmark = `page=${destination.page}`;
[9447] Fix | Delete
}
[9448] Fix | Delete
}
[9449] Fix | Delete
reset() {
[9450] Fix | Delete
if (this._initialized) {
[9451] Fix | Delete
this.#pageHide();
[9452] Fix | Delete
this._initialized = false;
[9453] Fix | Delete
this.#unbindEvents();
[9454] Fix | Delete
}
[9455] Fix | Delete
if (this._updateViewareaTimeout) {
[9456] Fix | Delete
clearTimeout(this._updateViewareaTimeout);
[9457] Fix | Delete
this._updateViewareaTimeout = null;
[9458] Fix | Delete
}
[9459] Fix | Delete
this._initialBookmark = null;
[9460] Fix | Delete
this._initialRotation = null;
[9461] Fix | Delete
}
[9462] Fix | Delete
push({
[9463] Fix | Delete
namedDest = null,
[9464] Fix | Delete
explicitDest,
[9465] Fix | Delete
pageNumber
[9466] Fix | Delete
}) {
[9467] Fix | Delete
if (!this._initialized) {
[9468] Fix | Delete
return;
[9469] Fix | Delete
}
[9470] Fix | Delete
if (namedDest && typeof namedDest !== "string") {
[9471] Fix | Delete
console.error("PDFHistory.push: " + `"${namedDest}" is not a valid namedDest parameter.`);
[9472] Fix | Delete
return;
[9473] Fix | Delete
} else if (!Array.isArray(explicitDest)) {
[9474] Fix | Delete
console.error("PDFHistory.push: " + `"${explicitDest}" is not a valid explicitDest parameter.`);
[9475] Fix | Delete
return;
[9476] Fix | Delete
} else if (!this.#isValidPage(pageNumber)) {
[9477] Fix | Delete
if (pageNumber !== null || this._destination) {
[9478] Fix | Delete
console.error("PDFHistory.push: " + `"${pageNumber}" is not a valid pageNumber parameter.`);
[9479] Fix | Delete
return;
[9480] Fix | Delete
}
[9481] Fix | Delete
}
[9482] Fix | Delete
const hash = namedDest || JSON.stringify(explicitDest);
[9483] Fix | Delete
if (!hash) {
[9484] Fix | Delete
return;
[9485] Fix | Delete
}
[9486] Fix | Delete
let forceReplace = false;
[9487] Fix | Delete
if (this._destination && (isDestHashesEqual(this._destination.hash, hash) || isDestArraysEqual(this._destination.dest, explicitDest))) {
[9488] Fix | Delete
if (this._destination.page) {
[9489] Fix | Delete
return;
[9490] Fix | Delete
}
[9491] Fix | Delete
forceReplace = true;
[9492] Fix | Delete
}
[9493] Fix | Delete
if (this._popStateInProgress && !forceReplace) {
[9494] Fix | Delete
return;
[9495] Fix | Delete
}
[9496] Fix | Delete
this.#pushOrReplaceState({
[9497] Fix | Delete
dest: explicitDest,
[9498] Fix | Delete
hash,
[9499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function