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IAAIqC,EAAkBC,SAASL,EAASM,QAAQC,YAC5CC,EAAiBH,SAASH,EAAQI,QAAQC,YAG9C,GAAIH,GAAmBI,EAAgB,CAEnC,IAAIC,EAAgBT,EAASpC,YACzB8C,EAAeR,EAAQtC,YAG3B,GAAIwC,EAAkBI,EAAgB,CAClC,IAAIG,EAAMP,EACVA,EAAkBI,EAClBA,EAAiBG,EACjBA,EAAMF,EACNA,EAAgBC,EAChBA,EAAeC,CACnB,CAGA,KAAgD,IAAzCvB,EAAcM,QAAQe,IACzBA,EAAgBA,EAAcG,MAAM,GAIxC,MAAoD,IAA7CxB,EAAcyB,YAAYH,IAC7BA,EAAeA,EAAaE,MAAM,GAAI,GAM1C,IAFA,IAAIE,EAAeL,EACfM,EA7DZ,SAAwBC,GAEpB,IADA,IAAIvB,EAASuB,EACc,UAApBvB,EAAOQ,UACVR,EAASA,EAAO1B,WAEpB,OAAO0B,CACX,CAuD0BwB,CAAejB,GACxBhF,EAAIoF,EAAkB,EAAIpF,EAAIwF,IAAmBxF,EAAG,CACzD,IAAIkG,EAActE,EAAO,kBAAmB,CAACrC,EAAiBG,EAAgBM,IAE9E8F,GAAgB,KADEC,EAAYI,cAAcD,GACTtD,WACvC,CAEA,OADAkD,EAAgB,KAAOJ,CAG3B,CACI,OAAOtB,CAEf,CAa4BgC,CAAyB/B,GAGzBA,EAAUU,WAE9B1E,EAAEgG,cAAcC,QAAQ,aAAclC,GACtC/D,EAAEkG,iBAEV,GA6OJ,CA3WA,CA2WEjC,OAAQP,S","sources":["webpack://sakurairo-scripts/./node_modules/.pnpm/highlightjs-line-numbers.js@2.8.0/node_modules/highlightjs-line-numbers.js/src/highlightjs-line-numbers.js"],"sourcesContent":["// jshint multistr:true\n\n(function (w, d) {\n 'use strict';\n\n var TABLE_NAME = 'hljs-ln',\n LINE_NAME = 'hljs-ln-line',\n CODE_BLOCK_NAME = 'hljs-ln-code',\n NUMBERS_BLOCK_NAME = 'hljs-ln-numbers',\n NUMBER_LINE_NAME = 'hljs-ln-n',\n DATA_ATTR_NAME = 'data-line-number',\n BREAK_LINE_REGEXP = /\\r\\n|\\r|\\n/g;\n\n if (w.hljs) {\n w.hljs.initLineNumbersOnLoad = initLineNumbersOnLoad;\n w.hljs.lineNumbersBlock = lineNumbersBlock;\n w.hljs.lineNumbersValue = lineNumbersValue;\n\n addStyles();\n } else {\n w.console.error('highlight.js not detected!');\n }\n\n function isHljsLnCodeDescendant(domElt) {\n var curElt = domElt;\n while (curElt) {\n if (curElt.className && curElt.className.indexOf('hljs-ln-code') !== -1) {\n return true;\n }\n curElt = curElt.parentNode;\n }\n return false;\n }\n\n function getHljsLnTable(hljsLnDomElt) {\n var curElt = hljsLnDomElt;\n while (curElt.nodeName !== 'TABLE') {\n curElt = curElt.parentNode;\n }\n return curElt;\n }\n\n // Function to workaround a copy issue with Microsoft Edge.\n // Due to hljs-ln wrapping the lines of code inside a
element wrapping the first line of selected code\n var tdAnchor = selection.anchorNode;\n while (tdAnchor.nodeName !== 'TD') {\n tdAnchor = tdAnchor.parentNode;\n }\n\n // get the | element wrapping the last line of selected code\n var tdFocus = selection.focusNode;\n while (tdFocus.nodeName !== 'TD') {\n tdFocus = tdFocus.parentNode;\n }\n\n // extract line numbers\n var firstLineNumber = parseInt(tdAnchor.dataset.lineNumber);\n var lastLineNumber = parseInt(tdFocus.dataset.lineNumber);\n\n // multi-lines copied case\n if (firstLineNumber != lastLineNumber) {\n\n var firstLineText = tdAnchor.textContent;\n var lastLineText = tdFocus.textContent;\n\n // if the selection was made backward, swap values\n if (firstLineNumber > lastLineNumber) {\n var tmp = firstLineNumber;\n firstLineNumber = lastLineNumber;\n lastLineNumber = tmp;\n tmp = firstLineText;\n firstLineText = lastLineText;\n lastLineText = tmp;\n }\n\n // discard not copied characters in first line\n while (selectionText.indexOf(firstLineText) !== 0) {\n firstLineText = firstLineText.slice(1);\n }\n\n // discard not copied characters in last line\n while (selectionText.lastIndexOf(lastLineText) === -1) {\n lastLineText = lastLineText.slice(0, -1);\n }\n\n // reconstruct and return the real copied text\n var selectedText = firstLineText;\n var hljsLnTable = getHljsLnTable(tdAnchor);\n for (var i = firstLineNumber + 1 ; i < lastLineNumber ; ++i) {\n var codeLineSel = format('.{0}[{1}=\"{2}\"]', [CODE_BLOCK_NAME, DATA_ATTR_NAME, i]);\n var codeLineElt = hljsLnTable.querySelector(codeLineSel);\n selectedText += '\\n' + codeLineElt.textContent;\n }\n selectedText += '\\n' + lastLineText;\n return selectedText;\n // single copied line case\n } else {\n return selectionText;\n }\n }\n\n // ensure consistent code copy/paste behavior across all browsers\n // (see https://github.com/wcoder/highlightjs-line-numbers.js/issues/51)\n document.addEventListener('copy', function(e) {\n // get current selection\n var selection = window.getSelection();\n // override behavior when one wants to copy line of codes\n if (isHljsLnCodeDescendant(selection.anchorNode)) {\n var selectionText;\n // workaround an issue with Microsoft Edge as copied line breaks\n // are removed otherwise from the selection string\n if (window.navigator.userAgent.indexOf('Edge') !== -1) {\n selectionText = edgeGetSelectedCodeLines(selection);\n } else {\n // other browsers can directly use the selection string\n selectionText = selection.toString();\n }\n e.clipboardData.setData('text/plain', selectionText);\n e.preventDefault();\n }\n });\n\n function addStyles () {\n var css = d.createElement('style');\n css.type = 'text/css';\n css.innerHTML = format(\n '.{0}{border-collapse:collapse}' +\n '.{0} td{padding:0}' +\n '.{1}:before{content:attr({2})}',\n [\n TABLE_NAME,\n NUMBER_LINE_NAME,\n DATA_ATTR_NAME\n ]);\n d.getElementsByTagName('head')[0].appendChild(css);\n }\n\n function initLineNumbersOnLoad (options) {\n if (d.readyState === 'interactive' || d.readyState === 'complete') {\n documentReady(options);\n } else {\n w.addEventListener('DOMContentLoaded', function () {\n documentReady(options);\n });\n }\n }\n\n function documentReady (options) {\n try {\n var blocks = d.querySelectorAll('code.hljs,code.nohighlight');\n\n for (var i in blocks) {\n if (blocks.hasOwnProperty(i)) {\n if (!isPluginDisabledForBlock(blocks[i])) {\n lineNumbersBlock(blocks[i], options);\n }\n }\n }\n } catch (e) {\n w.console.error('LineNumbers error: ', e);\n }\n }\n\n function isPluginDisabledForBlock(element) {\n return element.classList.contains('nohljsln');\n }\n\n function lineNumbersBlock (element, options) {\n if (typeof element !== 'object') return;\n\n async(function () {\n element.innerHTML = lineNumbersInternal(element, options);\n });\n }\n\n function lineNumbersValue (value, options) {\n if (typeof value !== 'string') return;\n\n var element = document.createElement('code')\n element.innerHTML = value\n\n return lineNumbersInternal(element, options);\n }\n\n function lineNumbersInternal (element, options) {\n\n var internalOptions = mapOptions(element, options);\n\n duplicateMultilineNodes(element);\n\n return addLineNumbersBlockFor(element.innerHTML, internalOptions);\n }\n\n function addLineNumbersBlockFor (inputHtml, options) {\n var lines = getLines(inputHtml);\n\n // if last line contains only carriage return remove it\n if (lines[lines.length-1].trim() === '') {\n lines.pop();\n }\n\n if (lines.length > 1 || options.singleLine) {\n var html = '';\n\n for (var i = 0, l = lines.length; i < l; i++) {\n html += format(\n ' |
' +\n '' +\n ' | ' +\n '' +\n '{6}' +\n ' | ' +\n '