`;\r\n\r\n break;\r\n\r\n case \"godhomeStatistics\":\r\n\r\n textFill += `
`;\r\n\r\n break;\r\n }\r\n\r\n entries = sections[section].entries;\r\n\r\n /* ####################### Section div id start ########################## */\r\n\r\n /* starts a new
with the current section id */\r\n textFill += SectionStart(sections[section]);\r\n\r\n /* creates a
tag for the current section and fills with current%/max%\r\n If the save file was not analyzed, then fill only max% on blue background */\r\n if (db.saveAnalyzed === true) {\r\n textFill += CompletionFill(sections[section]);\r\n } else {\r\n textFill += CompletionFillNoSave(sections[section]);\r\n }\r\n\r\n\r\n /* #################### Different behaviour depending on the section ####################### */\r\n\r\n\r\n switch (section) {\r\n\r\n /* ############### Game Status (intro) ################ */\r\n\r\n case \"intro\":\r\n\r\n /* ############## Create each single entry (intro) ############### */\r\n\r\n for (let entry in entries) {\r\n\r\n obj.b = [\"\", \"\"];\r\n obj.p = \"\";\r\n obj.span = [\"\", \"\"];\r\n obj.div = div;\r\n\r\n /* -------- Icons (next to each entry) --------- */\r\n if (entries[entry].hasOwnProperty(\"icon\")) {\r\n\r\n switch (entries[entry].icon) {\r\n\r\n case \"clock\":\r\n obj.icon = iconClock;\r\n break;\r\n case \"green\":\r\n obj.icon = iconGreen;\r\n break;\r\n case \"partial\":\r\n obj.icon = iconPartial;\r\n break;\r\n case \"red\":\r\n obj.icon = iconRed;\r\n break;\r\n default:\r\n obj.icon = iconNull;\r\n }\r\n } else {\r\n obj.icon = iconRed;\r\n }\r\n\r\n obj.textPrefix = entries[entry].name;\r\n obj.textSuffix = entries[entry].spoiler;\r\n obj.spoilerAfter = \"\";\r\n\r\n /* Different text and images for each entry in the \"Game Status\" (intro) section */\r\n\r\n switch (entry) {\r\n case \"gameCompletion\":\r\n obj.textSuffix = `${obj.textSuffix} %`;\r\n obj.spoilerAfter = ` ${entries[entry].spoilerAfter}`;\r\n obj.span[1] = \"\";\r\n\r\n break;\r\n\r\n case \"gameCompletionExtended\":\r\n obj.spoilerAfter = ` ${entries[entry].spoilerAfter}`;\r\n obj.span[1] = \"\";\r\n\r\n break;\r\n\r\n case \"health\":\r\n\r\n /* ----------------- Horizontal Line after save version ---------------- */\r\n textFill += FLEUR_DIVIDE;\r\n\r\n obj.div = divFlex;\r\n obj.span = [\"\", \"\"];\r\n\r\n (entries[entry].permadeathMode) ? Img = maskSteel: Img = maskNormal;\r\n\r\n for (let i = 0, total = entries[entry].amountTotal; i < total; i++) {\r\n obj.textSuffix += Img;\r\n }\r\n\r\n obj.textSuffix += `${obj.p}(${entries[entry].amountTotal})`;\r\n\r\n obj.p = \"\";\r\n break;\r\n\r\n case \"soul\":\r\n obj.div = divFlex;\r\n obj.span = [\"\", \"\"];\r\n Img = soulNormal;\r\n\r\n for (let i = 0, total = Math.round(entries[entry].amountTotal / 33); i < total; i++) {\r\n obj.textSuffix += Img;\r\n }\r\n\r\n obj.textSuffix += `${obj.p}(${Math.round(entries[entry].amountTotal / 33)})`;\r\n\r\n obj.p = \"\";\r\n break;\r\n\r\n case \"notches\":\r\n obj.div = divFlex;\r\n obj.span = [\"\", \"\"];\r\n\r\n /* First, check filled (used) notches and fill them (skips if no filled notches) */\r\n if (entries[entry].amountFilled > 0) {\r\n for (let i = 0, total = entries[entry].amountFilled; i < total; i++) {\r\n obj.textSuffix += notchFilledImage;\r\n }\r\n }\r\n\r\n /* Second, check overcharmed notches and fill them (skips if player is not overcharmed) */\r\n if (entries[entry].amountOvercharmed > 0) {\r\n for (let i = 0, total = entries[entry].amountOvercharmed; i < total; i++) {\r\n obj.textSuffix += notchOvercharmedImage;\r\n }\r\n }\r\n\r\n /* Last, fill all unused notches */\r\n if (entries[entry].amountUnused > 0) {\r\n for (let i = 0, total = entries[entry].amountUnused; i < total; i++) {\r\n obj.textSuffix += notchNormalImage;\r\n }\r\n }\r\n\r\n obj.textSuffix += `${obj.p}(${entries[entry].amountTotal})`;\r\n\r\n break;\r\n\r\n case \"geo\":\r\n obj.div = divFlex;\r\n obj.span = [\"\", \"\"];\r\n\r\n obj.textSuffix += `${geoNormalImage}${entries[entry].amount}`;\r\n // Show Shade Geo value and image only if Shade has at least 1 Geo on it\r\n if (entries[entry].amountShade > 0) obj.textSuffix += `${obj.p}+${geoShadeImage}${entries[entry].amountShade}`;\r\n\r\n // Show also total Geo (Geo + Shade Geo) if player has at least 1 geo alongside the shade geo\r\n if (entries[entry].amount > 0 && entries[entry].amountShade > 0) {\r\n obj.textSuffix += `${obj.p}=${obj.p}${entries[entry].amountTotal}`;\r\n }\r\n\r\n obj.p = \"\";\r\n break;\r\n\r\n default:\r\n }\r\n\r\n textFill += SingleEntryFill(obj);\r\n }\r\n\r\n break;\r\n\r\n /* #################### Hints (hints) #################### */\r\n\r\n case \"hints\":\r\n obj.b = [\"\", \"\"];\r\n obj.span = [\"\", \"\"];\r\n obj.icon = \"\";\r\n obj.textPrefix = \"\";\r\n obj.div = div;\r\n\r\n /* display only one (current) hint */\r\n obj.textSuffix = entries[sections[section].current].spoiler;\r\n\r\n textFill += SingleEntryFill(obj);\r\n\r\n break;\r\n\r\n /* ###################### Create all other sections ##################### */\r\n\r\n default:\r\n\r\n /* ###################### Create section descriptions under each H2 title ##################### */\r\n\r\n if (sections[section].hasOwnProperty(\"description\")) {\r\n textFill += SectionDescription(sections[section]);\r\n }\r\n\r\n /* ###################### Create each single entry (from all other sections) ##################### */\r\n\r\n for (let entry in entries) {\r\n\r\n /* obj.p = \"\"; */\r\n obj.p = \"\";\r\n obj.span = [\"\", \"\"];\r\n obj.spoiler = [\"\", \"\"];\r\n obj.div = div;\r\n obj.textPrefix = entries[entry].name;\r\n obj.textSuffix = `— ${entries[entry].spoiler}`;\r\n obj.wiki = entries[entry].wiki;\r\n\r\n /* -------- Icons (next to each entry) --------- */\r\n if (entries[entry].hasOwnProperty(\"icon\")) {\r\n\r\n switch (entries[entry].icon) {\r\n\r\n case \"clock\":\r\n obj.icon = iconClock;\r\n break;\r\n\r\n case \"green\":\r\n obj.icon = iconGreen;\r\n\r\n /* -------- Prevents blurring when a player has already completed the entry --------- */\r\n obj.span[0] = \"\";\r\n break;\r\n\r\n case \"partial\":\r\n obj.icon = iconPartial;\r\n break;\r\n\r\n case \"partialJournal\":\r\n obj.icon = iconPartial;\r\n\r\n /* -------- Prevents textSuffix blurring when a player has already discovered the entry --------- */\r\n obj.span[0] = \"\";\r\n break;\r\n\r\n case \"red\":\r\n obj.icon = iconRed;\r\n break;\r\n\r\n default:\r\n obj.icon = iconNull;\r\n }\r\n } else {\r\n obj.icon = iconRed;\r\n }\r\n\r\n /* assign the appropriate spoiler class name depending on the completion check (for blurring names) */\r\n if (entries[entry].hasOwnProperty(\"icon\")) {\r\n switch (entries[entry].icon) {\r\n\r\n case \"red\":\r\n case \"none\":\r\n obj.iconClass = \" spoiler-red blurred\";\r\n break;\r\n\r\n default:\r\n /* -------- Prevents TextPrefix blurring when a player has already discovered the entry --------- */\r\n obj.iconClass = \"\";\r\n }\r\n } else {\r\n obj.iconClass = \"\";\r\n }\r\n\r\n obj.b = [``, \"\"];\r\n\r\n if (entries[entry].hasOwnProperty(\"amount\")) {\r\n if (entries[entry].hasOwnProperty(\"disabled\")) {\r\n if (entries[entry].disabled !== true) {\r\n obj.textPrefix += `: ${entries[entry].amount}`;\r\n }\r\n } else {\r\n obj.textPrefix += `: ${entries[entry].amount}`;\r\n }\r\n }\r\n\r\n if (entries[entry].hasOwnProperty(\"amountTotal\")) {\r\n obj.textPrefix += ` / ${entries[entry].amountTotal}`;\r\n }\r\n\r\n if (entries[entry].hasOwnProperty(\"id\")) {\r\n\r\n switch (entries[entry].id) {\r\n\r\n case \"geoRocks\":\r\n case \"itemsDiscovered\":\r\n obj.textPrefix += `: ${entries[entry].notActivated} | ${entries[entry].activated} | ${entries[entry].discoveredTotal}`;\r\n\r\n break;\r\n\r\n default:\r\n }\r\n }\r\n\r\n if (entries[entry].hasOwnProperty(\"disabled\")) {\r\n if (entries[entry].disabled === true) {\r\n obj.textPrefix = `${obj.textPrefix}`;\r\n }\r\n }\r\n\r\n if (obj.textPrefix.includes(\"\")) obj.textSuffix = `${obj.textSuffix}`;\r\n\r\n /* textFill += SingleEntryFill(section, entries[entry]); */\r\n textFill += SingleEntryFill(obj);\r\n\r\n /* ##################### Horizontal lines ####################### */\r\n\r\n switch (entry) {\r\n case \"pantheonKnight\":\r\n case \"bossDoorStateTier5\":\r\n case \"VoidIdol_3\":\r\n case \"greyPrinceDefeats\":\r\n case \"ordealAchieved\":\r\n textFill += FLEUR_DIVIDE;\r\n\r\n break;\r\n }\r\n } /* end for (let entry in entries) */\r\n } /* end switch (section) - central */\r\n\r\n /* ############# Cumulate all section texts into one variable for final HTML filling. End section div tag ############### */\r\n\r\n finalHTMLFill += `${textFill}\\n
\\n\\n`;\r\n\r\n /* ################## End the Tab divs (must be after section ending div) ################# */\r\n\r\n switch (section) {\r\n\r\n /* ending the tabs */\r\n case \"godmaster\": // main\r\n case \"achievements\": // essential\r\n case \"huntersJournalOptional\": // essential\r\n case \"statistics\": // stats\r\n case \"godhomeStatistics\": // godhome\r\n \r\n finalHTMLFill += `
`;\r\n\r\n break;\r\n\r\n }\r\n\r\n } /* end for (let section in sections) */\r\n\r\n /* console.groupCollapsed(\"finalHTMLFill\");\r\n console.log(finalHTMLFill);\r\n console.groupEnd(); */\r\n\r\n /* --------------- Final single HTML access and fill here ------------------ */\r\n\r\n document.getElementById(\"generated\").innerHTML = finalHTMLFill;\r\n\r\n /* make tab switch buttons working (on click) - must run after inner HTML generation is finished */\r\n\r\n document.querySelectorAll(\".tab-switch\").forEach( (button) => {\r\n\r\n button.addEventListener(\"click\", (e) => {\r\n PageSwitchTab(e.target.name);\r\n });\r\n });\r\n\r\n /* Check local storage first, and set the last selected Tab on the page (remembers last clicked tab) */\r\n\r\n if (StorageAvailable('localStorage')) {\r\n\r\n if (localStorage.getItem(\"hkTabActive\")) {\r\n PageSwitchTab(localStorage.getItem(\"hkTabActive\"));\r\n } else {\r\n PageSwitchTab(\"main\");\r\n }\r\n }\r\n\r\n // finish benchmarking\r\n benchmarkTimes.GenerateInnerHTML.timeEnd = performance.now();\r\n}\r\n\r\nfunction SectionDescription(section) {\r\n\r\n return `
\\n`;\r\n}\r\n\r\n/**\r\n * Replaces the h2 titles with max percent values as read from the database\r\n */\r\nfunction CompletionFillNoSave(section) {\r\n\r\n let id = \"\";\r\n let h2 = \"\";\r\n let h2id = \"\";\r\n let mp = \"\"; // max Percent\r\n let symbol = \"%\";\r\n // let cl = \"\"; // class\r\n\r\n id = section.id;\r\n h2 = section.h2;\r\n h2id = \"h2-\" + section.id;\r\n\r\n /* Do not display % when showing Hunter's Journal entries */\r\n if (section.id === \"hk-journal\") symbol = \"\";\r\n\r\n mp = `
${(id === \"hk-intro\") ? 0: section.maxPercent}${symbol}
`;\r\n if (!section.hasOwnProperty(\"maxPercent\")) mp = \"\";\r\n\r\n /* return [\r\n `
`,\r\n `
${h2}${mp}
`,\r\n \"\\n\"\r\n ].join(\"\"); */\r\n return `
${h2}${mp}
`;\r\n}\r\n\r\n/**\r\n * Replaces the h2 titles with a current percent/max percent values as read from the database\r\n */\r\nfunction CompletionFill(section) {\r\n\r\n let h2 = section.h2;\r\n let h2id = `
`;\r\n let cl = \"\";\r\n let clGreen = \"box-green\";\r\n let clRed = \"box-red\";\r\n let cp = 0; // current Percent\r\n let mp = 0; // max Percent\r\n let symbol = \"%\";\r\n let fillText = \"\";\r\n\r\n (section.hasOwnProperty(\"percent\")) ? cp = section.percent: cp = 0;\r\n\r\n // Don't use percent-box for Essentials, Achievements, Statistics\r\n if (!section.hasOwnProperty(\"maxPercent\")) {\r\n fillText = \"\";\r\n }\r\n // otherwise use percent-box with values cp/mp%\r\n else {\r\n\r\n mp = section.maxPercent;\r\n\r\n if (section.id === \"hk-maskshards\") {\r\n let perc = section.percent;\r\n (perc % 4) ? cp = Math.floor(perc / 4): cp = perc / 4;\r\n } else if (section.id === \"hk-vesselfragments\") {\r\n let perc = section.percent;\r\n (perc % 3) ? cp = Math.floor(perc / 3): cp = perc / 3;\r\n }\r\n\r\n // switches the box to red when a section (h2) is 0\r\n if (cp === 0) {\r\n cl = ` ${clRed}`;\r\n }\r\n // switches the box to green when a section (h2) is completed\r\n else if (cp === mp) {\r\n cl = ` ${clGreen}`;\r\n }\r\n // default is blue (partially completed and starting value)\r\n else cl = \"\";\r\n\r\n // needed for Game Status to show percentage properly (adds a slash for all boxes except the Game Status one)\r\n if (section.id !== \"hk-intro\") cp += \"/\";\r\n\r\n /* Do not display % when showing Hunter's Journal entries */\r\n if (section.id === \"hk-journal\") symbol = \"\";\r\n\r\n fillText = `
${(section.id === \"hk-intro\") ? cp: `${cp}${section.maxPercent}`}${symbol}
`;\r\n }\r\n\r\n return `\\t${h2id}${h2}${fillText}\\n`;\r\n\r\n}\r\n\r\n/* function SingleEntryFill(section, entry) { */\r\nfunction SingleEntryFill(obj) {\r\n\r\n return [\r\n obj.div,\r\n obj.icon,\r\n `${obj.b[0]}${obj.textPrefix}${obj.b[1]}`,\r\n obj.span[0],\r\n obj.p,\r\n obj.spoiler[0],\r\n `${obj.textSuffix}${obj.spoilerAfter}`,\r\n obj.spoiler[1],\r\n obj.span[1],\r\n \"
\\n\"\r\n ].join(\"\");\r\n\r\n}\r\n\r\n/**\r\n * Adds HTML string to an element with a given ID.\r\n * @param {object} divId object containing div ID of the HTML element to append to\r\n * @param {string} content HTML contents to append\r\n */\r\nfunction AppendHTML(divId, content) {\r\n document.getElementById(divId.id).innerHTML += \"\\n\" + content;\r\n}\r\n\r\n/**\r\n * Toggles display of \"hk-hints\". On click with no parameters or on demand when called with a parameter\r\n * @param {string} param \"hide\", \"show\" or none (optional)\r\n */\r\nfunction CheckboxHintsToggle(param = \"none\") {\r\n let checkboxId = document.getElementById(\"checkbox-hints\");\r\n\r\n switch (param) {\r\n case \"hide\":\r\n document.getElementById(\"hk-hints\").classList.add(\"hidden\");\r\n checkboxId.value = \"hints-off\";\r\n checkboxId.checked = false;\r\n\r\n // remember this choice for subsequent page visits and browser restarts\r\n if (StorageAvailable('localStorage')) {\r\n localStorage.setItem(\"hkCheckboxHints\", \"unchecked\");\r\n }\r\n break;\r\n case \"show\":\r\n document.getElementById(\"hk-hints\").classList.remove(\"hidden\");\r\n checkboxId.value = \"hints-on\";\r\n checkboxId.checked = true;\r\n\r\n // remember this choice for subsequent page visits and browser restarts\r\n if (StorageAvailable('localStorage')) {\r\n localStorage.setItem(\"hkCheckboxHints\", \"checked\");\r\n }\r\n break;\r\n default:\r\n // This runs when the checkbox is not checked\r\n if (checkboxId.checked === false) {\r\n document.getElementById(\"hk-hints\").classList.add(\"hidden\");\r\n checkboxId.value = \"hints-off\";\r\n\r\n // remember this choice for subsequent page visits and browser restarts\r\n if (StorageAvailable('localStorage')) {\r\n localStorage.setItem(\"hkCheckboxHints\", \"unchecked\");\r\n }\r\n }\r\n // This runs when the checkbox is checked\r\n else {\r\n document.getElementById(\"hk-hints\").classList.remove(\"hidden\");\r\n checkboxId.value = \"hints-on\";\r\n\r\n // remember this choice for subsequent page visits and browser restarts\r\n if (StorageAvailable('localStorage')) {\r\n localStorage.setItem(\"hkCheckboxHints\", \"checked\");\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Toggles display of \".spoiler-span\" class. On click with no parameters or on demand when called with a parameter\r\n * @param {string} param \"hide\", \"show\" or none (optional)\r\n */\r\nfunction CheckboxSpoilersToggle(param = \"none\") {\r\n\r\n let checkboxId = document.getElementById(\"checkbox-spoilers\");\r\n let allClassElements = document.querySelectorAll(\".spoiler-span\");\r\n let allClassElementsRed = document.querySelectorAll(\".spoiler-red\");\r\n let length = allClassElements.length;\r\n let lengthRed = allClassElementsRed.length;\r\n\r\n switch (param) {\r\n case \"hide\":\r\n for (let i = 0; i < length; i++) {\r\n allClassElements[i].classList.add(\"blurred\");\r\n }\r\n\r\n for (let i = 0; i < lengthRed; i++) {\r\n allClassElementsRed[i].classList.add(\"blurred\");\r\n }\r\n\r\n checkboxId.value = \"spoilers-off\";\r\n checkboxId.checked = false;\r\n\r\n // remember this choice for subsequent page visits and browser restarts\r\n if (StorageAvailable('localStorage')) {\r\n localStorage.setItem(\"hkCheckboxSpoilers\", \"unchecked\");\r\n }\r\n break;\r\n\r\n case \"show\":\r\n for (let i = 0; i < length; i++) {\r\n allClassElements[i].classList.remove(\"blurred\");\r\n }\r\n\r\n for (let i = 0; i < lengthRed; i++) {\r\n allClassElementsRed[i].classList.remove(\"blurred\");\r\n }\r\n\r\n checkboxId.value = \"spoilers-on\";\r\n checkboxId.checked = true;\r\n\r\n // remember this choice for subsequent page visits and browser restarts\r\n if (StorageAvailable('localStorage')) {\r\n localStorage.setItem(\"hkCheckboxSpoilers\", \"checked\");\r\n }\r\n break;\r\n\r\n default:\r\n // This runs when the checkbox is not checked\r\n if (checkboxId.checked === false) {\r\n\r\n for (let i = 0; i < length; i++) {\r\n allClassElements[i].classList.add(\"blurred\");\r\n }\r\n\r\n for (let i = 0; i < lengthRed; i++) {\r\n allClassElementsRed[i].classList.add(\"blurred\");\r\n }\r\n\r\n checkboxId.value = \"spoilers-off\";\r\n\r\n // remember this choice for subsequent page visits and browser restarts\r\n if (StorageAvailable('localStorage')) {\r\n localStorage.setItem(\"hkCheckboxSpoilers\", \"unchecked\");\r\n }\r\n break;\r\n }\r\n // This runs when the checkbox is checked\r\n else {\r\n for (let i = 0; i < length; i++) {\r\n allClassElements[i].classList.remove(\"blurred\");\r\n }\r\n\r\n for (let i = 0; i < lengthRed; i++) {\r\n allClassElementsRed[i].classList.remove(\"blurred\");\r\n }\r\n\r\n checkboxId.value = \"spoilers-on\";\r\n\r\n // remember this choice for subsequent page visits and browser restarts\r\n if (StorageAvailable('localStorage')) {\r\n localStorage.setItem(\"hkCheckboxSpoilers\", \"checked\");\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Hides all other tabs, except the one which button was clicked (shows only the chosen tab)\r\n * @param {String} clickedButton The click target (button clicked)\r\n */\r\n function PageSwitchTab(clickedButton) {\r\n\r\n let sectionList = document.querySelectorAll(\".large-section\");\r\n let buttonList = document.querySelectorAll(\".tab-switch\");\r\n\r\n /* Make Active Tab Visible */\r\n for (let i = 0, length = sectionList.length; i < length; i++) {\r\n\r\n /* Other tabs except the clicked one */\r\n if (sectionList[i].id !== `tab-${clickedButton}`) {\r\n\r\n if (!sectionList[i].classList.contains(\"hidden\")) {\r\n sectionList[i].classList.add(\"hidden\");\r\n }\r\n }\r\n /* The clicked tab */\r\n else {\r\n\r\n if (sectionList[i].classList.contains(\"hidden\")) {\r\n sectionList[i].classList.remove(\"hidden\");\r\n }\r\n }\r\n }\r\n\r\n /* Make Active Button stand out */\r\n for (let i = 0, length = buttonList.length; i < length; i++) {\r\n\r\n /* Other buttons except the clicked one */\r\n if (buttonList[i].id !== `button-switch-${clickedButton}`) {\r\n\r\n if (buttonList[i].classList.contains(\"tab-active\")) {\r\n buttonList[i].classList.remove(\"tab-active\");\r\n }\r\n }\r\n /* The clicked button */\r\n else {\r\n\r\n if (!buttonList[i].classList.contains(\"tab-active\")) {\r\n buttonList[i].classList.add(\"tab-active\");\r\n }\r\n }\r\n }\r\n\r\n /* remember this choice for subsequent page visits and browser restarts */\r\n if (StorageAvailable('localStorage')) {\r\n\r\n if (clickedButton) {\r\n localStorage.setItem(\"hkTabActive\", clickedButton);\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Detects whether Storage is both supported and available.\r\n * MDN WebDocs https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API/Using_the_Web_Storage_API#feature-detecting_localstorage\r\n * @param {Storage} type type of storage. Ex. \"localStorage\" or \"sessionStorage\"\r\n * @returns {Boolean}\r\n */\r\nfunction StorageAvailable(type) {\r\n var storage;\r\n try {\r\n storage = window[type];\r\n var x = '__storage_test__';\r\n storage.setItem(x, x);\r\n storage.removeItem(x);\r\n return true;\r\n } catch (e) {\r\n return e instanceof DOMException && (\r\n // everything except Firefox\r\n e.code === 22 ||\r\n // Firefox\r\n e.code === 1014 ||\r\n // test name field too, because code might not be present\r\n // everything except Firefox\r\n e.name === 'QuotaExceededError' ||\r\n // Firefox\r\n e.name === 'NS_ERROR_DOM_QUOTA_REACHED') &&\r\n // acknowledge QuotaExceededError only if there's something already stored\r\n (storage && storage.length !== 0);\r\n }\r\n}\r\n\r\n/**\r\n * Fills the innerHTML of a given HTML Element with provided contents\r\n * @param {string} elementId Element ID to update\r\n * @param {string} textFill Updated contents (innerHTML)\r\n */\r\nfunction FillInnerHTML(elementId, textFill) {\r\n\r\n const element = document.getElementById(elementId);\r\n element.innerHTML = textFill;\r\n}\r\n\r\n/**\r\n * Focuses, selects and copies to clipboard contents inside a clicked element. Includes optional tooltip update after the copying is done.\r\n * @param {MouseEvent} mouseEvent from the clicked element (AddEventListener)\r\n * @param {string} tooltipId Element ID of the tooltip to update\r\n * @param {string} tooltipFill Updated contents of the tooltip\r\n */\r\nfunction SelectCopyInputText(mouseEvent, tooltipId = \"\", tooltipFill = \"\") {\r\n\r\n const element = document.getElementById(mouseEvent.target.id);\r\n\r\n // this prevents the un-selected effect after clicking the second time (clears all selection first)\r\n if (window.getSelection) {\r\n window.getSelection().removeAllRanges();\r\n }\r\n\r\n element.focus(); // best to focus the element first before selecting\r\n element.select();\r\n element.setSelectionRange(0, 99999); // for mobile devices\r\n\r\n // Copy the text inside the text field to clipboard\r\n document.execCommand(\"copy\");\r\n\r\n // optional tooltip showing\r\n if (tooltipFill.length && tooltipId.length) FillInnerHTML(tooltipId, tooltipFill);\r\n}\r\n\r\nfunction FileNameFormat(file, nameLength, beginLength, endLength) {\r\n\r\n var fileName = file.name;\r\n\r\n /* Shorten the file name if too long */\r\n if (fileName.length > nameLength) {\r\n\r\n let begin = fileName.slice(0, beginLength); // take X characters from the beginning (0)\r\n let end = fileName.slice(-endLength); // take X characters from the end (-)\r\n fileName = `${begin}..${end}`;\r\n }\r\n\r\n return fileName;\r\n}\r\n\r\nfunction FileDateFormat(file) {\r\n\r\n var fileDate = new Date(file.lastModified);\r\n\r\n var year = fileDate.getFullYear();\r\n var month = fileDate.getMonth() + 1;\r\n var day = fileDate.getDate();\r\n var hour = fileDate.getHours();\r\n var minutes = fileDate.getMinutes();\r\n /* var seconds = fileDate.getSeconds(); */\r\n\r\n if (month < 10) month = \"0\" + month;\r\n if (day < 10) day = \"0\" + day;\r\n if (hour < 10) hour = \"0\" + hour;\r\n if (minutes < 10) minutes = \"0\" + minutes;\r\n /* if (seconds < 10) seconds = \"0\" + seconds; */\r\n\r\n return `${year}.${month}.${day} ${hour}:${minutes}`;\r\n}\r\n\r\n/* ========================== Event Listeners ========================== */\r\n\r\n/* --------------- Toggle visibility of scroll arrow ------------------ */\r\n\r\ndocument.addEventListener(\"scroll\", () => {\r\n\r\n TogglePageScrollElement(\r\n /* the document element root () */\r\n ROOT,\r\n /* Which element to toggle visibility */\r\n SCROLL_BUTTON,\r\n /* How far the user has to scroll to show the element */\r\n 0.1);\r\n});\r\n\r\n/* ---------------- Scroll to top when clicked ------------------- */\r\n\r\nSCROLL_BUTTON.addEventListener(\"click\", () => {\r\n ScrollToElement(ROOT);\r\n});\r\n\r\n/* ------------- Auto select & copy to clipboard when the save file location input text is clicked once ------------- */\r\n\r\ndocument.getElementById(\"save-location-input\").addEventListener(\"click\", (e) => {\r\n\r\n let tooltip = document.getElementById(\"save-location-input-tooltip\");\r\n\r\n SelectCopyInputText(e, \"save-location-input-tooltip\", \"Copied save files location to clipboard\");\r\n\r\n /* make sure that the tooltip is centered */\r\n tooltip.style.marginLeft = `-${tooltip.offsetWidth / 2}px`;\r\n}, false);\r\n\r\n/* -------------- Switch text back to the default on mouse out -------------- */\r\n\r\ndocument.getElementById(\"save-location-input\").addEventListener(\"mouseout\", () => {\r\n\r\n let tooltip = document.getElementById(\"save-location-input-tooltip\");\r\n\r\n /* change the text and center only when the text was different */\r\n if (tooltip.innerHTML !== \"Click once to copy to clipboard\") {\r\n \r\n FillInnerHTML(\"save-location-input-tooltip\", \"Click once to copy to clipboard\");\r\n \r\n /* make sure that the tooltip is centered */\r\n tooltip.style.marginLeft = `-${tooltip.offsetWidth / 2}px`;\r\n }\r\n}, false);\r\n\r\n/* ------------- Checkbox functions ---------------------- */\r\n\r\ndocument.getElementById(\"checkbox-hints\").addEventListener(\"click\", CheckboxHintsToggle, false);\r\ndocument.getElementById(\"checkbox-spoilers\").addEventListener(\"click\", CheckboxSpoilersToggle, false);\r\n\r\n/* ------------ Drag & drop file to the window -------------- */\r\n\r\nwindow.addEventListener('dragover', (event) => {\r\n\r\n event.stopPropagation();\r\n event.preventDefault();\r\n\r\n // Style the drag-and-drop as a \"copy file\" operation.\r\n event.dataTransfer.dropEffect = 'copy';\r\n});\r\n\r\nwindow.addEventListener('drop', (event) => {\r\n\r\n event.stopPropagation();\r\n event.preventDefault();\r\n\r\n const dt = event.dataTransfer;\r\n\r\n /* Launch save file analyzing */\r\n LoadSaveFile(dt, performance.now());\r\n\r\n var label = document.getElementById(\"save-area-file\").nextElementSibling;\r\n var labelInitialText = label.innerHTML;\r\n\r\n /* Shorten the file name if longer than 16 characters. Display first 10 characters and last 4. */\r\n var fileName = FileNameFormat(dt.files[0], 16, 10, 4);\r\n\r\n /* Display a custom formatted last modified date. */\r\n var fileDate = FileDateFormat(dt.files[0]);\r\n\r\n /* Display the save file name and date on the button */\r\n if (fileName) {\r\n label.innerHTML = `${SYMBOL_FILE}${fileName}
`;\r\n } else {\r\n label.innerHTML = labelInitialText;\r\n }\r\n});\r\n\r\n/* ---------- Monitor file input change and show the file name when file is loaded ----------- */\r\n\r\ndocument.getElementById(\"save-area-file\").addEventListener(\"change\", (event) => {\r\n\r\n var label = document.getElementById(\"save-area-file\").nextElementSibling;\r\n var labelInitialText = label.innerHTML;\r\n\r\n /* Shorten the file name if longer than 16 characters. Display first 10 characters and last 4. */\r\n var fileName = FileNameFormat(event.target.files[0], 16, 10, 4);\r\n\r\n /* Display a custom formatted last modified date. */\r\n var fileDate = FileDateFormat(event.target.files[0]);\r\n\r\n if (fileName) {\r\n label.innerHTML = `${SYMBOL_FILE}${fileName}
`;\r\n } else {\r\n label.innerHTML = labelInitialText;\r\n }\r\n});\r\n\r\n/* -------- Clean the text area and file input from leftover save file if present (Firefox especially) -------- */\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", () => {\r\n\r\n (async () => {\r\n document.getElementById(\"save-area\").value = \"\";\r\n document.getElementById(\"save-area-file\").value = \"\";\r\n })();\r\n});\r\n\r\n/* ------------------------- Exports ------------------------------- */\r\n\r\nexport {\r\n GenerateInnerHTML,\r\n AppendHTML,\r\n CheckboxHintsToggle,\r\n CheckboxSpoilersToggle,\r\n StorageAvailable\r\n};","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.es/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n","module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","// eslint-disable-next-line es/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';\n","'use strict';\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar uid = require('../internals/uid');\n\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar Uint8ClampedArray = global.Uint8ClampedArray;\nvar Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;\nvar TypedArray = Int8Array && getPrototypeOf(Int8Array);\nvar TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);\nvar ObjectPrototype = Object.prototype;\nvar isPrototypeOf = ObjectPrototype.isPrototypeOf;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');\n// Fixing native typed arrays in Opera Presto crashes the browser, see #595\nvar NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';\nvar TYPED_ARRAY_TAG_REQIRED = false;\nvar NAME;\n\nvar TypedArrayConstructorsList = {\n Int8Array: 1,\n Uint8Array: 1,\n Uint8ClampedArray: 1,\n Int16Array: 2,\n Uint16Array: 2,\n Int32Array: 4,\n Uint32Array: 4,\n Float32Array: 4,\n Float64Array: 8\n};\n\nvar BigIntArrayConstructorsList = {\n BigInt64Array: 8,\n BigUint64Array: 8\n};\n\nvar isView = function isView(it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return klass === 'DataView'\n || has(TypedArrayConstructorsList, klass)\n || has(BigIntArrayConstructorsList, klass);\n};\n\nvar isTypedArray = function (it) {\n if (!isObject(it)) return false;\n var klass = classof(it);\n return has(TypedArrayConstructorsList, klass)\n || has(BigIntArrayConstructorsList, klass);\n};\n\nvar aTypedArray = function (it) {\n if (isTypedArray(it)) return it;\n throw TypeError('Target is not a typed array');\n};\n\nvar aTypedArrayConstructor = function (C) {\n if (setPrototypeOf) {\n if (isPrototypeOf.call(TypedArray, C)) return C;\n } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME)) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) {\n return C;\n }\n } throw TypeError('Target is not a typed array constructor');\n};\n\nvar exportTypedArrayMethod = function (KEY, property, forced) {\n if (!DESCRIPTORS) return;\n if (forced) for (var ARRAY in TypedArrayConstructorsList) {\n var TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) try {\n delete TypedArrayConstructor.prototype[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArrayPrototype[KEY] || forced) {\n redefine(TypedArrayPrototype, KEY, forced ? property\n : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);\n }\n};\n\nvar exportTypedArrayStaticMethod = function (KEY, property, forced) {\n var ARRAY, TypedArrayConstructor;\n if (!DESCRIPTORS) return;\n if (setPrototypeOf) {\n if (forced) for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) try {\n delete TypedArrayConstructor[KEY];\n } catch (error) { /* empty */ }\n }\n if (!TypedArray[KEY] || forced) {\n // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable\n try {\n return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);\n } catch (error) { /* empty */ }\n } else return;\n }\n for (ARRAY in TypedArrayConstructorsList) {\n TypedArrayConstructor = global[ARRAY];\n if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {\n redefine(TypedArrayConstructor, KEY, property);\n }\n }\n};\n\nfor (NAME in TypedArrayConstructorsList) {\n if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false;\n}\n\n// WebKit bug - typed arrays constructors prototype is Object.prototype\nif (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) {\n // eslint-disable-next-line no-shadow -- safe\n TypedArray = function TypedArray() {\n throw TypeError('Incorrect invocation');\n };\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);\n }\n}\n\nif (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {\n TypedArrayPrototype = TypedArray.prototype;\n if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {\n if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);\n }\n}\n\n// WebKit bug - one more object in Uint8ClampedArray prototype chain\nif (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {\n setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);\n}\n\nif (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {\n TYPED_ARRAY_TAG_REQIRED = true;\n defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {\n return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;\n } });\n for (NAME in TypedArrayConstructorsList) if (global[NAME]) {\n createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);\n }\n}\n\nmodule.exports = {\n NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,\n TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,\n aTypedArray: aTypedArray,\n aTypedArrayConstructor: aTypedArrayConstructor,\n exportTypedArrayMethod: exportTypedArrayMethod,\n exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,\n isView: isView,\n isTypedArray: isTypedArray,\n TypedArray: TypedArray,\n TypedArrayPrototype: TypedArrayPrototype\n};\n","'use strict';\nvar global = require('../internals/global');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-native');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefineAll = require('../internals/redefine-all');\nvar fails = require('../internals/fails');\nvar anInstance = require('../internals/an-instance');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toIndex = require('../internals/to-index');\nvar IEEE754 = require('../internals/ieee754');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar arrayFill = require('../internals/array-fill');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar ARRAY_BUFFER = 'ArrayBuffer';\nvar DATA_VIEW = 'DataView';\nvar PROTOTYPE = 'prototype';\nvar WRONG_LENGTH = 'Wrong length';\nvar WRONG_INDEX = 'Wrong index';\nvar NativeArrayBuffer = global[ARRAY_BUFFER];\nvar $ArrayBuffer = NativeArrayBuffer;\nvar $DataView = global[DATA_VIEW];\nvar $DataViewPrototype = $DataView && $DataView[PROTOTYPE];\nvar ObjectPrototype = Object.prototype;\nvar RangeError = global.RangeError;\n\nvar packIEEE754 = IEEE754.pack;\nvar unpackIEEE754 = IEEE754.unpack;\n\nvar packInt8 = function (number) {\n return [number & 0xFF];\n};\n\nvar packInt16 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF];\n};\n\nvar packInt32 = function (number) {\n return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];\n};\n\nvar unpackInt32 = function (buffer) {\n return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];\n};\n\nvar packFloat32 = function (number) {\n return packIEEE754(number, 23, 4);\n};\n\nvar packFloat64 = function (number) {\n return packIEEE754(number, 52, 8);\n};\n\nvar addGetter = function (Constructor, key) {\n defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });\n};\n\nvar get = function (view, count, index, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = bytes.slice(start, start + count);\n return isLittleEndian ? pack : pack.reverse();\n};\n\nvar set = function (view, count, index, conversion, value, isLittleEndian) {\n var intIndex = toIndex(index);\n var store = getInternalState(view);\n if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);\n var bytes = getInternalState(store.buffer).bytes;\n var start = intIndex + store.byteOffset;\n var pack = conversion(+value);\n for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];\n};\n\nif (!NATIVE_ARRAY_BUFFER) {\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer, ARRAY_BUFFER);\n var byteLength = toIndex(length);\n setInternalState(this, {\n bytes: arrayFill.call(new Array(byteLength), 0),\n byteLength: byteLength\n });\n if (!DESCRIPTORS) this.byteLength = byteLength;\n };\n\n $DataView = function DataView(buffer, byteOffset, byteLength) {\n anInstance(this, $DataView, DATA_VIEW);\n anInstance(buffer, $ArrayBuffer, DATA_VIEW);\n var bufferLength = getInternalState(buffer).byteLength;\n var offset = toInteger(byteOffset);\n if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');\n byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);\n if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);\n setInternalState(this, {\n buffer: buffer,\n byteLength: byteLength,\n byteOffset: offset\n });\n if (!DESCRIPTORS) {\n this.buffer = buffer;\n this.byteLength = byteLength;\n this.byteOffset = offset;\n }\n };\n\n if (DESCRIPTORS) {\n addGetter($ArrayBuffer, 'byteLength');\n addGetter($DataView, 'buffer');\n addGetter($DataView, 'byteLength');\n addGetter($DataView, 'byteOffset');\n }\n\n redefineAll($DataView[PROTOTYPE], {\n getInt8: function getInt8(byteOffset) {\n return get(this, 1, byteOffset)[0] << 24 >> 24;\n },\n getUint8: function getUint8(byteOffset) {\n return get(this, 1, byteOffset)[0];\n },\n getInt16: function getInt16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return (bytes[1] << 8 | bytes[0]) << 16 >> 16;\n },\n getUint16: function getUint16(byteOffset /* , littleEndian */) {\n var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);\n return bytes[1] << 8 | bytes[0];\n },\n getInt32: function getInt32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));\n },\n getUint32: function getUint32(byteOffset /* , littleEndian */) {\n return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;\n },\n getFloat32: function getFloat32(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);\n },\n getFloat64: function getFloat64(byteOffset /* , littleEndian */) {\n return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);\n },\n setInt8: function setInt8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setUint8: function setUint8(byteOffset, value) {\n set(this, 1, byteOffset, packInt8, value);\n },\n setInt16: function setInt16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint16: function setUint16(byteOffset, value /* , littleEndian */) {\n set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setInt32: function setInt32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setUint32: function setUint32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {\n set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);\n },\n setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {\n set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);\n }\n });\n} else {\n /* eslint-disable no-new -- required for testing */\n if (!fails(function () {\n NativeArrayBuffer(1);\n }) || !fails(function () {\n new NativeArrayBuffer(-1);\n }) || fails(function () {\n new NativeArrayBuffer();\n new NativeArrayBuffer(1.5);\n new NativeArrayBuffer(NaN);\n return NativeArrayBuffer.name != ARRAY_BUFFER;\n })) {\n /* eslint-enable no-new -- required for testing */\n $ArrayBuffer = function ArrayBuffer(length) {\n anInstance(this, $ArrayBuffer);\n return new NativeArrayBuffer(toIndex(length));\n };\n var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];\n for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {\n if (!((key = keys[j++]) in $ArrayBuffer)) {\n createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);\n }\n }\n ArrayBufferPrototype.constructor = $ArrayBuffer;\n }\n\n // WebKit bug - the same parent prototype for typed arrays and data view\n if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {\n setPrototypeOf($DataViewPrototype, ObjectPrototype);\n }\n\n // iOS Safari 7.x bug\n var testView = new $DataView(new $ArrayBuffer(2));\n var $setInt8 = $DataViewPrototype.setInt8;\n testView.setInt8(0, 2147483648);\n testView.setInt8(1, 2147483649);\n if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {\n setInt8: function setInt8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n },\n setUint8: function setUint8(byteOffset, value) {\n $setInt8.call(this, byteOffset, value << 24 >> 24);\n }\n }, { unsafe: true });\n}\n\nsetToStringTag($ArrayBuffer, ARRAY_BUFFER);\nsetToStringTag($DataView, DATA_VIEW);\n\nmodule.exports = {\n ArrayBuffer: $ArrayBuffer,\n DataView: $DataView\n};\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\n// eslint-disable-next-line es/no-array-prototype-copywithin -- safe\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else delete O[to];\n to += inc;\n from += inc;\n } return O;\n};\n","'use strict';\nvar toObject = require('../internals/to-object');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.fill` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.fill\nmodule.exports = function fill(value /* , start = 0, end = @length */) {\n var O = toObject(this);\n var length = toLength(O.length);\n var argumentsLength = arguments.length;\n var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);\n var end = argumentsLength > 2 ? arguments[2] : undefined;\n var endPos = end === undefined ? length : toAbsoluteIndex(end, length);\n while (endPos > index) O[index++] = value;\n return O;\n};\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.es/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = iteratorMethod.call(O);\n next = iterator.next;\n result = new C();\n for (;!(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = toLength(O.length);\n result = new C(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ findLast, findLastIndex }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_FIND_INDEX = TYPE == 6;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var index = toLength(self.length);\n var value, result;\n while (index-- > 0) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (result) switch (TYPE) {\n case 5: return value; // find\n case 6: return index; // findIndex\n }\n }\n return IS_FIND_INDEX ? -1 : undefined;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.findLast` method\n // https://github.com/tc39/proposal-array-find-from-last\n findLast: createMethod(5),\n // `Array.prototype.findLastIndex` method\n // https://github.com/tc39/proposal-array-find-from-last\n findLastIndex: createMethod(6)\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_OUT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push.call(target, value); // filterOut\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterOut` method\n // https://github.com/tc39/proposal-array-filtering\n filterOut: createMethod(7)\n};\n","'use strict';\n/* eslint-disable es/no-array-prototype-lastindexof -- safe */\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar min = Math.min;\nvar $lastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return $lastIndexOf.apply(this, arguments) || 0;\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var index = length - 1;\n if (arguments.length > 1) index = min(index, toInteger(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n return -1;\n} : $lastIndexOf;\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n","var aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n","// TODO: use something more complex like timsort?\nvar floor = Math.floor;\n\nvar mergeSort = function (array, comparefn) {\n var length = array.length;\n var middle = floor(length / 2);\n return length < 8 ? insertionSort(array, comparefn) : merge(\n mergeSort(array.slice(0, middle), comparefn),\n mergeSort(array.slice(middle), comparefn),\n comparefn\n );\n};\n\nvar insertionSort = function (array, comparefn) {\n var length = array.length;\n var i = 1;\n var element, j;\n\n while (i < length) {\n j = i;\n element = array[i];\n while (j && comparefn(array[j - 1], element) > 0) {\n array[j] = array[--j];\n }\n if (j !== i++) array[j] = element;\n } return array;\n};\n\nvar merge = function (left, right, comparefn) {\n var llength = left.length;\n var rlength = right.length;\n var lindex = 0;\n var rindex = 0;\n var result = [];\n\n while (lindex < llength || rindex < rlength) {\n if (lindex < llength && rindex < rlength) {\n result.push(comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]);\n } else {\n result.push(lindex < llength ? left[lindex++] : right[rindex++]);\n }\n } return result;\n};\n\nmodule.exports = mergeSort;\n","var isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n","'use strict';\nvar toLength = require('../internals/to-length');\nvar toObject = require('../internals/to-object');\nvar getBuiltIn = require('../internals/get-built-in');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.uniqueBy` method\n// https://github.com/tc39/proposal-array-unique\nmodule.exports = function uniqueBy(resolver) {\n var that = toObject(this);\n var length = toLength(that.length);\n var result = arraySpeciesCreate(that, 0);\n var Map = getBuiltIn('Map');\n var map = new Map();\n var resolverFunction, index, item, key;\n if (typeof resolver == 'function') resolverFunction = resolver;\n else if (resolver == null) resolverFunction = function (value) {\n return value;\n };\n else throw new TypeError('Incorrect resolver!');\n for (index = 0; index < length; index++) {\n item = that[index];\n key = resolverFunction(item);\n if (!map.has(key)) map.set(key, item);\n }\n map.forEach(function (value) {\n push.call(result, value);\n });\n return result;\n};\n","'use strict';\nvar path = require('../internals/path');\nvar aFunction = require('../internals/a-function');\nvar anObject = require('../internals/an-object');\nvar create = require('../internals/object-create');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefineAll = require('../internals/redefine-all');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar InternalStateModule = require('../internals/internal-state');\nvar getBuiltIn = require('../internals/get-built-in');\n\nvar Promise = getBuiltIn('Promise');\n\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.get;\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nvar $return = function (value) {\n var iterator = getInternalState(this).iterator;\n var $$return = iterator['return'];\n return $$return === undefined\n ? Promise.resolve({ done: true, value: value })\n : anObject($$return.call(iterator, value));\n};\n\nvar $throw = function (value) {\n var iterator = getInternalState(this).iterator;\n var $$throw = iterator['throw'];\n return $$throw === undefined\n ? Promise.reject(value)\n : $$throw.call(iterator, value);\n};\n\nmodule.exports = function (nextHandler, IS_ITERATOR) {\n var AsyncIteratorProxy = function AsyncIterator(state) {\n state.next = aFunction(state.iterator.next);\n state.done = false;\n setInternalState(this, state);\n };\n\n AsyncIteratorProxy.prototype = redefineAll(create(path.AsyncIterator.prototype), {\n next: function next(arg) {\n var state = getInternalState(this);\n if (state.done) return Promise.resolve({ done: true, value: undefined });\n try {\n return Promise.resolve(anObject(nextHandler.call(state, arg, Promise)));\n } catch (error) {\n return Promise.reject(error);\n }\n },\n 'return': $return,\n 'throw': $throw\n });\n\n if (!IS_ITERATOR) {\n createNonEnumerableProperty(AsyncIteratorProxy.prototype, TO_STRING_TAG, 'Generator');\n }\n\n return AsyncIteratorProxy;\n};\n","'use strict';\n// https://github.com/tc39/proposal-iterator-helpers\nvar aFunction = require('../internals/a-function');\nvar anObject = require('../internals/an-object');\nvar getBuiltIn = require('../internals/get-built-in');\n\nvar Promise = getBuiltIn('Promise');\nvar push = [].push;\n\nvar createMethod = function (TYPE) {\n var IS_TO_ARRAY = TYPE == 0;\n var IS_FOR_EACH = TYPE == 1;\n var IS_EVERY = TYPE == 2;\n var IS_SOME = TYPE == 3;\n return function (iterator, fn) {\n anObject(iterator);\n var next = aFunction(iterator.next);\n var array = IS_TO_ARRAY ? [] : undefined;\n if (!IS_TO_ARRAY) aFunction(fn);\n\n return new Promise(function (resolve, reject) {\n var closeIteration = function (method, argument) {\n try {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) {\n return Promise.resolve(returnMethod.call(iterator)).then(function () {\n method(argument);\n }, function (error) {\n reject(error);\n });\n }\n } catch (error2) {\n return reject(error2);\n } method(argument);\n };\n\n var onError = function (error) {\n closeIteration(reject, error);\n };\n\n var loop = function () {\n try {\n Promise.resolve(anObject(next.call(iterator))).then(function (step) {\n try {\n if (anObject(step).done) {\n resolve(IS_TO_ARRAY ? array : IS_SOME ? false : IS_EVERY || undefined);\n } else {\n var value = step.value;\n if (IS_TO_ARRAY) {\n push.call(array, value);\n loop();\n } else {\n Promise.resolve(fn(value)).then(function (result) {\n if (IS_FOR_EACH) {\n loop();\n } else if (IS_EVERY) {\n result ? loop() : closeIteration(resolve, false);\n } else {\n result ? closeIteration(resolve, IS_SOME || value) : loop();\n }\n }, onError);\n }\n }\n } catch (error) { onError(error); }\n }, onError);\n } catch (error2) { onError(error2); }\n };\n\n loop();\n });\n };\n};\n\nmodule.exports = {\n toArray: createMethod(0),\n forEach: createMethod(1),\n every: createMethod(2),\n some: createMethod(3),\n find: createMethod(4)\n};\n","var global = require('../internals/global');\nvar shared = require('../internals/shared-store');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar has = require('../internals/has');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar USE_FUNCTION_CONSTRUCTOR = 'USE_FUNCTION_CONSTRUCTOR';\nvar ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');\nvar AsyncIterator = global.AsyncIterator;\nvar PassedAsyncIteratorPrototype = shared.AsyncIteratorPrototype;\nvar AsyncIteratorPrototype, prototype;\n\nif (!IS_PURE) {\n if (PassedAsyncIteratorPrototype) {\n AsyncIteratorPrototype = PassedAsyncIteratorPrototype;\n } else if (typeof AsyncIterator == 'function') {\n AsyncIteratorPrototype = AsyncIterator.prototype;\n } else if (shared[USE_FUNCTION_CONSTRUCTOR] || global[USE_FUNCTION_CONSTRUCTOR]) {\n try {\n // eslint-disable-next-line no-new-func -- we have no alternatives without usage of modern syntax\n prototype = getPrototypeOf(getPrototypeOf(getPrototypeOf(Function('return async function*(){}()')())));\n if (getPrototypeOf(prototype) === Object.prototype) AsyncIteratorPrototype = prototype;\n } catch (error) { /* empty */ }\n }\n}\n\nif (!AsyncIteratorPrototype) AsyncIteratorPrototype = {};\n\nif (!has(AsyncIteratorPrototype, ASYNC_ITERATOR)) {\n createNonEnumerableProperty(AsyncIteratorPrototype, ASYNC_ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = AsyncIteratorPrototype;\n","var anObject = require('../internals/an-object');\nvar iteratorClose = require('../internals/iterator-close');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n } catch (error) {\n iteratorClose(iterator);\n throw error;\n }\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\n\n// https://github.com/tc39/collection-methods\nmodule.exports = function (/* ...elements */) {\n var set = anObject(this);\n var adder = aFunction(set.add);\n for (var k = 0, len = arguments.length; k < len; k++) {\n adder.call(set, arguments[k]);\n }\n return set;\n};\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\n\n// https://github.com/tc39/collection-methods\nmodule.exports = function (/* ...elements */) {\n var collection = anObject(this);\n var remover = aFunction(collection['delete']);\n var allDeleted = true;\n var wasDeleted;\n for (var k = 0, len = arguments.length; k < len; k++) {\n wasDeleted = remover.call(collection, arguments[k]);\n allDeleted = allDeleted && wasDeleted;\n }\n return !!allDeleted;\n};\n","'use strict';\n// https://tc39.github.io/proposal-setmap-offrom/\nvar aFunction = require('../internals/a-function');\nvar bind = require('../internals/function-bind-context');\nvar iterate = require('../internals/iterate');\n\nmodule.exports = function from(source /* , mapFn, thisArg */) {\n var length = arguments.length;\n var mapFn = length > 1 ? arguments[1] : undefined;\n var mapping, array, n, boundFunction;\n aFunction(this);\n mapping = mapFn !== undefined;\n if (mapping) aFunction(mapFn);\n if (source == undefined) return new this();\n array = [];\n if (mapping) {\n n = 0;\n boundFunction = bind(mapFn, length > 2 ? arguments[2] : undefined, 2);\n iterate(source, function (nextItem) {\n array.push(boundFunction(nextItem, n++));\n });\n } else {\n iterate(source, array.push, { that: array });\n }\n return new this(array);\n};\n","'use strict';\n// https://tc39.github.io/proposal-setmap-offrom/\nmodule.exports = function of() {\n var length = arguments.length;\n var A = new Array(length);\n while (length--) A[length] = arguments[length];\n return new this(A);\n};\n","'use strict';\nvar defineProperty = require('../internals/object-define-property').f;\nvar create = require('../internals/object-create');\nvar redefineAll = require('../internals/redefine-all');\nvar bind = require('../internals/function-bind-context');\nvar anInstance = require('../internals/an-instance');\nvar iterate = require('../internals/iterate');\nvar defineIterator = require('../internals/define-iterator');\nvar setSpecies = require('../internals/set-species');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fastKey = require('../internals/internal-metadata').fastKey;\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n index: create(null),\n first: undefined,\n last: undefined,\n size: 0\n });\n if (!DESCRIPTORS) that.size = 0;\n if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n });\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n var previous, index;\n // change existing entry\n if (entry) {\n entry.value = value;\n // create new entry\n } else {\n state.last = entry = {\n index: index = fastKey(key, true),\n key: key,\n value: value,\n previous: previous = state.last,\n next: undefined,\n removed: false\n };\n if (!state.first) state.first = entry;\n if (previous) previous.next = entry;\n if (DESCRIPTORS) state.size++;\n else that.size++;\n // add to index\n if (index !== 'F') state.index[index] = entry;\n } return that;\n };\n\n var getEntry = function (that, key) {\n var state = getInternalState(that);\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return state.index[index];\n // frozen object case\n for (entry = state.first; entry; entry = entry.next) {\n if (entry.key == key) return entry;\n }\n };\n\n redefineAll(C.prototype, {\n // `{ Map, Set }.prototype.clear()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.clear\n // https://tc39.es/ecma262/#sec-set.prototype.clear\n clear: function clear() {\n var that = this;\n var state = getInternalState(that);\n var data = state.index;\n var entry = state.first;\n while (entry) {\n entry.removed = true;\n if (entry.previous) entry.previous = entry.previous.next = undefined;\n delete data[entry.index];\n entry = entry.next;\n }\n state.first = state.last = undefined;\n if (DESCRIPTORS) state.size = 0;\n else that.size = 0;\n },\n // `{ Map, Set }.prototype.delete(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.delete\n // https://tc39.es/ecma262/#sec-set.prototype.delete\n 'delete': function (key) {\n var that = this;\n var state = getInternalState(that);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.next;\n var prev = entry.previous;\n delete state.index[entry.index];\n entry.removed = true;\n if (prev) prev.next = next;\n if (next) next.previous = prev;\n if (state.first == entry) state.first = next;\n if (state.last == entry) state.last = prev;\n if (DESCRIPTORS) state.size--;\n else that.size--;\n } return !!entry;\n },\n // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.foreach\n // https://tc39.es/ecma262/#sec-set.prototype.foreach\n forEach: function forEach(callbackfn /* , that = undefined */) {\n var state = getInternalState(this);\n var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.next : state.first) {\n boundFunction(entry.value, entry.key, this);\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n }\n },\n // `{ Map, Set}.prototype.has(key)` methods\n // https://tc39.es/ecma262/#sec-map.prototype.has\n // https://tc39.es/ecma262/#sec-set.prototype.has\n has: function has(key) {\n return !!getEntry(this, key);\n }\n });\n\n redefineAll(C.prototype, IS_MAP ? {\n // `Map.prototype.get(key)` method\n // https://tc39.es/ecma262/#sec-map.prototype.get\n get: function get(key) {\n var entry = getEntry(this, key);\n return entry && entry.value;\n },\n // `Map.prototype.set(key, value)` method\n // https://tc39.es/ecma262/#sec-map.prototype.set\n set: function set(key, value) {\n return define(this, key === 0 ? 0 : key, value);\n }\n } : {\n // `Set.prototype.add(value)` method\n // https://tc39.es/ecma262/#sec-set.prototype.add\n add: function add(value) {\n return define(this, value = value === 0 ? 0 : value, value);\n }\n });\n if (DESCRIPTORS) defineProperty(C.prototype, 'size', {\n get: function () {\n return getInternalState(this).size;\n }\n });\n return C;\n },\n setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {\n var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';\n var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);\n var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);\n // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods\n // https://tc39.es/ecma262/#sec-map.prototype.entries\n // https://tc39.es/ecma262/#sec-map.prototype.keys\n // https://tc39.es/ecma262/#sec-map.prototype.values\n // https://tc39.es/ecma262/#sec-map.prototype-@@iterator\n // https://tc39.es/ecma262/#sec-set.prototype.entries\n // https://tc39.es/ecma262/#sec-set.prototype.keys\n // https://tc39.es/ecma262/#sec-set.prototype.values\n // https://tc39.es/ecma262/#sec-set.prototype-@@iterator\n defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {\n setInternalState(this, {\n type: ITERATOR_NAME,\n target: iterated,\n state: getInternalCollectionState(iterated),\n kind: kind,\n last: undefined\n });\n }, function () {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var entry = state.last;\n // revert to the last existing entry\n while (entry && entry.removed) entry = entry.previous;\n // get next entry\n if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {\n // or finish the iteration\n state.target = undefined;\n return { value: undefined, done: true };\n }\n // return step by kind\n if (kind == 'keys') return { value: entry.key, done: false };\n if (kind == 'values') return { value: entry.value, done: false };\n return { value: [entry.key, entry.value], done: false };\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // `{ Map, Set }.prototype[@@species]` accessors\n // https://tc39.es/ecma262/#sec-get-map-@@species\n // https://tc39.es/ecma262/#sec-get-set-@@species\n setSpecies(CONSTRUCTOR_NAME);\n }\n};\n","'use strict';\nvar redefineAll = require('../internals/redefine-all');\nvar getWeakData = require('../internals/internal-metadata').getWeakData;\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar iterate = require('../internals/iterate');\nvar ArrayIterationModule = require('../internals/array-iteration');\nvar $has = require('../internals/has');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\nvar find = ArrayIterationModule.find;\nvar findIndex = ArrayIterationModule.findIndex;\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (store) {\n return store.frozen || (store.frozen = new UncaughtFrozenStore());\n};\n\nvar UncaughtFrozenStore = function () {\n this.entries = [];\n};\n\nvar findUncaughtFrozen = function (store, key) {\n return find(store.entries, function (it) {\n return it[0] === key;\n });\n};\n\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.entries.push([key, value]);\n },\n 'delete': function (key) {\n var index = findIndex(this.entries, function (it) {\n return it[0] === key;\n });\n if (~index) this.entries.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n id: id++,\n frozen: undefined\n });\n if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n });\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var data = getWeakData(anObject(key), true);\n if (data === true) uncaughtFrozenStore(state).set(key, value);\n else data[state.id] = value;\n return that;\n };\n\n redefineAll(C.prototype, {\n // `{ WeakMap, WeakSet }.prototype.delete(key)` methods\n // https://tc39.es/ecma262/#sec-weakmap.prototype.delete\n // https://tc39.es/ecma262/#sec-weakset.prototype.delete\n 'delete': function (key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state)['delete'](key);\n return data && $has(data, state.id) && delete data[state.id];\n },\n // `{ WeakMap, WeakSet }.prototype.has(key)` methods\n // https://tc39.es/ecma262/#sec-weakmap.prototype.has\n // https://tc39.es/ecma262/#sec-weakset.prototype.has\n has: function has(key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).has(key);\n return data && $has(data, state.id);\n }\n });\n\n redefineAll(C.prototype, IS_MAP ? {\n // `WeakMap.prototype.get(key)` method\n // https://tc39.es/ecma262/#sec-weakmap.prototype.get\n get: function get(key) {\n var state = getInternalState(this);\n if (isObject(key)) {\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).get(key);\n return data ? data[state.id] : undefined;\n }\n },\n // `WeakMap.prototype.set(key, value)` method\n // https://tc39.es/ecma262/#sec-weakmap.prototype.set\n set: function set(key, value) {\n return define(this, key, value);\n }\n } : {\n // `WeakSet.prototype.add(value)` method\n // https://tc39.es/ecma262/#sec-weakset.prototype.add\n add: function add(value) {\n return define(this, value, true);\n }\n });\n\n return C;\n }\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isObject = require('../internals/is-object');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n var ADDER = IS_MAP ? 'set' : 'add';\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var exported = {};\n\n var fixMethod = function (KEY) {\n var nativeMethod = NativePrototype[KEY];\n redefine(NativePrototype, KEY,\n KEY == 'add' ? function add(value) {\n nativeMethod.call(this, value === 0 ? 0 : value);\n return this;\n } : KEY == 'delete' ? function (key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'get' ? function get(key) {\n return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'has' ? function has(key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : function set(key, value) {\n nativeMethod.call(this, key === 0 ? 0 : key, value);\n return this;\n }\n );\n };\n\n var REPLACE = isForced(\n CONSTRUCTOR_NAME,\n typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n }))\n );\n\n if (REPLACE) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.REQUIRED = true;\n } else if (isForced(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n // eslint-disable-next-line no-new -- required for testing\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new NativeConstructor();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, Constructor, CONSTRUCTOR_NAME);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n // weak collections should not contains .clear method\n if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n }\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({ global: true, forced: Constructor != NativeConstructor }, exported);\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n return Constructor;\n};\n","// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nvar Map = require('../modules/es.map');\nvar WeakMap = require('../modules/es.weak-map');\nvar create = require('../internals/object-create');\nvar isObject = require('../internals/is-object');\n\nvar Node = function () {\n // keys\n this.object = null;\n this.symbol = null;\n // child nodes\n this.primitives = null;\n this.objectsByIndex = create(null);\n};\n\nNode.prototype.get = function (key, initializer) {\n return this[key] || (this[key] = initializer());\n};\n\nNode.prototype.next = function (i, it, IS_OBJECT) {\n var store = IS_OBJECT\n ? this.objectsByIndex[i] || (this.objectsByIndex[i] = new WeakMap())\n : this.primitives || (this.primitives = new Map());\n var entry = store.get(it);\n if (!entry) store.set(it, entry = new Node());\n return entry;\n};\n\nvar root = new Node();\n\nmodule.exports = function () {\n var active = root;\n var length = arguments.length;\n var i, it;\n // for prevent leaking, start from objects\n for (i = 0; i < length; i++) {\n if (isObject(it = arguments[i])) active = active.next(i, it, true);\n }\n if (this === Object && active === root) throw TypeError('Composite keys must contain a non-primitive component');\n for (i = 0; i < length; i++) {\n if (!isObject(it = arguments[i])) active = active.next(i, it, false);\n } return active;\n};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\nmodule.exports = function (METHOD_NAME) {\n var regexp = /./;\n try {\n '/./'[METHOD_NAME](regexp);\n } catch (error1) {\n try {\n regexp[MATCH] = false;\n return '/./'[METHOD_NAME](regexp);\n } catch (error2) { /* empty */ }\n } return false;\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\nvar quot = /\"/g;\n\n// `CreateHTML` abstract operation\n// https://tc39.es/ecma262/#sec-createhtml\nmodule.exports = function (string, tag, attribute, value) {\n var S = String(requireObjectCoercible(string));\n var p1 = '<' + tag;\n if (attribute !== '') p1 += ' ' + attribute + '=\"' + String(value).replace(quot, '"') + '\"';\n return p1 + '>' + S + '' + tag + '>';\n};\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPrimitive(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar padStart = require('../internals/string-pad').start;\n\nvar abs = Math.abs;\nvar DatePrototype = Date.prototype;\nvar getTime = DatePrototype.getTime;\nvar nativeDateToISOString = DatePrototype.toISOString;\n\n// `Date.prototype.toISOString` method implementation\n// https://tc39.es/ecma262/#sec-date.prototype.toisostring\n// PhantomJS / old WebKit fails here:\nmodule.exports = (fails(function () {\n return nativeDateToISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';\n}) || !fails(function () {\n nativeDateToISOString.call(new Date(NaN));\n})) ? function toISOString() {\n if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');\n var date = this;\n var year = date.getUTCFullYear();\n var milliseconds = date.getUTCMilliseconds();\n var sign = year < 0 ? '-' : year > 9999 ? '+' : '';\n return sign + padStart(abs(year), sign ? 6 : 4, 0) +\n '-' + padStart(date.getUTCMonth() + 1, 2, 0) +\n '-' + padStart(date.getUTCDate(), 2, 0) +\n 'T' + padStart(date.getUTCHours(), 2, 0) +\n ':' + padStart(date.getUTCMinutes(), 2, 0) +\n ':' + padStart(date.getUTCSeconds(), 2, 0) +\n '.' + padStart(milliseconds, 3, 0) +\n 'Z';\n} : nativeDateToISOString;\n","'use strict';\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\n// `Date.prototype[@@toPrimitive](hint)` method implementation\n// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive\nmodule.exports = function (hint) {\n if (hint !== 'string' && hint !== 'number' && hint !== 'default') {\n throw TypeError('Incorrect hint');\n } return toPrimitive(anObject(this), hint !== 'number');\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n","var path = require('../internals/path');\nvar has = require('../internals/has');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {\n value: wrappedWellKnownSymbolModule.f(NAME)\n });\n};\n","var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","var userAgent = require('../internals/engine-user-agent');\n\nvar firefox = userAgent.match(/firefox\\/(\\d+)/i);\n\nmodule.exports = !!firefox && +firefox[1];\n","module.exports = typeof window == 'object';\n","var UA = require('../internals/engine-user-agent');\n\nmodule.exports = /MSIE|Trident/.test(UA);\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent);\n","var classof = require('../internals/classof-raw');\nvar global = require('../internals/global');\n\nmodule.exports = classof(global.process) == 'process';\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /web0s(?!.*chrome)/i.test(userAgent);\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","var userAgent = require('../internals/engine-user-agent');\n\nvar webkit = userAgent.match(/AppleWebKit\\/(\\d+)\\./);\n\nmodule.exports = !!webkit && +webkit[1];\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n return ''.replace(re, '$