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A6BF,UAC9BO,EAAK/b,MAAMgc,mBAAqBL,EAAkBH,QAAQQ,mBAC1DD,EAAK/b,MAAMic,cAAgBN,EAAkBH,QAAQS,eAEzDZ,EAAaH,MAOd,CACHL,EAAQjB,KACRsB,KAEiB,mBAAqB,UAAsB,OAAqC,CACjG,aAAcV,EAA+BK,EAAQjB,MACrD,gBAAiBiB,EAAQ3C,SAAW,QAAKtW,EACzCwF,GAAIyT,EAAQR,UACZ+B,QAASpT,GACViS,EAAc,CACbR,IAAKa,EACLtb,MAAO,CACH,qCAAwChC,EAAS,GAAGA,WAAa4D,EACjE,oCAAuC7D,EAAQ,GAAGA,WAAY6D,KAC3D/D,EAAMmC,SAEbgJ,GAAUiH,MAEmF,SAASuK,EAA+BZ,GACzI,OAAOA,EAAO,OAAS,SAE3B,MAAMyC,EAA4C5C,EAC5C6C,EAA4C3B","sources":["webpack://_N_E/./public/icons/bookmark.svg","webpack://_N_E/./public/icons/copy-link.svg","webpack://_N_E/./public/icons/copy.svg","webpack://_N_E/./public/icons/notes-empty.svg","webpack://_N_E/./public/icons/notes-filled.svg","webpack://_N_E/./public/icons/unbookmarked.svg","webpack://_N_E/./node_modules/clipboard-copy/index.js","webpack://_N_E/./node_modules/lodash/_asciiToArray.js","webpack://_N_E/./node_modules/lodash/_baseSlice.js","webpack://_N_E/./node_modules/lodash/_castSlice.js","webpack://_N_E/./node_modules/lodash/_createCaseFirst.js","webpack://_N_E/./node_modules/lodash/_hasUnicode.js","webpack://_N_E/./node_modules/lodash/_stringToArray.js","webpack://_N_E/./node_modules/lodash/_unicodeToArray.js","webpack://_N_E/./node_modules/lodash/capitalize.js","webpack://_N_E/./node_modules/lodash/upperFirst.js","webpack://_N_E/./public/icons/clipboard.svg","webpack://_N_E/./src/components/Verse/BookmarkAction.tsx","webpack://_N_E/./src/components/Verse/Notes/NotesAction/index.tsx","webpack://_N_E/./src/components/Collection/SaveToCollectionModal/SaveToCollectionModal.tsx","webpack://_N_E/./src/components/Verse/SaveToCollectionAction.tsx","webpack://_N_E/./src/components/Verse/AdvancedCopy/utils/getTextCopy.ts","webpack://_N_E/./src/utils/blob.ts","webpack://_N_E/./src/utils/copyText.ts","webpack://_N_E/./src/components/Verse/AdvancedCopy/utils/copyVerse.ts","webpack://_N_E/./src/components/Verse/AdvancedCopy/utils/validateRangeSelection.ts","webpack://_N_E/./src/components/Verse/AdvancedCopy/VerseAdvancedCopy.tsx","webpack://_N_E/./src/utils/error.ts","webpack://_N_E/./public/icons/search-book.svg","webpack://_N_E/./src/components/Verse/VerseActionAdvancedCopy/index.tsx","webpack://_N_E/./src/components/Verse/VerseActionRepeatAudio.tsx","webpack://_N_E/./src/components/QuranReader/ReadingView/WordByWordVerseAction/WordByWordHeading/index.tsx","webpack://_N_E/./src/components/QuranReader/ReadingView/WordByWordVerseAction/index.tsx","webpack://_N_E/./src/components/Verse/OverflowVerseActionsMenuBody.tsx","webpack://_N_E/./src/components/dls/Forms/RadioGroup/Item.tsx","webpack://_N_E/./src/components/dls/Forms/RadioGroup/RadioGroup.tsx","webpack://_N_E/./src/components/dls/Forms/RadioGroup/Root.tsx","webpack://_N_E/./src/hooks/auth/useCountRangeNotes.ts","webpack://_N_E/./src/utils/word.ts","webpack://_N_E/./src/components/Collection/SaveToCollectionModal/SaveToCollectionModal.module.scss","webpack://_N_E/./src/components/QuranReader/ReadingView/WordByWordVerseAction/WordByWordHeading/WordByWordHeading.module.scss","webpack://_N_E/./src/components/QuranReader/ReadingView/WordByWordVerseAction/WordByWordVerseAction.module.scss","webpack://_N_E/./src/components/Verse/AdvancedCopy/VerseAdvancedCopy.module.scss","webpack://_N_E/./src/components/Verse/VerseActionAdvancedCopy/VerseActionAdvancedCopy.module.scss","webpack://_N_E/./src/components/dls/Forms/RadioGroup/Item.module.scss","webpack://_N_E/./src/components/dls/Forms/RadioGroup/RadioGroup.module.scss","webpack://_N_E/./src/components/dls/Forms/RadioGroup/Root.module.scss","webpack://_N_E/./node_modules/@radix-ui/react-collapsible/dist/index.mjs"],"sourcesContent":["var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgBookmark = function SvgBookmark(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"currentColor\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n className: \"feather feather-bookmark\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m19 21-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z\"\n })));\n};\nexport default SvgBookmark;","var _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgCopyLink = function SvgCopyLink(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10 13a5.001 5.001 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })));\n};\nexport default SvgCopyLink;","var _rect, _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgCopy = function SvgCopy(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n className: \"feather feather-copy\"\n }, props), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 9,\n y: 9,\n width: 13,\n height: 13,\n rx: 2,\n ry: 2\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\"\n })));\n};\nexport default SvgCopy;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgNotesEmpty = function SvgNotesEmpty(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 15,\n height: 15,\n viewBox: \"0 0 15 15\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3 2.5a.5.5 0 0 1 .5-.5h5.586a.5.5 0 0 1 .353.146l2.415 2.415a.5.5 0 0 1 .146.353V12.5a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-10ZM3.5 1A1.5 1.5 0 0 0 2 2.5v10A1.5 1.5 0 0 0 3.5 14h8a1.5 1.5 0 0 0 1.5-1.5V4.914a1.5 1.5 0 0 0-.44-1.06l-2.414-2.415A1.5 1.5 0 0 0 9.086 1H3.5Zm1 3a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1h-3Zm0 3a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1h-6Zm0 3a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1h-6Z\",\n fill: \"currentColor\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n })));\n};\nexport default SvgNotesEmpty;","var _path, _path2;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgNotesFilled = function SvgNotesFilled(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n viewBox: \"1.928 0.875 11.023 13.01\",\n width: 11.023,\n height: 13.01,\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.451.875a1.5 1.5 0 0 0-1.5 1.5v10a1.5 1.5 0 0 0 1.5 1.5h8a1.5 1.5 0 0 0 1.5-1.5V4.789c0-.398-.158-.779-.439-1.061l-2.414-2.414A1.5 1.5 0 0 0 9.037.875H3.451Z\",\n fill: \"#00abff\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M2.928 2.385a.5.5 0 0 1 .5-.5h5.586a.5.5 0 0 1 .354.146l2.414 2.414a.5.5 0 0 1 .146.354v7.586a.5.5 0 0 1-.5.5h-8a.5.5 0 0 1-.5-.5v-10Zm.5-1.5a1.5 1.5 0 0 0-1.5 1.5v10a1.5 1.5 0 0 0 1.5 1.5h8a1.5 1.5 0 0 0 1.5-1.5V4.799c0-.398-.158-.779-.439-1.061l-2.414-2.414A1.5 1.5 0 0 0 9.014.885H3.428Zm1 3a.5.5 0 0 0 0 1h3a.5.5 0 1 0 0-1h-3Zm0 3a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1h-6Zm0 3a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1h-6Z\",\n fillRule: \"evenodd\",\n clipRule: \"evenodd\"\n })));\n};\nexport default SvgNotesFilled;","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgUnbookmarked = function SvgUnbookmarked(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n className: \"feather feather-bookmark\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m19 21-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z\"\n })));\n};\nexport default SvgUnbookmarked;","/*! clipboard-copy. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */\n/* global DOMException */\n\nmodule.exports = clipboardCopy\n\nfunction makeError () {\n return new DOMException('The request is not allowed', 'NotAllowedError')\n}\n\nasync function copyClipboardApi (text) {\n // Use the Async Clipboard API when available. Requires a secure browsing\n // context (i.e. HTTPS)\n if (!navigator.clipboard) {\n throw makeError()\n }\n return navigator.clipboard.writeText(text)\n}\n\nasync function copyExecCommand (text) {\n // Put the text to copy into a <span>\n const span = document.createElement('span')\n span.textContent = text\n\n // Preserve consecutive spaces and newlines\n span.style.whiteSpace = 'pre'\n span.style.webkitUserSelect = 'auto'\n span.style.userSelect = 'all'\n\n // Add the <span> to the page\n document.body.appendChild(span)\n\n // Make a selection object representing the range of text selected by the user\n const selection = window.getSelection()\n const range = window.document.createRange()\n selection.removeAllRanges()\n range.selectNode(span)\n selection.addRange(range)\n\n // Copy text to the clipboard\n let success = false\n try {\n success = window.document.execCommand('copy')\n } finally {\n // Cleanup\n selection.removeAllRanges()\n window.document.body.removeChild(span)\n }\n\n if (!success) throw makeError()\n}\n\nasync function clipboardCopy (text) {\n try {\n await copyClipboardApi(text)\n } catch (err) {\n // ...Otherwise, use document.execCommand() fallback\n try {\n await copyExecCommand(text)\n } catch (err2) {\n throw (err2 || err || makeError())\n }\n }\n}\n","/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nmodule.exports = asciiToArray;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n","var baseSlice = require('./_baseSlice');\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nmodule.exports = castSlice;\n","var castSlice = require('./_castSlice'),\n hasUnicode = require('./_hasUnicode'),\n stringToArray = require('./_stringToArray'),\n toString = require('./toString');\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n}\n\nmodule.exports = createCaseFirst;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nmodule.exports = hasUnicode;\n","var asciiToArray = require('./_asciiToArray'),\n hasUnicode = require('./_hasUnicode'),\n unicodeToArray = require('./_unicodeToArray');\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nmodule.exports = stringToArray;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nmodule.exports = unicodeToArray;\n","var toString = require('./toString'),\n upperFirst = require('./upperFirst');\n\n/**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\nfunction capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n}\n\nmodule.exports = capitalize;\n","var createCaseFirst = require('./_createCaseFirst');\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nmodule.exports = upperFirst;\n","var _path, _rect;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgClipboard = function SvgClipboard(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n className: \"feather feather-clipboard\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2\"\n })), _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 8,\n y: 2,\n width: 8,\n height: 4,\n rx: 1,\n ry: 1\n })));\n};\nexport default SvgClipboard;","/* eslint-disable max-lines */\n/* eslint-disable react-func/max-lines-per-function */\nimport { useMemo } from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\nimport { shallowEqual, useDispatch, useSelector } from 'react-redux';\nimport { useSWRConfig } from 'swr';\nimport useSWRImmutable from 'swr/immutable';\n\nimport PopoverMenu from '../dls/PopoverMenu/PopoverMenu';\n\nimport BookmarkedIcon from '@/icons/bookmark.svg';\nimport UnBookmarkedIcon from '@/icons/unbookmarked.svg';\nimport Spinner from 'src/components/dls/Spinner/Spinner';\nimport { ToastStatus, useToast } from 'src/components/dls/Toast/Toast';\nimport { selectBookmarks, toggleVerseBookmark } from 'src/redux/slices/QuranReader/bookmarks';\nimport { selectQuranReaderStyles } from 'src/redux/slices/QuranReader/styles';\nimport { getMushafId } from 'src/utils/api';\nimport { addBookmark, deleteBookmarkById, getBookmark } from 'src/utils/auth/api';\nimport { makeBookmarksUrl, makeBookmarkUrl } from 'src/utils/auth/apiPaths';\nimport { isLoggedIn } from 'src/utils/auth/login';\nimport { logButtonClick } from 'src/utils/eventLogger';\nimport BookmarkType from 'types/BookmarkType';\n\nconst BookmarkAction = ({ verse, isTranslationView, onActionTriggered, bookmarksRangeUrl }) => {\n const bookmarkedVerses = useSelector(selectBookmarks, shallowEqual);\n const quranReaderStyles = useSelector(selectQuranReaderStyles, shallowEqual);\n const mushafId = getMushafId(quranReaderStyles.quranFont, quranReaderStyles.mushafLines).mushaf;\n const { t } = useTranslation('common');\n const dispatch = useDispatch();\n\n const toast = useToast();\n const { cache, mutate: globalMutate } = useSWRConfig();\n\n const {\n data: bookmark,\n isValidating: isVerseBookmarkedLoading,\n mutate,\n } = useSWRImmutable(\n isLoggedIn()\n ? makeBookmarkUrl(\n mushafId,\n Number(verse.chapterId),\n BookmarkType.Ayah,\n Number(verse.verseNumber),\n )\n : null,\n async () => {\n const response = await getBookmark(\n mushafId,\n Number(verse.chapterId),\n BookmarkType.Ayah,\n Number(verse.verseNumber),\n );\n return response;\n },\n );\n const isVerseBookmarked = useMemo(() => {\n const isUserLoggedIn = isLoggedIn();\n if (isUserLoggedIn && bookmark) {\n return bookmark;\n }\n if (!isUserLoggedIn) {\n return !!bookmarkedVerses[verse.verseKey];\n }\n return false;\n }, [bookmarkedVerses, bookmark, verse.verseKey]);\n\n const updateInBookmarkRange = (value) => {\n // when it's translation view, we need to invalidate the cached bookmarks range\n if (bookmarksRangeUrl) {\n const bookmarkedVersesRange = cache.get(bookmarksRangeUrl);\n const nextBookmarkedVersesRange = {\n ...bookmarkedVersesRange,\n [verse.verseKey]: value,\n };\n globalMutate(bookmarksRangeUrl, nextBookmarkedVersesRange, {\n revalidate: false,\n });\n }\n };\n\n const onToggleBookmarkClicked = () => {\n // eslint-disable-next-line i18next/no-literal-string\n logButtonClick(\n // eslint-disable-next-line i18next/no-literal-string\n `${isTranslationView ? 'translation_view' : 'reading_view'}_verse_actions_menu_${\n isVerseBookmarked ? 'un_bookmark' : 'bookmark'\n }`,\n );\n\n if (isLoggedIn()) {\n // optimistic update, we are making assumption that the bookmark update will succeed\n\n if (isVerseBookmarked) {\n mutate(() => null, {\n revalidate: false,\n });\n }\n\n cache.delete(\n makeBookmarksUrl(\n getMushafId(quranReaderStyles.quranFont, quranReaderStyles.mushafLines).mushaf,\n ),\n );\n\n if (!isVerseBookmarked) {\n addBookmark({\n key: Number(verse.chapterId),\n mushafId,\n type: BookmarkType.Ayah,\n verseNumber: verse.verseNumber,\n })\n .then((newBookmark) => {\n mutate();\n updateInBookmarkRange(newBookmark);\n toast(t('verse-bookmarked'), {\n status: ToastStatus.Success,\n });\n })\n .catch((err) => {\n if (err.status === 400) {\n toast(t('common:error.bookmark-sync'), {\n status: ToastStatus.Error,\n });\n return;\n }\n toast(t('error.general'), {\n status: ToastStatus.Error,\n });\n });\n } else {\n deleteBookmarkById(bookmark.id).then(() => {\n updateInBookmarkRange(null);\n toast(t('verse-bookmark-removed'), {\n status: ToastStatus.Success,\n });\n });\n }\n } else {\n dispatch(toggleVerseBookmark(verse.verseKey));\n }\n\n if (onActionTriggered) {\n onActionTriggered();\n }\n };\n\n let bookmarkIcon = <Spinner />;\n if (!isVerseBookmarkedLoading) {\n bookmarkIcon = isVerseBookmarked ? <BookmarkedIcon /> : <UnBookmarkedIcon />;\n }\n\n return (\n <>\n <PopoverMenu.Item\n onClick={onToggleBookmarkClicked}\n icon={bookmarkIcon}\n isDisabled={isVerseBookmarkedLoading}\n >\n {isVerseBookmarked ? `${t('bookmarked')}!` : `${t('bookmark')}`}\n </PopoverMenu.Item>\n </>\n );\n};\n\nexport default BookmarkAction;\n","import React, { useState } from 'react';\n\nimport { useRouter } from 'next/router';\nimport useTranslation from 'next-translate/useTranslation';\n\nimport NoteModal from '@/components/Notes/NoteModal';\nimport PopoverMenu from '@/dls/PopoverMenu/PopoverMenu';\nimport useCountRangeNotes from '@/hooks/auth/useCountRangeNotes';\nimport EmptyNotesIcon from '@/icons/notes-empty.svg';\nimport NotesIcon from '@/icons/notes-filled.svg';\nimport Verse from '@/types/Verse';\nimport { isLoggedIn } from '@/utils/auth/login';\nimport { logButtonClick } from '@/utils/eventLogger';\nimport { getChapterWithStartingVerseUrl, getLoginNavigationUrl } from '@/utils/navigation';\n\ntype Props = {\n verse: Verse;\n};\n\nconst NotesAction: React.FC<Props> = ({ verse }) => {\n const { data: notesCount } = useCountRangeNotes({ from: verse.verseKey, to: verse.verseKey });\n const [isModalOpen, setIsModalOpen] = useState(false);\n const { t } = useTranslation('common');\n\n const router = useRouter();\n\n const onNotesClicked = () => {\n const isUserLoggedIn = isLoggedIn();\n logButtonClick('note_menu_item', { isUserLoggedIn });\n if (!isUserLoggedIn) {\n router.push(getLoginNavigationUrl(getChapterWithStartingVerseUrl(verse.verseKey)));\n } else {\n setIsModalOpen(true);\n }\n };\n\n const onClose = () => {\n setIsModalOpen(false);\n };\n\n const hasNotes = notesCount && notesCount[verse.verseKey] > 0;\n\n return (\n <>\n <PopoverMenu.Item\n onClick={onNotesClicked}\n icon={hasNotes ? <NotesIcon /> : <EmptyNotesIcon />}\n >\n {t('notes.title')}\n </PopoverMenu.Item>\n <NoteModal isOpen={isModalOpen} onClose={onClose} verseKey={verse.verseKey} />\n </>\n );\n};\n\nexport default NotesAction;\n","import { useRef, useState } from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\n\nimport styles from './SaveToCollectionModal.module.scss';\n\nimport FormBuilder from '@/components/FormBuilder/FormBuilder';\nimport Button, { ButtonVariant } from '@/dls/Button/Button';\nimport ContentModal, { ContentModalSize } from '@/dls/ContentModal/ContentModal';\nimport ContentModalHandles from '@/dls/ContentModal/types/ContentModalHandles';\nimport Checkbox from '@/dls/Forms/Checkbox/Checkbox';\nimport { ToastStatus, useToast } from '@/dls/Toast/Toast';\nimport PlusIcon from '@/icons/plus.svg';\nimport { logButtonClick, logEvent } from '@/utils/eventLogger';\nimport { RuleType } from 'types/FieldRule';\nimport { FormFieldType } from 'types/FormField';\n\nexport type Collection = {\n id: string;\n name: string;\n checked?: boolean;\n};\n\ntype SaveToCollectionModalProps = {\n isOpen: boolean;\n collections: Collection[];\n onCollectionToggled: (collection: Collection, newValue: boolean) => void;\n onNewCollectionCreated: (name: string) => Promise<void>;\n onClose?: () => void;\n verseKey: string;\n};\n\nconst SaveToCollectionModal = ({\n isOpen,\n collections,\n onCollectionToggled,\n onNewCollectionCreated,\n onClose,\n verseKey,\n}: SaveToCollectionModalProps) => {\n const [isAddingNewCollection, setIsAddingNewCollection] = useState(false);\n const [isSubmitting, setIsSubmitting] = useState(false);\n const contentModalRef = useRef<ContentModalHandles>();\n const { t } = useTranslation();\n const toast = useToast();\n\n const handleSubmit = (data) => {\n setIsSubmitting(true);\n logButtonClick('save_to_collection_modal_submit');\n onNewCollectionCreated(data.name)\n .then(() => {\n onClose();\n toast(t('quran-reader:saved-to', { collectionName: data.name }), {\n status: ToastStatus.Success,\n });\n return setIsAddingNewCollection(false);\n })\n .catch(() => {\n toast(t('common:error.general'), {\n status: ToastStatus.Error,\n });\n })\n .finally(() => setIsSubmitting(false));\n };\n\n const onAddNewCollection = () => {\n setIsAddingNewCollection(true);\n logButtonClick('save_to_collection_add_new_collection');\n };\n\n const handleCheckboxChange = (collection: Collection) => (checked: boolean) => {\n const eventData = {\n verseKey,\n collectionId: collection.id,\n };\n if (checked) {\n logEvent('ayah_added_to_collection_checkbox', eventData);\n } else {\n logEvent('ayah_removed_from_collection_checkbox', eventData);\n }\n onCollectionToggled(collection, checked);\n };\n\n return (\n <ContentModal\n innerRef={contentModalRef}\n isOpen={isOpen}\n header={<p className={styles.header}>{t('quran-reader:save-to')}</p>}\n hasCloseButton\n onClose={onClose}\n onEscapeKeyDown={onClose}\n size={ContentModalSize.SMALL}\n >\n <div className={styles.collectionList}>\n {collections.map((collection) => (\n <div className={styles.collectionItem} key={collection.id}>\n <Checkbox\n id={collection.name}\n defaultChecked={collection.checked}\n label={collection.name}\n onChange={handleCheckboxChange(collection)}\n />\n </div>\n ))}\n </div>\n <div>\n {isAddingNewCollection ? (\n <div className={styles.newCollectionFormContainer}>\n <FormBuilder\n formFields={[\n {\n field: 'name',\n placeholder: t('quran-reader:new-collection-name'),\n rules: [{ type: RuleType.Required, value: true, errorMessage: 'Required' }],\n type: FormFieldType.Text,\n },\n ]}\n actionText={t('common:submit')}\n isSubmitting={isSubmitting}\n onSubmit={handleSubmit}\n />\n </div>\n ) : (\n <Button variant={ButtonVariant.Ghost} prefix={<PlusIcon />} onClick={onAddNewCollection}>\n {t('quran-reader:add-collection')}\n </Button>\n )}\n </div>\n </ContentModal>\n );\n};\n\nexport default SaveToCollectionModal;\n","/* eslint-disable max-lines */\n/* eslint-disable react-func/max-lines-per-function */\nimport { useState } from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\nimport { shallowEqual, useSelector } from 'react-redux';\nimport useSWR, { useSWRConfig } from 'swr';\nimport useSWRImmutable from 'swr/immutable';\n\nimport SaveToCollectionModal, {\n Collection,\n} from '../Collection/SaveToCollectionModal/SaveToCollectionModal';\nimport PopoverMenu from '../dls/PopoverMenu/PopoverMenu';\n\nimport PlusIcon from '@/icons/plus.svg';\nimport { ToastStatus, useToast } from 'src/components/dls/Toast/Toast';\nimport { selectQuranReaderStyles } from 'src/redux/slices/QuranReader/styles';\nimport { getMushafId } from 'src/utils/api';\nimport {\n addCollection,\n addCollectionBookmark,\n deleteCollectionBookmarkByKey,\n getBookmarkCollections,\n getCollectionsList,\n} from 'src/utils/auth/api';\nimport {\n makeBookmarkCollectionsUrl,\n makeBookmarksUrl,\n makeCollectionsUrl,\n makeBookmarkUrl,\n} from 'src/utils/auth/apiPaths';\nimport { isLoggedIn } from 'src/utils/auth/login';\nimport { logButtonClick } from 'src/utils/eventLogger';\nimport BookmarkType from 'types/BookmarkType';\n\nconst SaveToCollectionAction = ({ verse, bookmarksRangeUrl, isTranslationView }) => {\n const [isSaveCollectionModalOpen, setIsSaveCollectionModalOpen] = useState(false);\n const quranReaderStyles = useSelector(selectQuranReaderStyles, shallowEqual);\n const mushafId = getMushafId(quranReaderStyles.quranFont, quranReaderStyles.mushafLines).mushaf;\n const { t } = useTranslation();\n const { data: collectionListData, mutate: mutateCollectionListData } = useSWR(\n isLoggedIn() ? makeCollectionsUrl({}) : null,\n () => getCollectionsList({}),\n );\n\n const { mutate: globalSWRMutate } = useSWRConfig();\n\n const { data: bookmarkCollectionIdsData, mutate: mutateBookmarkCollectionIdsData } =\n useSWRImmutable(\n isLoggedIn()\n ? makeBookmarkCollectionsUrl(\n mushafId,\n Number(verse.chapterId),\n BookmarkType.Ayah,\n Number(verse.verseNumber),\n )\n : null,\n async () => {\n const response = await getBookmarkCollections(\n mushafId,\n Number(verse.chapterId),\n BookmarkType.Ayah,\n Number(verse.verseNumber),\n );\n return response;\n },\n );\n\n const toast = useToast();\n\n const onMenuClicked = () => {\n setIsSaveCollectionModalOpen(true);\n if (isTranslationView) {\n logButtonClick('save_to_collection_menu_trans_view');\n } else {\n logButtonClick('save_to_collection_menu_reading_view');\n }\n };\n\n const closeModal = () => {\n setIsSaveCollectionModalOpen(false);\n };\n\n const mutateIsResourceBookmarked = () => {\n if (!isLoggedIn()) {\n return;\n }\n globalSWRMutate(\n makeBookmarkUrl(\n mushafId,\n Number(verse.chapterId),\n BookmarkType.Ayah,\n Number(verse.verseNumber),\n ),\n );\n\n if (bookmarksRangeUrl) {\n globalSWRMutate(bookmarksRangeUrl);\n }\n };\n\n const mutateBookmarksUrl = () =>\n globalSWRMutate(\n makeBookmarksUrl(\n getMushafId(quranReaderStyles.quranFont, quranReaderStyles.mushafLines).mushaf,\n ),\n );\n\n const onCollectionToggled = (changedCollection: Collection, newValue: boolean) => {\n if (newValue === true) {\n addCollectionBookmark({\n key: Number(verse.chapterId),\n mushaf: mushafId,\n type: BookmarkType.Ayah,\n verseNumber: verse.verseNumber,\n collectionId: changedCollection.id,\n })\n .then(() => {\n toast(t('quran-reader:saved-to', { collectionName: changedCollection.name }), {\n status: ToastStatus.Success,\n });\n mutateIsResourceBookmarked();\n mutateCollectionListData();\n mutateBookmarkCollectionIdsData();\n mutateBookmarksUrl();\n })\n .catch((err) => {\n if (err.status === 400) {\n toast(t('common:error.bookmark-sync'), {\n status: ToastStatus.Error,\n });\n return;\n }\n toast(t('common:error.general'), {\n status: ToastStatus.Error,\n });\n });\n } else {\n deleteCollectionBookmarkByKey({\n key: Number(verse.chapterId),\n mushaf: mushafId,\n type: BookmarkType.Ayah,\n verseNumber: verse.verseNumber,\n collectionId: changedCollection.id,\n })\n .then(() => {\n toast(t('quran-reader:removed-from', { collectionName: changedCollection.name }), {\n status: ToastStatus.Success,\n });\n mutateIsResourceBookmarked();\n mutateCollectionListData();\n mutateBookmarkCollectionIdsData();\n mutateBookmarksUrl();\n })\n .catch((err) => {\n if (err.status === 400) {\n toast(t('common:error.bookmark-sync'), {\n status: ToastStatus.Error,\n });\n return;\n }\n toast(t('common:error.general'), {\n status: ToastStatus.Error,\n });\n });\n }\n };\n\n const onNewCollectionCreated = (newCollectionName: string) => {\n return addCollection(newCollectionName).then((newCollection: any) => {\n addCollectionBookmark({\n collectionId: newCollection.id,\n key: Number(verse.chapterId),\n mushaf: mushafId,\n type: BookmarkType.Ayah,\n verseNumber: verse.verseNumber,\n })\n .then(() => {\n mutateIsResourceBookmarked();\n mutateCollectionListData();\n mutateBookmarkCollectionIdsData([...bookmarkCollectionIdsData, newCollection.id]);\n mutateBookmarksUrl();\n })\n .catch((err) => {\n if (err.status === 400) {\n toast(t('common:error.bookmark-sync'), {\n status: ToastStatus.Error,\n });\n return;\n }\n toast(t('common:error.general'), {\n status: ToastStatus.Error,\n });\n });\n });\n };\n\n const isDataReady = bookmarkCollectionIdsData && collectionListData;\n\n const collections = !isDataReady\n ? []\n : (collectionListData.data.map((collection) => ({\n id: collection.id,\n name: collection.name,\n checked: bookmarkCollectionIdsData?.includes(collection.id),\n })) as Collection[]);\n\n return (\n <>\n <PopoverMenu.Item onClick={onMenuClicked} icon={<PlusIcon />}>\n {t('common:save-to-collection')}\n </PopoverMenu.Item>\n {isDataReady && (\n <SaveToCollectionModal\n isOpen={isSaveCollectionModalOpen}\n onCollectionToggled={onCollectionToggled}\n onNewCollectionCreated={onNewCollectionCreated}\n onClose={closeModal}\n collections={collections}\n verseKey={`${verse.chapterId}:${verse.verseNumber}`}\n />\n )}\n </>\n );\n};\n\nexport default SaveToCollectionAction;\n","import { MushafLines } from '@/types/QuranReader';\nimport { getMushafId } from '@/utils/api';\nimport { getAdvancedCopyRawResult } from 'src/api';\n\n/**\n * Given these parameters, get the `text to be copied` from API\n *\n * @returns {string} textToCopy\n */\nconst getTextToCopy = ({\n verseKey,\n showRangeOfVerses,\n rangeStartVerse,\n rangeEndVerse,\n translations,\n shouldCopyFootnotes,\n shouldIncludeTranslatorName,\n shouldCopyFont,\n}) => {\n // by default the from and to will be the current verse.\n let fromVerse = verseKey;\n let toVerse = verseKey;\n // if range of verse was selected\n if (showRangeOfVerses) {\n fromVerse = rangeStartVerse;\n toVerse = rangeEndVerse;\n }\n // filter the translations\n const toBeCopiedTranslations = Object.keys(translations).filter(\n (translationId) => translations[translationId].shouldBeCopied === true,\n );\n return getAdvancedCopyRawResult({\n raw: true,\n from: fromVerse,\n to: toVerse,\n footnote: shouldCopyFootnotes,\n translatorName: shouldIncludeTranslatorName,\n ...(toBeCopiedTranslations.length > 0 && {\n translations: toBeCopiedTranslations.join(', '),\n }), // only include the translations when at least 1 translation has been selected.\n ...(shouldCopyFont && {\n ...getMushafId(shouldCopyFont, MushafLines.SixteenLines),\n }), // only include the fonts when at least 1 font has been selected.\n }).then((res) => res.result);\n};\n\nexport default getTextToCopy;\n","/**\n * Convert text to blob\n *\n * @param {string} text\n * @returns {Blob} textBlob\n */\nexport const textToBlob = (text: string): Blob => new Blob([text], { type: 'text/plain' });\n\n/**\n * Convert text to blob\n *\n * @param {Blob} blob\n * @returns {Promise<string>} text\n */\nexport const blobToText = (blob: Blob): Promise<string> => blob.text();\n","import clipboardCopy from 'clipboard-copy';\n\n/**\n * Copy text to clipboard\n *\n * Notes:\n * Safari supports `text/plain` : promise\n * Chrome doesn't support it.\n *\n * Safari needs `navigator.clipboard` to be called immediately without waiting\n * Chrome can wait\n *\n * So, for safari we call it navigator.clipboard immediately and give it a promise\n * for chrome we wait for the promise to resolve, the we call navigator.clipboard\n * (via clipboardCopy library, which also handle copying fallback for older browsers)\n *\n *\n * @param {Promise<Blob>} textBlobPromise\n */\nconst copyText = async (textBlobPromise: Promise<Blob>) => {\n try {\n // Try to copy with promise value (works in safari)\n // eslint-disable-next-line @typescript-eslint/naming-convention\n navigator.clipboard.write([new ClipboardItem({ 'text/plain': textBlobPromise })]);\n } catch (e) {\n // otherwise fallback to use clipboardCopy library\n const blob = await textBlobPromise;\n const text = await blob.text();\n await clipboardCopy(text);\n }\n};\n\nexport default copyText;\n","import getTextToCopy from './getTextCopy';\n\nimport { textToBlob } from '@/utils/blob';\nimport copyText from '@/utils/copyText';\n\n/**\n * given these params,\n * get the data from the API\n * and copy the result to clipboard\n *\n * @returns {Promise<Blob>} textBlobPromise\n */\nconst copyVerse = async ({\n showRangeOfVerses,\n rangeEndVerse,\n rangeStartVerse,\n shouldCopyFootnotes,\n shouldIncludeTranslatorName,\n shouldCopyFont,\n translations,\n verseKey,\n}) => {\n const textBlobPromise = getTextToCopy({\n rangeEndVerse,\n rangeStartVerse,\n shouldCopyFootnotes,\n shouldCopyFont,\n shouldIncludeTranslatorName,\n showRangeOfVerses,\n translations,\n verseKey,\n }).then(textToBlob);\n\n copyText(textBlobPromise);\n return textBlobPromise;\n};\n\nexport default copyVerse;\n","import { getVerseNumberFromKey } from '@/utils/verse';\n\n/**\n * Validate the selected range start and end verse keys. The selection will be invalid in the following cases:\n *\n * 1. One of the two ranges have been cleared and don't have a value.\n * 2. The range start and end verses are the same which is not a valid range. The user should have selected current verse option instead.\n * 3. The range end verse is before the range start verse e.g. from verse 6 -> verse 4.\n *\n * @param {string} selectedRangeStartVerseKey\n * @param {string} selectedRangeEndVerseKey\n * @returns {string|null} if it's null it means the validation passed.\n */\nconst validateRangeSelection = (\n selectedRangeStartVerseKey: string,\n selectedRangeEndVerseKey: string,\n): string | null => {\n // if one of them is empty.\n if (!selectedRangeStartVerseKey || !selectedRangeEndVerseKey) {\n return 'Range start and end must have a value.';\n }\n // if both keys are the same.\n if (selectedRangeStartVerseKey === selectedRangeEndVerseKey) {\n return 'Range start and end should be different.';\n }\n // if the selected from verse number is higher than the selected to verse number.\n if (\n getVerseNumberFromKey(selectedRangeStartVerseKey) >\n getVerseNumberFromKey(selectedRangeEndVerseKey)\n ) {\n return 'The starting verse has to be before the ending verse.';\n }\n return null;\n};\n\nexport default validateRangeSelection;\n","/* eslint-disable max-lines */\nimport React, { useState, useEffect, useCallback, useMemo, useContext } from 'react';\n\nimport classNames from 'classnames';\nimport useTranslation from 'next-translate/useTranslation';\nimport { useSelector } from 'react-redux';\nimport useSWRImmutable from 'swr/immutable';\n\nimport { RangeSelectorType, RangeVerseItem } from './SelectorContainer';\nimport copyVerse from './utils/copyVerse';\nimport validateRangeSelection from './utils/validateRangeSelection';\nimport styles from './VerseAdvancedCopy.module.scss';\nimport VersesRangeSelector from './VersesRangeSelector';\n\nimport Checkbox from '@/dls/Forms/Checkbox/Checkbox';\nimport RadioGroup, { RadioGroupOrientation } from '@/dls/Forms/RadioGroup/RadioGroup';\nimport Select from '@/dls/Forms/Select';\nimport HelperTooltip from '@/dls/HelperTooltip/HelperTooltip';\nimport Link, { LinkVariant } from '@/dls/Link/Link';\nimport { selectSelectedTranslations } from '@/redux/slices/QuranReader/translations';\nimport { makeTranslationsUrl } from '@/utils/apiPaths';\nimport { areArraysEqual } from '@/utils/array';\nimport { throwIfError } from '@/utils/error';\nimport {\n logButtonClick,\n logEvent,\n logItemSelectionChange,\n logValueChange,\n} from '@/utils/eventLogger';\nimport { toLocalizedVerseKey } from '@/utils/locale';\nimport { generateChapterVersesKeys } from '@/utils/verse';\nimport { getAvailableTranslations } from 'src/api';\nimport DataContext from 'src/contexts/DataContext';\nimport { QuranFont } from 'types/QuranReader';\nimport Verse from 'types/Verse';\n\ninterface Props {\n verse: Verse;\n children({ onCopy, actionText, ayahSelectionComponent, loading }): React.ReactElement;\n}\nconst RESET_BUTTON_TIMEOUT_MS = 5 * 1000;\n\nconst SINGLE_VERSE = 'single';\nconst MULTIPLE_VERSES = 'multiple';\nconst TRUE_STRING = String(true);\nconst FALSE_STRING = String(false);\n\nconst TO_COPY_FONTS = [\n QuranFont.Uthmani,\n QuranFont.MadaniV1,\n QuranFont.MadaniV2,\n QuranFont.IndoPak,\n];\n\nconst VerseAdvancedCopy: React.FC<Props> = ({ verse, children }) => {\n const { lang, t } = useTranslation('quran-reader');\n const chaptersData = useContext(DataContext);\n const selectedTranslations = useSelector(selectSelectedTranslations, areArraysEqual);\n // whether we should show the range of verses or not. This will be based on user selection.\n const [showRangeOfVerses, setShowRangeOfVerses] = useState(false);\n // the items that will be passed to the range start and end dropdown selectors. The value will be populated only once the user chooses the verses range option.\n const [rangeVersesItems, setRangeVersesItems] = useState<RangeVerseItem[]>([]);\n // the key of the range start verse.\n const [rangeStartVerse, setRangeStartVerse] = useState(null);\n // the key of the range end verse.\n const [rangeEndVerse, setRangeEndVerse] = useState(null);\n // Which font to copy.\n const [shouldCopyFont, setShouldCopyFont] = useState<QuranFont>(QuranFont.Uthmani);\n // whether the selected verses' footnotes should be copied or not.\n const [shouldCopyFootnotes, setShouldCopyFootnotes] = useState(true);\n // whether we should include the translator name or not.\n const [shouldIncludeTranslatorName, setShouldIncludeTranslatorName] = useState(true);\n // a map of the IDs of the translations the users had selected and whether it should be copied or not. Will not be copied by default.\n const [translations, setTranslations] = useState<\n Record<number, { shouldBeCopied: boolean; name: string }>\n >({});\n // a custom message that will be shown to the user in the case we have an error or success.\n const [customMessageComponent, setCustomMessage] = useState(null);\n // whether the selection has been copied successfully to the clipboard or not.\n const [isCopied, setIsCopied] = useState(false);\n // objectUrl will be as href `<a> to download a txt file containing copied text.\n const [objectUrl, setObjectUrl] = useState(null);\n\n const [isLoadingData, setIsLoadingData] = useState(false);\n\n // listen to any changes to the value of isCopied.\n useEffect(() => {\n let timeoutId: ReturnType<typeof setTimeout>;\n // if the user has just copied the text, we should change the text back to Copy after 3 seconds.\n if (isCopied === true) {\n timeoutId = setTimeout(() => setIsCopied(false), RESET_BUTTON_TIMEOUT_MS);\n }\n return () => {\n clearTimeout(timeoutId);\n };\n }, [isCopied]);\n\n // Get available translations\n // because we already have call the API in settings menu. useSWR will save it to cache.\n // in this component, we will get the data from the cache.\n // so, no rerender, no layout shift.\n const { data: translationsResponse } = useSWRImmutable(makeTranslationsUrl(lang), () =>\n getAvailableTranslations(lang).then((res) => {\n throwIfError(res);\n return res;\n }),\n );\n\n const availableTranslations = useMemo(\n () => translationsResponse?.translations ?? [],\n [translationsResponse],\n );\n\n useEffect(() => {\n const responseTranslations = {};\n availableTranslations\n .filter((translation) => selectedTranslations.includes(translation.id))\n .forEach((translation) => {\n responseTranslations[translation.id] = {\n shouldBeCopied: true, // the default is to copy the translation\n name: translation.translatedName.name,\n };\n });\n setTranslations(responseTranslations);\n }, [lang, selectedTranslations, availableTranslations]);\n\n /**\n * Handle when either the range start/end's verse is selected.\n *\n * @param {string} selectedName the value of the name of the selected item. the value of name is the one we passed for the item inside items to the search dropdown.\n * @param {RangeSelectorType} verseSelectorId the id of the verse selector. can either be @{}\n */\n const onRangeBoundariesChange = useCallback(\n (selectedName: string, verseSelectorId: RangeSelectorType) => {\n // reset the error in-case the user has an error then re-selects another item which might solve the error.\n setCustomMessage(null);\n if (verseSelectorId === RangeSelectorType.START) {\n setRangeStartVerse(selectedName);\n } else {\n setRangeEndVerse(selectedName);\n }\n },\n [],\n );\n\n const onRangeOfVersesTypeSelected = () => {\n setShowRangeOfVerses(true);\n // we only need to generate the verse keys + set the range start and end only when the user hadn't selected the range already to avoid re-calculating the keys and to avoid resetting his selected range boundaries when he switches back and forth between current verse/range of verses options.\n if (!rangeStartVerse || !rangeEndVerse) {\n const keys = generateChapterVersesKeys(chaptersData, verse.chapterId as string);\n setRangeVersesItems(\n keys.map((chapterVersesKey) => ({\n id: chapterVersesKey,\n name: chapterVersesKey,\n value: chapterVersesKey,\n label: toLocalizedVerseKey(chapterVersesKey, lang),\n })),\n );\n // set the first verse's key as the default range's start verse.\n const startFromVerseNumber = verse?.verseNumber || 1;\n setRangeStartVerse(keys[startFromVerseNumber - 1]);\n // set the last verse's key as the default range's end verse.\n setRangeEndVerse(keys[keys.length - 1]);\n }\n };\n\n /**\n * Handle when the range type changes.\n *\n * @param {string} type\n */\n const onRangeTypeChange = (type: string) => {\n logValueChange(\n 'advanced_copy_modal_range_type',\n showRangeOfVerses ? MULTIPLE_VERSES : SINGLE_VERSE,\n type,\n );\n if (type === SINGLE_VERSE) {\n setShowRangeOfVerses(false);\n } else {\n onRangeOfVersesTypeSelected();\n }\n };\n\n const onCopyTextClicked = () => {\n logButtonClick('advanced_copy_modal_copy');\n setIsLoadingData(true);\n // if a range is selected, we need to validate it first\n if (showRangeOfVerses) {\n const validationError = validateRangeSelection(rangeStartVerse, rangeEndVerse);\n // if the validation fails\n if (validationError) {\n setCustomMessage(validationError);\n setIsLoadingData(false);\n return;\n }\n }\n\n copyVerse({\n showRangeOfVerses,\n rangeEndVerse,\n rangeStartVerse,\n shouldCopyFootnotes,\n shouldIncludeTranslatorName,\n shouldCopyFont,\n translations,\n verseKey: verse.verseKey,\n })\n .then((blob) => {\n setIsLoadingData(false);\n setObjectUrl(window.URL.createObjectURL(blob));\n setIsCopied(true);\n })\n .catch(() => {\n setIsLoadingData(false);\n });\n };\n\n const onShouldCopyFontsChange = (font: string) => {\n logItemSelectionChange('advanced_copy_modal_font', font);\n setShouldCopyFont(font as QuranFont);\n };\n\n const onShouldIncludeTranslatorNameChange = (includeTranslatorName: string) => {\n const shouldInclude = includeTranslatorName === TRUE_STRING;\n logEvent(\n // eslint-disable-next-line i18next/no-literal-string\n `advanced_copy_modal_include_translator_${shouldInclude ? 'selected' : 'unselected'}`,\n );\n setShouldIncludeTranslatorName(shouldInclude);\n };\n\n /**\n * Handle when the should copy footnote radio changes.\n *\n * @param {string} shouldCopyString\n */\n const onShouldCopyFootnoteChange = (shouldCopyString: string) => {\n const shouldCopy = shouldCopyString === TRUE_STRING;\n logEvent(\n // eslint-disable-next-line i18next/no-literal-string\n `advanced_copy_modal_copy_footnote_${shouldCopy ? 'selected' : 'unselected'}`,\n );\n setShouldCopyFootnotes(shouldCopy);\n };\n\n /**\n * Handle when a translationId is checked/unchecked.\n *\n * @param {string} translationId\n * @returns {void}\n */\n const onCopyTranslationChange = (translationId: string): void => {\n setTranslations((prevTranslations) => {\n const shouldBeCopied = !prevTranslations[translationId].shouldBeCopied;\n logItemSelectionChange('advanced_copy_modal_translation', translationId, shouldBeCopied);\n return {\n ...prevTranslations,\n [translationId]: {\n ...prevTranslations[translationId],\n shouldBeCopied,\n },\n };\n });\n };\n\n const ayahSelectionComponent = (\n <>\n <p className={styles.label}>{t('select-range')}</p>\n <RadioGroup\n label=\"verses_range\"\n orientation={RadioGroupOrientation.Horizontal}\n onChange={onRangeTypeChange}\n value={showRangeOfVerses ? MULTIPLE_VERSES : SINGLE_VERSE}\n items={[\n {\n value: SINGLE_VERSE,\n id: SINGLE_VERSE,\n label: `${t('current-verse')} ${toLocalizedVerseKey(verse.verseKey, lang)}`,\n },\n {\n value: MULTIPLE_VERSES,\n id: MULTIPLE_VERSES,\n label: t('verses-range'),\n },\n ]}\n />\n {rangeStartVerse !== null && (\n <VersesRangeSelector\n isVisible={showRangeOfVerses}\n dropdownItems={rangeVersesItems}\n rangeStartVerse={toLocalizedVerseKey(rangeStartVerse, lang)}\n rangeEndVerse={toLocalizedVerseKey(rangeEndVerse, lang)}\n onChange={onRangeBoundariesChange}\n />\n )}\n {selectedTranslations.length !== 0 && (\n <>\n <p className={styles.label}>{t('common:translations')}:</p>\n {selectedTranslations.map((translationId) =>\n translations[translationId] ? (\n <Checkbox\n key={translationId}\n onChange={() => onCopyTranslationChange(translationId.toString())}\n checked={translations[translationId].shouldBeCopied}\n id={translationId.toString()}\n label={translations[translationId].name}\n />\n ) : (\n <div key={translationId} className={styles.emptyCheckbox} />\n ),\n )}\n <p className={styles.label}>{t('include-translator')}</p>\n <RadioGroup\n label=\"include_translator\"\n value={shouldIncludeTranslatorName ? TRUE_STRING : FALSE_STRING}\n onChange={onShouldIncludeTranslatorNameChange}\n items={[\n {\n value: TRUE_STRING,\n id: TRUE_STRING,\n label: t('common:yes'),\n },\n {\n value: FALSE_STRING,\n id: FALSE_STRING,\n label: t('common:no'),\n },\n ]}\n />\n </>\n )}\n <div className={classNames(styles.label, styles.fontLabelContainer)}>\n <p>{t('font')}</p>\n <HelperTooltip>{t('font-tooltip')}</HelperTooltip>\n </div>\n <Select\n id=\"arabic-font-to-copy\"\n name=\"arabic-font-to-copy\"\n placeholder={t('font-placeholder')}\n options={[\n { label: t('common:none'), value: '' },\n ...TO_COPY_FONTS.map((font) => ({\n label: t(`common:fonts.${font}`),\n value: font,\n })),\n ]}\n value={shouldCopyFont}\n onChange={(val) => onShouldCopyFontsChange(val as string)}\n />\n <p className={styles.label}>{t('copy-footnote-q')}</p>\n <RadioGroup\n label=\"copy_footnotes\"\n value={shouldCopyFootnotes ? TRUE_STRING : FALSE_STRING}\n onChange={onShouldCopyFootnoteChange}\n items={[\n {\n value: TRUE_STRING,\n id: TRUE_STRING,\n label: t('common:yes'),\n },\n {\n value: FALSE_STRING,\n id: FALSE_STRING,\n label: t('common:no'),\n },\n ]}\n />\n {customMessageComponent && (\n <div className={styles.customMessage}>{customMessageComponent}</div>\n )}\n {objectUrl && (\n <p className={styles.customMessage}>\n {t('copy-success')}{' '}\n <Link\n href={objectUrl}\n download=\"quran.copy.txt\"\n variant={LinkVariant.Highlight}\n onClick={() => {\n logButtonClick('advanced_copy_modal_download_file');\n }}\n >\n {t('common:click-here')}\n </Link>{' '}\n {t('download-copy')}\n </p>\n )}\n </>\n );\n\n return children({\n ayahSelectionComponent,\n actionText: isCopied ? t('common:copied-to-clipboard') : t('common:copy'),\n loading: isLoadingData,\n onCopy: onCopyTextClicked,\n });\n};\n\nexport default VerseAdvancedCopy;\n","import { BaseResponse } from 'types/ApiResponses';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const throwIfError = (res: BaseResponse) => {\n if (res.status === 500) {\n throw new Error('internal server error');\n }\n};\n","var _path;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nvar SvgSearchBook = function SvgSearchBook(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14.458 11.764a4.288 4.288 0 1 0-1.179 1.179l2.851 2.85.077.066.01.007a.834.834 0 0 0 1.084-1.258l-2.844-2.845h.001Zm-3.564-5.007a2.621 2.621 0 1 1 0 5.242 2.621 2.621 0 0 1 0-5.242ZM4.88.484A2.879 2.879 0 0 0 2 3.364v17.272a2.879 2.879 0 0 0 2.879 2.879h15.257a.863.863 0 1 0 0-1.728H4.88a1.151 1.151 0 0 1-1.152-1.151h16.41a.863.863 0 0 0 .863-.864V3.363A2.88 2.88 0 0 0 18.121.484H4.88ZM19.273 18.91H3.727V3.363A1.152 1.152 0 0 1 4.88 2.212H18.12a1.152 1.152 0 0 1 1.152 1.151V18.91Z\",\n fill: \"currentColor\"\n })));\n};\nexport default SvgSearchBook;","import { useRef, useState } from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\n\nimport VerseAdvancedCopy from '../AdvancedCopy/VerseAdvancedCopy';\n\nimport styles from './VerseActionAdvancedCopy.module.scss';\n\nimport ContentModal from '@/dls/ContentModal/ContentModal';\nimport ContentModalHandles from '@/dls/ContentModal/types/ContentModalHandles';\nimport Action from '@/dls/Modal/Action';\nimport Footer from '@/dls/Modal/Footer';\nimport PopoverMenu from '@/dls/PopoverMenu/PopoverMenu';\nimport Spinner from '@/dls/Spinner/Spinner';\nimport AdvancedCopyIcon from '@/icons/clipboard.svg';\nimport { logEvent } from '@/utils/eventLogger';\nimport Verse from 'types/Verse';\n\ntype VerseActionAdvancedCopyProps = {\n verse: Verse;\n isTranslationView: boolean;\n onActionTriggered?: () => void;\n};\n\nconst CLOSE_POPOVER_AFTER_MS = 150;\n\nconst VerseActionAdvancedCopy = ({\n verse,\n isTranslationView,\n onActionTriggered,\n}: VerseActionAdvancedCopyProps) => {\n const { t } = useTranslation('quran-reader');\n const [isModalOpen, setIsModalOpen] = useState(false);\n const contentModalRef = useRef<ContentModalHandles>();\n\n const onModalClose = () => {\n logEvent(\n // eslint-disable-next-line i18next/no-literal-string\n `${isTranslationView ? 'translation_view' : 'reading_view'}_advanced_copy_modal_close`,\n );\n setIsModalOpen(false);\n if (onActionTriggered) {\n setTimeout(() => {\n // we set a really short timeout to close the popover after the modal has been closed to allow enough time for the fadeout css effect to apply.\n onActionTriggered();\n }, CLOSE_POPOVER_AFTER_MS);\n }\n };\n\n const onModalOpen = () => {\n // eslint-disable-next-line i18next/no-literal-string\n logEvent(`${isTranslationView ? 'translation_view' : 'reading_view'}_advanced_copy_modal_open`);\n setIsModalOpen(true);\n };\n\n return (\n <>\n <PopoverMenu.Item icon={<AdvancedCopyIcon />} onClick={onModalOpen}>\n {t('advanced-copy')}\n </PopoverMenu.Item>\n <ContentModal\n innerRef={contentModalRef}\n isOpen={isModalOpen}\n header={<p className={styles.header}>{t('advanced-copy')}</p>}\n hasCloseButton\n onClose={onModalClose}\n onEscapeKeyDown={onModalClose}\n contentClassName={styles.contentWrapper}\n >\n <VerseAdvancedCopy verse={verse}>\n {({ ayahSelectionComponent, actionText, onCopy, loading }) => (\n <>\n {ayahSelectionComponent}\n <div className={styles.footerContainer}>\n <Footer>\n <Action isDisabled={loading} onClick={onCopy}>\n {loading ? <Spinner /> : actionText}\n </Action>\n </Footer>\n </div>\n </>\n )}\n </VerseAdvancedCopy>\n </ContentModal>\n </>\n );\n};\n\nexport default VerseActionAdvancedCopy;\n","import { useState } from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\n\nimport { RepetitionMode } from '../AudioPlayer/RepeatAudioModal/SelectRepetitionMode';\nimport PopoverMenu from '../dls/PopoverMenu/PopoverMenu';\n\nimport RepeatAudioModal from '@/components/AudioPlayer/RepeatAudioModal/RepeatAudioModal';\nimport RepeatIcon from '@/icons/repeat.svg';\nimport { logButtonClick } from '@/utils/eventLogger';\nimport { getChapterNumberFromKey } from '@/utils/verse';\n\ntype VerseActionRepeatAudioProps = {\n verseKey: string;\n isTranslationView: boolean;\n};\nconst VerseActionRepeatAudio = ({ verseKey, isTranslationView }: VerseActionRepeatAudioProps) => {\n const { t } = useTranslation('common');\n const [isModalOpen, setIsModalOpen] = useState(false);\n const chapterId = getChapterNumberFromKey(verseKey);\n\n const onItemClicked = () => {\n if (isTranslationView) {\n logButtonClick('translation_view_verse_actions_menu_repeat');\n } else {\n logButtonClick('reading_view_verse_actions_menu_repeat');\n }\n setIsModalOpen(true);\n };\n\n return (\n <>\n <RepeatAudioModal\n defaultRepetitionMode={RepetitionMode.Single}\n selectedVerseKey={verseKey}\n chapterId={chapterId.toString()}\n isOpen={isModalOpen}\n onClose={() => setIsModalOpen(false)}\n />\n <PopoverMenu.Item icon={<RepeatIcon />} onClick={onItemClicked}>\n {t('audio.player.repeat-1-verse')}\n </PopoverMenu.Item>\n </>\n );\n};\n\nexport default VerseActionRepeatAudio;\n","import React from 'react';\n\nimport useTranslation from 'next-translate/useTranslation';\n\nimport styles from './WordByWordHeading.module.scss';\n\ninterface Props {\n isTranslation: boolean;\n}\n\nconst WordByWordHeading: React.FC<Props> = ({ isTranslation }) => {\n const { t } = useTranslation('common');\n return (\n <p className={styles.heading}>\n {t(`wbw-${isTranslation ? 'translation' : 'transliteration'}`)}\n </p>\n );\n};\n\nexport default WordByWordHeading;\n","import { useRef, useState } from 'react';\n\nimport dynamic from 'next/dynamic';\nimport useTranslation from 'next-translate/useTranslation';\n\nimport WordByWordHeading from './WordByWordHeading';\nimport styles from './WordByWordVerseAction.module.scss';\n\nimport PlainVerseText from '@/components/Verse/PlainVerseText';\nimport ContentModalHandles from '@/dls/ContentModal/types/ContentModalHandles';\nimport PopoverMenu from '@/dls/PopoverMenu/PopoverMenu';\nimport Separator from '@/dls/Separator/Separator';\nimport SearchIcon from '@/icons/search-book.svg';\nimport { logButtonClick, logEvent } from '@/utils/eventLogger';\nimport Verse from 'types/Verse';\n\nconst ContentModal = dynamic(() => import('@/dls/ContentModal/ContentModal'), {\n ssr: false,\n});\n\ntype Props = {\n verse: Verse;\n onActionTriggered?: () => void;\n};\n\nconst CLOSE_POPOVER_AFTER_MS = 150;\n\nconst WordByWordVerseAction: React.FC<Props> = ({ verse, onActionTriggered }) => {\n const [isContentModalOpen, setIsContentModalOpen] = useState(false);\n const { t } = useTranslation('common');\n const contentModalRef = useRef<ContentModalHandles>();\n\n const onModalClosed = () => {\n // eslint-disable-next-line i18next/no-literal-string\n logEvent(`reading_view_wbw_modal_close`);\n setIsContentModalOpen(false);\n if (onActionTriggered) {\n setTimeout(() => {\n // we set a really short timeout to close the popover after the modal has been closed to allow enough time for the fadeout css effect to apply.\n onActionTriggered();\n }, CLOSE_POPOVER_AFTER_MS);\n }\n };\n\n const onIconClicked = () => {\n // eslint-disable-next-line i18next/no-literal-string\n logButtonClick(`reading_view_verse_actions_menu_wbw`);\n setIsContentModalOpen(true);\n };\n\n return (\n <>\n <PopoverMenu.Item icon={<SearchIcon />} onClick={onIconClicked}>\n {t('wbw')}\n </PopoverMenu.Item>\n <ContentModal\n innerRef={contentModalRef}\n isOpen={isContentModalOpen}\n header={<p className={styles.header} />}\n hasCloseButton\n onClose={onModalClosed}\n onEscapeKeyDown={onModalClosed}\n >\n <WordByWordHeading isTranslation />\n <PlainVerseText words={verse.words} shouldShowWordByWordTranslation />\n <Separator className={styles.separator} />\n <WordByWordHeading isTranslation={false} />\n <PlainVerseText words={verse.words} shouldShowWordByWordTransliteration />\n </ContentModal>\n </>\n );\n};\n\nexport default WordByWordVerseAction;\n","import React, { useState, useEffect } from 'react';\n\nimport clipboardCopy from 'clipboard-copy';\nimport useTranslation from 'next-translate/useTranslation';\nimport { useSelector, shallowEqual } from 'react-redux';\n\nimport BookmarkAction from './BookmarkAction';\nimport NotesAction from './Notes/NotesAction';\nimport SaveToCollectionAction from './SaveToCollectionAction';\nimport VerseActionAdvancedCopy from './VerseActionAdvancedCopy';\nimport VerseActionRepeatAudio from './VerseActionRepeatAudio';\n\nimport WordByWordVerseAction from '@/components/QuranReader/ReadingView/WordByWordVerseAction';\nimport PopoverMenu from '@/dls/PopoverMenu/PopoverMenu';\nimport { ToastStatus, useToast } from '@/dls/Toast/Toast';\nimport CopyLinkIcon from '@/icons/copy-link.svg';\nimport CopyIcon from '@/icons/copy.svg';\nimport { selectQuranReaderStyles } from '@/redux/slices/QuranReader/styles';\nimport { isLoggedIn } from '@/utils/auth/login';\nimport { logButtonClick } from '@/utils/eventLogger';\nimport { getWindowOrigin } from '@/utils/url';\nimport { getVerseAndChapterNumbersFromKey } from '@/utils/verse';\nimport { getWordTextFieldNameByFont } from '@/utils/word';\nimport Verse from 'types/Verse';\n\ninterface Props {\n verse: Verse;\n isTranslationView: boolean;\n onActionTriggered?: () => void;\n bookmarksRangeUrl: string;\n}\n\nconst RESET_ACTION_TEXT_TIMEOUT_MS = 3 * 1000;\n\nexport const onShareClicked = (\n verseKey: string,\n isTranslationView: boolean,\n callback: () => void,\n locale: string,\n) => {\n logButtonClick(\n // eslint-disable-next-line i18next/no-literal-string\n `${isTranslationView ? 'translation_view' : 'reading_view'}_verse_actions_menu_copy_link`,\n );\n const origin = getWindowOrigin(locale);\n const [chapter, verse] = getVerseAndChapterNumbersFromKey(verseKey);\n if (origin) {\n clipboardCopy(`${origin}/${chapter}/${verse}`).then(callback);\n }\n};\n\nconst OverflowVerseActionsMenuBody: React.FC<Props> = ({\n verse,\n isTranslationView,\n onActionTriggered,\n bookmarksRangeUrl,\n}) => {\n const { t, lang } = useTranslation('common');\n const [isCopied, setIsCopied] = useState(false);\n const [isShared, setIsShared] = useState(false);\n const quranReaderStyles = useSelector(selectQuranReaderStyles, shallowEqual);\n const toast = useToast();\n\n useEffect(() => {\n let timeoutId: ReturnType<typeof setTimeout>;\n // if the user has just copied the text, we should change the text back to Copy after 3 seconds.\n if (isCopied === true) {\n timeoutId = setTimeout(() => {\n setIsCopied(false);\n if (onActionTriggered) {\n onActionTriggered();\n }\n }, RESET_ACTION_TEXT_TIMEOUT_MS);\n }\n return () => {\n clearTimeout(timeoutId);\n };\n }, [isCopied, onActionTriggered]);\n\n useEffect(() => {\n let timeoutId: ReturnType<typeof setTimeout>;\n // if the user has just clicked the share action, we should change the text back after 3 seconds.\n if (isShared === true) {\n timeoutId = setTimeout(() => setIsShared(false), RESET_ACTION_TEXT_TIMEOUT_MS);\n }\n return () => {\n clearTimeout(timeoutId);\n };\n }, [isShared]);\n\n const onCopyClicked = () => {\n logButtonClick(\n // eslint-disable-next-line i18next/no-literal-string\n `${isTranslationView ? 'translation_view' : 'reading_view'}_verse_actions_menu_copy`,\n );\n const verseText = verse.words\n .map((word) => word[getWordTextFieldNameByFont(quranReaderStyles.quranFont)])\n .join(' ');\n clipboardCopy(verseText).then(() => {\n setIsCopied(true);\n });\n };\n\n const onShareVerseClicked = () => {\n onShareClicked(\n verse.verseKey,\n isTranslationView,\n () => toast(t('shared'), { status: ToastStatus.Success }),\n lang,\n );\n if (onActionTriggered) {\n onActionTriggered();\n }\n };\n\n return (\n <div>\n {!isTranslationView && <NotesAction verse={verse} />}\n <PopoverMenu.Item onClick={onCopyClicked} icon={<CopyIcon />}>\n {isCopied ? `${t('copied')}!` : `${t('quran-reader:copy-verse')}`}\n </PopoverMenu.Item>\n <PopoverMenu.Item onClick={onShareVerseClicked} icon={<CopyLinkIcon />}>\n {t('quran-reader:cpy-link')}\n </PopoverMenu.Item>\n\n <VerseActionAdvancedCopy\n onActionTriggered={onActionTriggered}\n verse={verse}\n isTranslationView={isTranslationView}\n />\n {!isTranslationView && (\n <WordByWordVerseAction verse={verse} onActionTriggered={onActionTriggered} />\n )}\n\n <BookmarkAction\n verse={verse}\n isTranslationView={isTranslationView}\n onActionTriggered={onActionTriggered}\n bookmarksRangeUrl={bookmarksRangeUrl}\n />\n\n {isLoggedIn() && (\n <SaveToCollectionAction\n verse={verse}\n bookmarksRangeUrl={bookmarksRangeUrl}\n isTranslationView={isTranslationView}\n />\n )}\n\n <VerseActionRepeatAudio isTranslationView={isTranslationView} verseKey={verse.verseKey} />\n </div>\n );\n};\n\nexport default OverflowVerseActionsMenuBody;\n","import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport classNames from 'classnames';\n\nimport styles from './Item.module.scss';\n\ninterface Props extends RadioGroupPrimitive.RadioGroupItemProps {\n indicatorClassName?: string;\n}\n\nconst Item = ({ className, indicatorClassName, ...props }: Props) => (\n <RadioGroupPrimitive.Item className={classNames(styles.radioItem, className)} {...props}>\n <RadioGroupPrimitive.Indicator className={classNames(styles.indicator, indicatorClassName)} />\n </RadioGroupPrimitive.Item>\n);\n\nexport default Item;\n","import React from 'react';\n\nimport classNames from 'classnames';\n\nimport Item from './Item';\nimport styles from './RadioGroup.module.scss';\nimport Root, { Props as RootProps } from './Root';\n\nexport interface RadioItem {\n value: string;\n id: string;\n label: string;\n disabled?: boolean;\n required?: boolean;\n}\n\ninterface Props extends RootProps {\n items: RadioItem[];\n disabled?: boolean;\n}\n\nconst RadioGroup = ({ items, disabled = false, ...props }: Props) => {\n return (\n <Root {...props}>\n {items.map((item) => {\n const isDisabled = disabled === true || item.disabled === true;\n return (\n <div className={styles.radioItemContainer} key={item.id}>\n <Item\n value={item.value}\n id={item.id}\n disabled={isDisabled}\n required={item.required || false}\n />\n\n <label\n htmlFor={item.id}\n className={classNames(styles.label, { [styles.disabled]: isDisabled })}\n >\n {item.label}\n </label>\n </div>\n );\n })}\n </Root>\n );\n};\n\nRadioGroup.Root = Root;\nRadioGroup.Item = Item;\n\n// export `RadioGroupOrientation` type from here so that files that are using it don't break\nexport { RadioRootOrientation as RadioGroupOrientation } from './Root';\n\nexport default RadioGroup;\n","import React from 'react';\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport classNames from 'classnames';\n\nimport styles from './Root.module.scss';\n\nimport useDirection from '@/hooks/useDirection';\nimport { Direction } from '@/utils/locale';\n\nexport enum RadioRootOrientation {\n Horizontal = 'horizontal',\n Vertical = 'vertical',\n}\n\nexport interface Props {\n orientation?: RadioRootOrientation;\n label: string;\n defaultValue?: string;\n onChange?: (value: string) => void;\n value?: string;\n name?: string;\n required?: boolean;\n className?: string;\n children?: React.ReactNode;\n}\n\nconst Root: React.FC<Props> = ({\n className,\n label,\n orientation = RadioRootOrientation.Vertical,\n onChange,\n defaultValue,\n value,\n name,\n required,\n children,\n}) => {\n const direction = useDirection();\n\n return (\n <RadioGroupPrimitive.Root\n className={classNames(styles.container, className)}\n dir={direction as Direction}\n aria-label={label}\n orientation={orientation}\n {...(onChange && { onValueChange: onChange })}\n {...(defaultValue && { defaultValue })}\n {...(value && { value })}\n {...(name && { name })}\n {...(required && { required })}\n >\n {children}\n </RadioGroupPrimitive.Root>\n );\n};\n\nexport default Root;\n","import useSWRImmutable from 'swr/immutable';\n\nimport { countNotesWithinRange } from '@/utils/auth/api';\nimport { isLoggedIn } from '@/utils/auth/login';\n\ntype Range = {\n from: string;\n to: string;\n};\n\nconst useCountRangeNotes = (notesRange: Range) => {\n const { data, isValidating, error } = useSWRImmutable(\n notesRange && isLoggedIn() ? `countNotes/${notesRange.from}-${notesRange.to}` : null,\n async () => {\n return countNotesWithinRange(notesRange.from, notesRange.to);\n },\n );\n\n return {\n data,\n isLoading: isValidating && !data,\n error,\n };\n};\n\nexport default useCountRangeNotes;\n","/* eslint-disable import/prefer-default-export */\nimport { QuranFont } from 'types/QuranReader';\nimport Verse from 'types/Verse';\nimport { CharType } from 'types/Word';\n\n/**\n * Construct the verse text given an array of words.\n *\n * @param {Verse} verse\n * @returns {string}\n */\nexport const getVerseTextByWords = (verse: Verse): string => {\n let verseText = '';\n verse.words.forEach((word) => {\n if (word.charTypeName !== CharType.End) {\n verseText = `${verseText} ${word.text}`;\n }\n });\n return verseText;\n};\n\n/**\n * Get the text field name based on the currently\n * selected quranFont.\n *\n * @param {QuranFont} quranFont\n * @returns {string}\n */\nexport const getWordTextFieldNameByFont = (quranFont: QuranFont): string => {\n switch (quranFont) {\n case QuranFont.IndoPak:\n return 'textIndopak';\n\n default:\n return 'textUthmani';\n }\n};\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"SaveToCollectionModal_header__5hcpQ\",\"collectionList\":\"SaveToCollectionModal_collectionList__MdlrT\",\"collectionItem\":\"SaveToCollectionModal_collectionItem__6Yau_\",\"newCollectionFormContainer\":\"SaveToCollectionModal_newCollectionFormContainer__NPQSB\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"heading\":\"WordByWordHeading_heading__9nGyi\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"WordByWordVerseAction_header__Q30MM\",\"separator\":\"WordByWordVerseAction_separator__0M_OY\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"buttonContainer\":\"VerseAdvancedCopy_buttonContainer__oMXk8\",\"customMessage\":\"VerseAdvancedCopy_customMessage__PZjXT\",\"label\":\"VerseAdvancedCopy_label__n0Uin\",\"fontLabelContainer\":\"VerseAdvancedCopy_fontLabelContainer__hietA\",\"emptyCheckbox\":\"VerseAdvancedCopy_emptyCheckbox__zFHCy\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"header\":\"VerseActionAdvancedCopy_header__QY25i\",\"footerContainer\":\"VerseActionAdvancedCopy_footerContainer__a44dp\",\"contentWrapper\":\"VerseActionAdvancedCopy_contentWrapper__RjSEQ\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"indicator\":\"Item_indicator__x6BoJ\",\"radioItem\":\"Item_radioItem__DEP6h\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"radioItemContainer\":\"RadioGroup_radioItemContainer__Zpb6v\",\"label\":\"RadioGroup_label__h0v1C\",\"disabled\":\"RadioGroup_disabled__aU243\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"container\":\"Root_container__FbYRt\"};","import $73KQ4$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $73KQ4$forwardRef, createElement as $73KQ4$createElement, useCallback as $73KQ4$useCallback, useState as $73KQ4$useState, useRef as $73KQ4$useRef, useEffect as $73KQ4$useEffect} from \"react\";\nimport {composeEventHandlers as $73KQ4$composeEventHandlers} from \"@radix-ui/primitive\";\nimport {createContextScope as $73KQ4$createContextScope} from \"@radix-ui/react-context\";\nimport {useControllableState as $73KQ4$useControllableState} from \"@radix-ui/react-use-controllable-state\";\nimport {useLayoutEffect as $73KQ4$useLayoutEffect} from \"@radix-ui/react-use-layout-effect\";\nimport {useComposedRefs as $73KQ4$useComposedRefs} from \"@radix-ui/react-compose-refs\";\nimport {Primitive as $73KQ4$Primitive} from \"@radix-ui/react-primitive\";\nimport {Presence as $73KQ4$Presence} from \"@radix-ui/react-presence\";\nimport {useId as $73KQ4$useId} from \"@radix-ui/react-id\";\n\n\n\n\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Collapsible\n * -----------------------------------------------------------------------------------------------*/ const $409067139f391064$var$COLLAPSIBLE_NAME = 'Collapsible';\nconst [$409067139f391064$var$createCollapsibleContext, $409067139f391064$export$952b32dcbe73087a] = $73KQ4$createContextScope($409067139f391064$var$COLLAPSIBLE_NAME);\nconst [$409067139f391064$var$CollapsibleProvider, $409067139f391064$var$useCollapsibleContext] = $409067139f391064$var$createCollapsibleContext($409067139f391064$var$COLLAPSIBLE_NAME);\nconst $409067139f391064$export$6eb0f7ddcda6131f = /*#__PURE__*/ $73KQ4$forwardRef((props, forwardedRef)=>{\n const { __scopeCollapsible: __scopeCollapsible , open: openProp , defaultOpen: defaultOpen , disabled: disabled , onOpenChange: onOpenChange , ...collapsibleProps } = props;\n const [open = false, setOpen] = $73KQ4$useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /*#__PURE__*/ $73KQ4$createElement($409067139f391064$var$CollapsibleProvider, {\n scope: __scopeCollapsible,\n disabled: disabled,\n contentId: $73KQ4$useId(),\n open: open,\n onOpenToggle: $73KQ4$useCallback(()=>setOpen((prevOpen)=>!prevOpen\n )\n , [\n setOpen\n ])\n }, /*#__PURE__*/ $73KQ4$createElement($73KQ4$Primitive.div, $73KQ4$babelruntimehelpersesmextends({\n \"data-state\": $409067139f391064$var$getState(open),\n \"data-disabled\": disabled ? '' : undefined\n }, collapsibleProps, {\n ref: forwardedRef\n })));\n});\n/*#__PURE__*/ Object.assign($409067139f391064$export$6eb0f7ddcda6131f, {\n displayName: $409067139f391064$var$COLLAPSIBLE_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * CollapsibleTrigger\n * -----------------------------------------------------------------------------------------------*/ const $409067139f391064$var$TRIGGER_NAME = 'CollapsibleTrigger';\nconst $409067139f391064$export$c135dce7b15bbbdc = /*#__PURE__*/ $73KQ4$forwardRef((props, forwardedRef)=>{\n const { __scopeCollapsible: __scopeCollapsible , ...triggerProps } = props;\n const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$TRIGGER_NAME, __scopeCollapsible);\n return /*#__PURE__*/ $73KQ4$createElement($73KQ4$Primitive.button, $73KQ4$babelruntimehelpersesmextends({\n type: \"button\",\n \"aria-controls\": context.contentId,\n \"aria-expanded\": context.open || false,\n \"data-state\": $409067139f391064$var$getState(context.open),\n \"data-disabled\": context.disabled ? '' : undefined,\n disabled: context.disabled\n }, triggerProps, {\n ref: forwardedRef,\n onClick: $73KQ4$composeEventHandlers(props.onClick, context.onOpenToggle)\n }));\n});\n/*#__PURE__*/ Object.assign($409067139f391064$export$c135dce7b15bbbdc, {\n displayName: $409067139f391064$var$TRIGGER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * CollapsibleContent\n * -----------------------------------------------------------------------------------------------*/ const $409067139f391064$var$CONTENT_NAME = 'CollapsibleContent';\nconst $409067139f391064$export$aadde00976f34151 = /*#__PURE__*/ $73KQ4$forwardRef((props, forwardedRef)=>{\n const { forceMount: forceMount , ...contentProps } = props;\n const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$CONTENT_NAME, props.__scopeCollapsible);\n return /*#__PURE__*/ $73KQ4$createElement($73KQ4$Presence, {\n present: forceMount || context.open\n }, ({ present: present })=>/*#__PURE__*/ $73KQ4$createElement($409067139f391064$var$CollapsibleContentImpl, $73KQ4$babelruntimehelpersesmextends({}, contentProps, {\n ref: forwardedRef,\n present: present\n }))\n );\n});\n/*#__PURE__*/ Object.assign($409067139f391064$export$aadde00976f34151, {\n displayName: $409067139f391064$var$CONTENT_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ const $409067139f391064$var$CollapsibleContentImpl = /*#__PURE__*/ $73KQ4$forwardRef((props, forwardedRef)=>{\n const { __scopeCollapsible: __scopeCollapsible , present: present , children: children , ...contentProps } = props;\n const context = $409067139f391064$var$useCollapsibleContext($409067139f391064$var$CONTENT_NAME, __scopeCollapsible);\n const [isPresent, setIsPresent] = $73KQ4$useState(present);\n const ref = $73KQ4$useRef(null);\n const composedRefs = $73KQ4$useComposedRefs(forwardedRef, ref);\n const heightRef = $73KQ4$useRef(0);\n const height = heightRef.current;\n const widthRef = $73KQ4$useRef(0);\n const width = widthRef.current; // when opening we want it to immediately open to retrieve dimensions\n // when closing we delay `present` to retrieve dimensions before closing\n const isOpen = context.open || isPresent;\n const isMountAnimationPreventedRef = $73KQ4$useRef(isOpen);\n const originalStylesRef = $73KQ4$useRef();\n $73KQ4$useEffect(()=>{\n const rAF = requestAnimationFrame(()=>isMountAnimationPreventedRef.current = false\n );\n return ()=>cancelAnimationFrame(rAF)\n ;\n }, []);\n $73KQ4$useLayoutEffect(()=>{\n const node = ref.current;\n if (node) {\n originalStylesRef.current = originalStylesRef.current || {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName\n }; // block any animations/transitions so the element renders at its full dimensions\n node.style.transitionDuration = '0s';\n node.style.animationName = 'none'; // get width and height from full dimensions\n const rect = node.getBoundingClientRect();\n heightRef.current = rect.height;\n widthRef.current = rect.width; // kick off any animations/transitions that were originally set up if it isn't the initial mount\n if (!isMountAnimationPreventedRef.current) {\n node.style.transitionDuration = originalStylesRef.current.transitionDuration;\n node.style.animationName = originalStylesRef.current.animationName;\n }\n setIsPresent(present);\n }\n /**\n * depends on `context.open` because it will change to `false`\n * when a close is triggered but `present` will be `false` on\n * animation end (so when close finishes). This allows us to\n * retrieve the dimensions *before* closing.\n */ }, [\n context.open,\n present\n ]);\n return /*#__PURE__*/ $73KQ4$createElement($73KQ4$Primitive.div, $73KQ4$babelruntimehelpersesmextends({\n \"data-state\": $409067139f391064$var$getState(context.open),\n \"data-disabled\": context.disabled ? '' : undefined,\n id: context.contentId,\n hidden: !isOpen\n }, contentProps, {\n ref: composedRefs,\n style: {\n [`--radix-collapsible-content-height`]: height ? `${height}px` : undefined,\n [`--radix-collapsible-content-width`]: width ? `${width}px` : undefined,\n ...props.style\n }\n }), isOpen && children);\n});\n/* -----------------------------------------------------------------------------------------------*/ function $409067139f391064$var$getState(open) {\n return open ? 'open' : 'closed';\n}\nconst $409067139f391064$export$be92b6f5f03c0fe9 = $409067139f391064$export$6eb0f7ddcda6131f;\nconst $409067139f391064$export$41fb9f06171c75f4 = $409067139f391064$export$c135dce7b15bbbdc;\nconst $409067139f391064$export$7c6e2c02157bb7d2 = $409067139f391064$export$aadde00976f34151;\n\n\n\n\nexport {$409067139f391064$export$952b32dcbe73087a as createCollapsibleScope, $409067139f391064$export$6eb0f7ddcda6131f as Collapsible, $409067139f391064$export$c135dce7b15bbbdc as CollapsibleTrigger, $409067139f391064$export$aadde00976f34151 as CollapsibleContent, $409067139f391064$export$be92b6f5f03c0fe9 as Root, $409067139f391064$export$41fb9f06171c75f4 as Trigger, $409067139f391064$export$7c6e2c02157bb7d2 as Content};\n//# sourceMappingURL=index.mjs.map\n"],"names":["_path","_extends","Object","assign","bind","n","e","arguments","length","t","r","hasOwnProperty","call","apply","props","xmlns","width","height","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","className","d","_path2","_rect","x","y","rx","ry","fillRule","clipRule","makeError","DOMException","module","exports","async","text","navigator","clipboard","writeText","copyClipboardApi","err","span","document","createElement","textContent","style","whiteSpace","webkitUserSelect","userSelect","body","appendChild","selection","window","getSelection","range","createRange","removeAllRanges","selectNode","addRange","success","execCommand","removeChild","copyExecCommand","err2","string","split","array","start","end","index","result","Array","baseSlice","undefined","castSlice","hasUnicode","stringToArray","toString","methodName","strSymbols","chr","charAt","trailing","join","slice","reHasUnicode","RegExp","test","asciiToArray","unicodeToArray","rsAstral","rsCombo","rsFitz","rsNonAstral","rsRegional","rsSurrPair","reOptMod","rsOptVar","rsSeq","rsSymbol","reUnicode","match","upperFirst","toLowerCase","createCaseFirst","verse","isTranslationView","onActionTriggered","bookmarksRangeUrl","bookmarkedVerses","useSelector","selectBookmarks","shallowEqual","quranReaderStyles","selectQuranReaderStyles","mushafId","getMushafId","quranFont","mushafLines","mushaf","useTranslation","dispatch","useDispatch","toast","useToast","useSWRConfig","cache","mutate","useSWRImmutable","isLoggedIn","makeBookmarkUrl","Number","chapterId","BookmarkType","verseNumber","getBookmark","data","isValidating","isVerseBookmarked","useMemo","isUserLoggedIn","bookmark","verseKey","updateInBookmarkRange","value","bookmarkedVersesRange","get","nextBookmarkedVersesRange","globalMutate","revalidate","bookmarkIcon","Spinner","isVerseBookmarkedLoading","BookmarkedIcon","UnBookmarkedIcon","PopoverMenu","onClick","logButtonClick","delete","makeBookmarksUrl","deleteBookmarkById","id","then","status","ToastStatus","addBookmark","key","type","newBookmark","catch","toggleVerseBookmark","icon","isDisabled","useCountRangeNotes","from","to","useState","isModalOpen","setIsModalOpen","router","useRouter","hasNotes","notesCount","push","getLoginNavigationUrl","getChapterWithStartingVerseUrl","NotesIcon","EmptyNotesIcon","NoteModal","isOpen","onClose","collections","onCollectionToggled","onNewCollectionCreated","isAddingNewCollection","setIsAddingNewCollection","isSubmitting","setIsSubmitting","contentModalRef","useRef","handleCheckboxChange","collection","checked","eventData","collectionId","logEvent","ContentModal","innerRef","header","p","styles","hasCloseButton","onEscapeKeyDown","size","ContentModalSize","div","map","Checkbox","name","defaultChecked","label","onChange","FormBuilder","formFields","field","placeholder","rules","RuleType","errorMessage","FormFieldType","actionText","onSubmit","collectionName","finally","Button","variant","ButtonVariant","prefix","PlusIcon","isSaveCollectionModalOpen","setIsSaveCollectionModalOpen","useSWR","makeCollectionsUrl","getCollectionsList","makeBookmarkCollectionsUrl","getBookmarkCollections","mutateIsResourceBookmarked","globalSWRMutate","mutateBookmarksUrl","isDataReady","bookmarkCollectionIdsData","collectionListData","includes","SaveToCollectionModal","changedCollection","newValue","addCollectionBookmark","mutateCollectionListData","mutateBookmarkCollectionIdsData","deleteCollectionBookmarkByKey","newCollectionName","addCollection","newCollection","showRangeOfVerses","rangeStartVerse","rangeEndVerse","translations","shouldCopyFootnotes","shouldIncludeTranslatorName","shouldCopyFont","fromVerse","toVerse","toBeCopiedTranslations","keys","filter","translationId","shouldBeCopied","getAdvancedCopyRawResult","raw","footnote","translatorName","MushafLines","res","textToBlob","Blob","copyText","textBlobPromise","write","ClipboardItem","clipboardCopy","copyVerse","getTextToCopy","selectedRangeStartVerseKey","selectedRangeEndVerseKey","getVerseNumberFromKey","SINGLE_VERSE","MULTIPLE_VERSES","TRUE_STRING","String","FALSE_STRING","TO_COPY_FONTS","QuranFont","children","lang","chaptersData","useContext","DataContext","selectedTranslations","selectSelectedTranslations","areArraysEqual","setShowRangeOfVerses","rangeVersesItems","setRangeVersesItems","setRangeStartVerse","setRangeEndVerse","setShouldCopyFont","setShouldCopyFootnotes","setShouldIncludeTranslatorName","setTranslations","customMessageComponent","setCustomMessage","isCopied","setIsCopied","objectUrl","setObjectUrl","isLoadingData","setIsLoadingData","useEffect","timeoutId","setTimeout","clearTimeout","translationsResponse","makeTranslationsUrl","getAvailableTranslations","Error","throwIfError","availableTranslations","responseTranslations","translation","forEach","translatedName","onRangeBoundariesChange","useCallback","selectedName","verseSelectorId","RangeSelectorType","ayahSelectionComponent","RadioGroup","orientation","RadioGroupOrientation","logValueChange","generateChapterVersesKeys","chapterVersesKey","toLocalizedVerseKey","startFromVerseNumber","onRangeOfVersesTypeSelected","items","VersesRangeSelector","isVisible","dropdownItems","prevTranslations","logItemSelectionChange","onCopyTranslationChange","includeTranslatorName","shouldInclude","classNames","HelperTooltip","Select","options","font","val","shouldCopyString","shouldCopy","Link","href","download","LinkVariant","loading","onCopy","validationError","validateRangeSelection","blob","URL","createObjectURL","onModalClose","AdvancedCopyIcon","contentClassName","VerseAdvancedCopy","Footer","Action","getChapterNumberFromKey","RepeatAudioModal","defaultRepetitionMode","RepetitionMode","selectedVerseKey","RepeatIcon","isTranslation","dynamic","ssr","isContentModalOpen","setIsContentModalOpen","onModalClosed","SearchIcon","WordByWordHeading","PlainVerseText","words","shouldShowWordByWordTranslation","Separator","shouldShowWordByWordTransliteration","onShareClicked","callback","locale","origin","getWindowOrigin","getVerseAndChapterNumbersFromKey","chapter","isShared","setIsShared","NotesAction","verseText","word","getWordTextFieldNameByFont","CopyIcon","CopyLinkIcon","VerseActionAdvancedCopy","WordByWordVerseAction","BookmarkAction","SaveToCollectionAction","VerseActionRepeatAudio","indicatorClassName","RadioGroupPrimitive","disabled","Root","item","Item","required","htmlFor","RadioRootOrientation","Vertical","defaultValue","direction","useDirection","dir","aria-label","onValueChange","notesRange","countNotesWithinRange","isLoading","error","$409067139f391064$var$COLLAPSIBLE_NAME","$409067139f391064$var$createCollapsibleContext","$409067139f391064$export$952b32dcbe73087a","$409067139f391064$var$CollapsibleProvider","$409067139f391064$var$useCollapsibleContext","$409067139f391064$export$6eb0f7ddcda6131f","forwardedRef","__scopeCollapsible","open","openProp","defaultOpen","onOpenChange","collapsibleProps","setOpen","prop","defaultProp","scope","contentId","onOpenToggle","prevOpen","$409067139f391064$var$getState","ref","$409067139f391064$var$TRIGGER_NAME","$409067139f391064$export$c135dce7b15bbbdc","triggerProps","context","$409067139f391064$var$CONTENT_NAME","$409067139f391064$export$aadde00976f34151","forceMount","contentProps","present","$409067139f391064$var$CollapsibleContentImpl","isPresent","setIsPresent","composedRefs","heightRef","current","widthRef","isMountAnimationPreventedRef","originalStylesRef","rAF","requestAnimationFrame","cancelAnimationFrame","node","transitionDuration","animationName","rect","getBoundingClientRect","hidden","$409067139f391064$export$be92b6f5f03c0fe9","$409067139f391064$export$41fb9f06171c75f4"],"sourceRoot":""}