dbf-mirador 4.2.5 → 4.3.0-testing2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -80
- package/dist/AudioViewer-tRH73pbt.js +40 -0
- package/dist/AudioViewer-tRH73pbt.js.map +1 -0
- package/dist/{CommentSharp-NUjBddtU.js → CommentSharp-DaW0oBJy.js} +40 -43
- package/dist/CommentSharp-DaW0oBJy.js.map +1 -0
- package/dist/{FailedImageContext-CMg_Behz.js → FailedImageContext-DYZ9cZx9.js} +6 -6
- package/dist/FailedImageContext-DYZ9cZx9.js.map +1 -0
- package/dist/GalleryView-DyLH1kk0.js +176 -0
- package/dist/GalleryView-DyLH1kk0.js.map +1 -0
- package/dist/OpenSeadragonViewer-CBmX5sYE.js +7852 -0
- package/dist/OpenSeadragonViewer-CBmX5sYE.js.map +1 -0
- package/dist/{PluginHook-D8r77ZZu.js → PluginHook-DWFCXIIp.js} +3 -3
- package/dist/PluginHook-DWFCXIIp.js.map +1 -0
- package/dist/SelectCollection-BK9ZDkK3.js +67 -0
- package/dist/SelectCollection-BK9ZDkK3.js.map +1 -0
- package/dist/TextViewer-D_1qzQE4.js +38 -0
- package/dist/TextViewer-D_1qzQE4.js.map +1 -0
- package/dist/VideoViewer-DzNjgLWE.js +42 -0
- package/dist/VideoViewer-DzNjgLWE.js.map +1 -0
- package/dist/{WindowCanvasNavigationControls-BTkfeaAf.js → WindowCanvasNavigationControls-D2uLtL_A.js} +7 -7
- package/dist/WindowCanvasNavigationControls-D2uLtL_A.js.map +1 -0
- package/dist/WindowViewer-BW0_w7wv.js +27 -0
- package/dist/WindowViewer-BW0_w7wv.js.map +1 -0
- package/dist/WorkspaceArea-C0RjqnIL.js +22222 -0
- package/dist/WorkspaceArea-C0RjqnIL.js.map +1 -0
- package/dist/{canvas-BqYerOKD.js → canvas-2ACcnS9Y.js} +2 -2
- package/dist/{canvas-BqYerOKD.js.map → canvas-2ACcnS9Y.js.map} +1 -1
- package/dist/{canvases-DU_CwLPL.js → canvases-DTR37lo-.js} +190 -90
- package/dist/canvases-DTR37lo-.js.map +1 -0
- package/dist/{getters-_7oCN-rP.js → getters-B4oepJRC.js} +257 -280
- package/dist/getters-B4oepJRC.js.map +1 -0
- package/dist/{index.module-D9wVojda.js → index.module-CgUBfaXx.js} +6 -6
- package/dist/index.module-CgUBfaXx.js.map +1 -0
- package/dist/mirador.es.js +8778 -39138
- package/dist/mirador.es.js.map +1 -1
- package/dist/mirador.min.js +75 -74
- package/dist/mirador.min.js.map +1 -1
- package/dist/{react-error-boundary.esm-B_pT-oCS.js → react-error-boundary.esm-ByHqCaxk.js} +2 -2
- package/dist/react-error-boundary.esm-ByHqCaxk.js.map +1 -0
- package/dist/{visuallyHidden-qk1C0S9l.js → visuallyHidden-C4mhQkB0.js} +4 -4
- package/dist/visuallyHidden-C4mhQkB0.js.map +1 -0
- package/dist/{window-BYD7F_2a.js → window-COQOIAli.js} +2 -2
- package/dist/{window-BYD7F_2a.js.map → window-COQOIAli.js.map} +1 -1
- package/package.json +3 -2
- package/dist/CommentSharp-NUjBddtU.js.map +0 -1
- package/dist/FailedImageContext-CMg_Behz.js.map +0 -1
- package/dist/PluginHook-D8r77ZZu.js.map +0 -1
- package/dist/WindowCanvasNavigationControls-BTkfeaAf.js.map +0 -1
- package/dist/canvases-DU_CwLPL.js.map +0 -1
- package/dist/getters-_7oCN-rP.js.map +0 -1
- package/dist/index.module-D9wVojda.js.map +0 -1
- package/dist/react-error-boundary.esm-B_pT-oCS.js.map +0 -1
- package/dist/visuallyHidden-qk1C0S9l.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.module-D9wVojda.js","names":["r","n","t"],"sources":["../../node_modules/lodash/_isFlattenable.js","../../node_modules/lodash/_baseFlatten.js","../../node_modules/lodash/_overRest.js","../../node_modules/lodash/_baseRest.js","../../node_modules/lodash/_arrayIncludesWith.js","../../node_modules/lodash/_createSet.js","../../node_modules/lodash/_baseUniq.js","../../node_modules/lodash/isArrayLikeObject.js","../../node_modules/lodash/_baseDifference.js","../src/state/selectors/layers.js","../../node_modules/normalize-url/index.js","../src/lib/CanvasWorld.js","../../node_modules/use-debounce/dist/index.module.js"],"sourcesContent":["var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n","var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n arrayMap = require('./_arrayMap'),\n baseUnary = require('./_baseUnary'),\n cacheHas = require('./_cacheHas');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee == null ? value : iteratee(value);\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseDifference;\n","import { createSelector } from 'reselect';\nimport { getMiradorCanvasWrapper } from './wrappers';\nimport { getCanvas, getVisibleCanvasIds } from './canvases';\nimport { miradorSlice, EMPTY_ARRAY } from './utils';\n\n/**\n * Get the image layers from a canvas.\n * @param {object} state\n * @param {object} props\n * @param {string} props.canvasId\n * @param {string} props.windowId\n * @param {string} props.companionWindowId\n * @returns {Array}\n */\nexport const getCanvasLayers = createSelector([getCanvas, getMiradorCanvasWrapper], (canvas, getMiradorCanvas) => {\n if (!canvas) return [];\n return getMiradorCanvas(canvas).imageResources;\n});\n\nexport const getLayersForWindow = createSelector(\n [(state) => miradorSlice(state).layers, (state, { windowId }) => windowId],\n (layers, windowId) => (layers ? layers[windowId] || EMPTY_ARRAY : EMPTY_ARRAY),\n);\n\n/**\n * Get the layer state for a particular canvas.\n * @param {object} state\n * @param {string} windowId\n * @returns {object}\n */\nexport const getLayers = createSelector(\n [getLayersForWindow, (state, { canvasId }) => canvasId],\n (layers, canvasId) => layers[canvasId],\n);\n\n/**\n * Returns a list of canvas layers, sorted by the layer state configuration.\n * @param {object} state\n * @param {object} props\n * @param {string} props.companionWindowId\n * @returns {Array}\n */\nexport const getSortedLayers = createSelector([getCanvasLayers, getLayers], (canvasLayers, layerConfig) => {\n if (!layerConfig) return canvasLayers;\n\n const sorted = canvasLayers.sort((a, b) => {\n if (\n layerConfig[a.id] &&\n layerConfig[a.id].index !== undefined &&\n layerConfig[b.id] &&\n layerConfig[b.id].index !== undefined\n ) {\n return layerConfig[a.id].index - layerConfig[b.id].index;\n }\n\n // sort a layer with index data above layers without\n if (layerConfig[a.id] && layerConfig[a.id].index !== undefined) return -1;\n if (layerConfig[b.id] && layerConfig[b.id].index !== undefined) return 1;\n\n return 0;\n });\n\n return sorted;\n});\n\n/**\n * Get all the layer configuration for visible canvases.\n * @param {object} state\n * @param {object} props\n * @param {string} props.windowId\n * @returns {object}\n */\nexport const getLayersForVisibleCanvases = createSelector([getVisibleCanvasIds, getLayersForWindow], (canvasIds, layers) =>\n canvasIds.reduce((acc, canvasId) => {\n // eslint-disable-next-line no-param-reassign\n acc[canvasId] = layers[canvasId];\n return acc;\n }, {}),\n);\n","// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\nconst DATA_URL_DEFAULT_MIME_TYPE = 'text/plain';\nconst DATA_URL_DEFAULT_CHARSET = 'us-ascii';\n\nconst encodedReservedCharactersPattern = '%(?:3A|2F|3F|23|5B|5D|40|21|24|26|27|28|29|2A|2B|2C|3B|3D)';\nconst temporaryEncodedReservedTokenBase = '__normalize_url_encoded_reserved__';\nconst temporaryEncodedReservedTokenPattern = /__normalize_url_encoded_reserved__(\\d+)__/g;\nconst hasEncodedReservedCharactersRegex = new RegExp(encodedReservedCharactersPattern, 'i');\nconst encodedReservedCharactersRegex = new RegExp(encodedReservedCharactersPattern, 'gi');\n\nconst testParameter = (name, filters) => Array.isArray(filters) && filters.some(filter => {\n\tif (filter instanceof RegExp) {\n\t\tif (filter.flags.includes('g') || filter.flags.includes('y')) {\n\t\t\treturn new RegExp(filter.source, filter.flags.replaceAll(/[gy]/g, '')).test(name);\n\t\t}\n\n\t\treturn filter.test(name);\n\t}\n\n\treturn filter === name;\n});\n\nconst supportedProtocols = new Set([\n\t'https:',\n\t'http:',\n\t'file:',\n]);\n\nconst normalizeCustomProtocolOption = protocol => {\n\tif (typeof protocol !== 'string') {\n\t\treturn undefined;\n\t}\n\n\tconst normalizedProtocol = protocol.trim().toLowerCase().replace(/:$/, '');\n\treturn normalizedProtocol === '' ? undefined : `${normalizedProtocol}:`;\n};\n\nconst getCustomProtocol = urlString => {\n\ttry {\n\t\tconst {protocol} = new URL(urlString);\n\t\tconst hasAuthority = urlString.slice(0, protocol.length + 2).toLowerCase() === `${protocol}//`;\n\n\t\t// Avoid treating \"localhost:port\" (e.g. \"localhost:9802\") as a custom protocol.\n\t\tif (protocol === 'localhost:' && !hasAuthority && /^\\d{1,5}([/?#]|$)/.test(urlString.slice(protocol.length))) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (protocol.endsWith(':')\n\t\t\t&& (!protocol.includes('.') || hasAuthority)\n\t\t\t&& !supportedProtocols.has(protocol)) {\n\t\t\treturn protocol;\n\t\t}\n\t} catch {}\n\n\treturn undefined;\n};\n\nconst decodeQueryKey = value => {\n\ttry {\n\t\treturn decodeURIComponent(value.replaceAll('+', '%20'));\n\t} catch {\n\t\t// Match URLSearchParams behavior for malformed percent-encoding.\n\t\treturn new URLSearchParams(`${value}=`).keys().next().value;\n\t}\n};\n\nconst getKeysWithoutEquals = search => {\n\tconst keys = new Set();\n\tif (!search) {\n\t\treturn keys;\n\t}\n\n\tfor (const part of search.slice(1).split('&')) {\n\t\tif (part && !part.includes('=')) {\n\t\t\tkeys.add(decodeQueryKey(part));\n\t\t}\n\t}\n\n\treturn keys;\n};\n\nconst getTemporaryEncodedReservedTokenPrefix = search => {\n\tlet decodedSearch = search;\n\n\ttry {\n\t\tdecodedSearch = decodeURIComponent(search);\n\t} catch {\n\t\tdecodedSearch = new URLSearchParams(search).toString();\n\t}\n\n\tconst getUsedTokenIndexes = value => {\n\t\tconst indexes = new Set();\n\n\t\tfor (const match of value.matchAll(temporaryEncodedReservedTokenPattern)) {\n\t\t\tindexes.add(Number.parseInt(match[1], 10));\n\t\t}\n\n\t\treturn indexes;\n\t};\n\n\tconst usedTokenIndexes = getUsedTokenIndexes(search);\n\tfor (const tokenIndex of getUsedTokenIndexes(decodedSearch)) {\n\t\tusedTokenIndexes.add(tokenIndex);\n\t}\n\n\tlet tokenIndex = 0;\n\twhile (usedTokenIndexes.has(tokenIndex)) {\n\t\ttokenIndex++;\n\t}\n\n\treturn `${temporaryEncodedReservedTokenBase}${tokenIndex}__`;\n};\n\nconst sortSearchParameters = (searchParameters, encodedReservedTokenRegex) => {\n\tif (!encodedReservedTokenRegex) {\n\t\tsearchParameters.sort();\n\t\treturn searchParameters.toString();\n\t}\n\n\tconst getSortableKey = key => key.replace(encodedReservedTokenRegex, (_, hexCode) => String.fromCodePoint(Number.parseInt(hexCode, 16)));\n\tconst entries = [...searchParameters.entries()];\n\tentries.sort(([leftKey], [rightKey]) => {\n\t\tconst left = getSortableKey(leftKey);\n\t\tconst right = getSortableKey(rightKey);\n\t\treturn left < right ? -1 : (left > right ? 1 : 0);\n\t});\n\n\treturn new URLSearchParams(entries).toString();\n};\n\nconst decodeReservedTokens = (value, encodedReservedTokenRegex) => {\n\tif (!encodedReservedTokenRegex) {\n\t\treturn value;\n\t}\n\n\treturn value.replace(encodedReservedTokenRegex, (_, hexCode) => String.fromCodePoint(Number.parseInt(hexCode, 16)));\n};\n\nconst normalizeEmptyQueryParameters = (search, emptyQueryValue, originalSearch) => {\n\tconst isAlways = emptyQueryValue === 'always';\n\tconst isNever = emptyQueryValue === 'never';\n\tconst keysWithoutEquals = (isAlways || isNever) ? undefined : getKeysWithoutEquals(originalSearch);\n\n\tconst normalizeKey = key => key.replaceAll('+', '%20');\n\tconst formatEmptyValue = normalizedKey => {\n\t\tif (isAlways) {\n\t\t\treturn `${normalizedKey}=`;\n\t\t}\n\n\t\tif (isNever) {\n\t\t\treturn normalizedKey;\n\t\t}\n\n\t\treturn keysWithoutEquals.has(decodeQueryKey(normalizedKey)) ? normalizedKey : `${normalizedKey}=`;\n\t};\n\n\tconst normalizeParameter = parameter => {\n\t\tconst equalIndex = parameter.indexOf('=');\n\n\t\tif (equalIndex === -1) {\n\t\t\t// Normalize + to %20 (+ means space in query strings)\n\t\t\treturn formatEmptyValue(normalizeKey(parameter));\n\t\t}\n\n\t\tconst key = parameter.slice(0, equalIndex);\n\t\tconst value = parameter.slice(equalIndex + 1);\n\n\t\tif (value === '') {\n\t\t\tif (key === '') {\n\t\t\t\treturn '=';\n\t\t\t}\n\n\t\t\t// Normalize + to %20 (+ means space in query strings)\n\t\t\treturn formatEmptyValue(normalizeKey(key));\n\t\t}\n\n\t\t// Normalize + to %20 in key.\n\t\treturn `${normalizeKey(key)}=${value}`;\n\t};\n\n\tconst parameters = search.slice(1).split('&').filter(Boolean);\n\treturn parameters.length === 0 ? '' : `?${parameters.map(x => normalizeParameter(x)).join('&')}`;\n};\n\nconst normalizeDataURL = (urlString, {stripHash}) => {\n\tconst match = /^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(urlString);\n\n\tif (!match) {\n\t\tthrow new Error(`Invalid URL: ${urlString}`);\n\t}\n\n\tconst {type, data, hash} = match.groups;\n\tconst mediaType = type.split(';');\n\n\tconst isBase64 = mediaType.at(-1) === 'base64';\n\tif (isBase64) {\n\t\tmediaType.pop();\n\t}\n\n\t// Lowercase MIME type\n\tconst mimeType = mediaType.shift().toLowerCase();\n\tconst attributes = mediaType\n\t\t.map(attribute => {\n\t\t\tlet [key, value = ''] = attribute.split('=').map(string => string.trim());\n\n\t\t\t// Lowercase `charset`\n\t\t\tif (key === 'charset') {\n\t\t\t\tvalue = value.toLowerCase();\n\n\t\t\t\tif (value === DATA_URL_DEFAULT_CHARSET) {\n\t\t\t\t\treturn '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn `${key}${value ? `=${value}` : ''}`;\n\t\t})\n\t\t.filter(Boolean);\n\n\tconst normalizedMediaType = [...attributes];\n\n\tif (isBase64) {\n\t\tnormalizedMediaType.push('base64');\n\t}\n\n\tif (normalizedMediaType.length > 0 || (mimeType && mimeType !== DATA_URL_DEFAULT_MIME_TYPE)) {\n\t\tnormalizedMediaType.unshift(mimeType);\n\t}\n\n\tconst hashPart = stripHash || !hash ? '' : `#${hash}`;\n\treturn `data:${normalizedMediaType.join(';')},${isBase64 ? data.trim() : data}${hashPart}`;\n};\n\nexport default function normalizeUrl(urlString, options) {\n\toptions = {\n\t\tdefaultProtocol: 'http',\n\t\tnormalizeProtocol: true,\n\t\tforceHttp: false,\n\t\tforceHttps: false,\n\t\tstripAuthentication: true,\n\t\tstripHash: false,\n\t\tstripTextFragment: true,\n\t\tstripWWW: true,\n\t\tremoveQueryParameters: [/^utm_\\w+/i],\n\t\tremoveTrailingSlash: true,\n\t\tremoveSingleSlash: true,\n\t\tremoveDirectoryIndex: false,\n\t\tremoveExplicitPort: false,\n\t\tsortQueryParameters: true,\n\t\tremovePath: false,\n\t\ttransformPath: false,\n\t\temptyQueryValue: 'preserve',\n\t\t...options,\n\t};\n\n\t// Legacy: Append `:` to the protocol if missing.\n\tif (typeof options.defaultProtocol === 'string' && !options.defaultProtocol.endsWith(':')) {\n\t\toptions.defaultProtocol = `${options.defaultProtocol}:`;\n\t}\n\n\turlString = urlString.trim();\n\n\t// Data URL\n\tif (/^data:/i.test(urlString)) {\n\t\treturn normalizeDataURL(urlString, options);\n\t}\n\n\tconst customProtocols = Array.isArray(options.customProtocols) ? options.customProtocols : [];\n\tconst normalizedCustomProtocols = new Set(customProtocols\n\t\t.map(protocol => normalizeCustomProtocolOption(protocol))\n\t\t.filter(Boolean));\n\n\tconst customProtocol = getCustomProtocol(urlString);\n\tif (customProtocol && !normalizedCustomProtocols.has(customProtocol)) {\n\t\treturn urlString;\n\t}\n\n\tconst hasRelativeProtocol = urlString.startsWith('//');\n\tconst isRelativeUrl = !hasRelativeProtocol && /^\\.*\\//.test(urlString);\n\n\t// Prepend protocol\n\tif (!isRelativeUrl && !customProtocol) {\n\t\turlString = urlString.replace(/^(?!(?:\\w+:)?\\/\\/)|^\\/\\//, options.defaultProtocol);\n\t}\n\n\tconst urlObject = new URL(urlString);\n\n\tif (options.forceHttp && options.forceHttps) {\n\t\tthrow new Error('The `forceHttp` and `forceHttps` options cannot be used together');\n\t}\n\n\tif (options.forceHttp && urlObject.protocol === 'https:') {\n\t\turlObject.protocol = 'http:';\n\t}\n\n\tif (options.forceHttps && urlObject.protocol === 'http:') {\n\t\turlObject.protocol = 'https:';\n\t}\n\n\t// Remove auth\n\tif (options.stripAuthentication) {\n\t\turlObject.username = '';\n\t\turlObject.password = '';\n\t}\n\n\t// Remove hash\n\tif (options.stripHash) {\n\t\turlObject.hash = '';\n\t} else if (options.stripTextFragment) {\n\t\turlObject.hash = urlObject.hash.replace(/#?:~:text.*?$/i, '');\n\t}\n\n\t// Remove duplicate slashes if not preceded by a protocol\n\t// NOTE: This could be implemented using a single negative lookbehind\n\t// regex, but we avoid that to maintain compatibility with older js engines\n\t// which do not have support for that feature.\n\tif (urlObject.pathname) {\n\t\t// TODO: Replace everything below with `urlObject.pathname = urlObject.pathname.replace(/(?<!\\b[a-z][a-z\\d+\\-.]{1,50}:)\\/{2,}/g, '/');` when Safari supports negative lookbehind.\n\n\t\t// Split the string by occurrences of this protocol regex, and perform\n\t\t// duplicate-slash replacement on the strings between those occurrences\n\t\t// (if any).\n\t\tconst protocolRegex = /\\b[a-z][a-z\\d+\\-.]{1,50}:\\/\\//g;\n\n\t\tlet lastIndex = 0;\n\t\tlet result = '';\n\t\tfor (;;) {\n\t\t\tconst match = protocolRegex.exec(urlObject.pathname);\n\t\t\tif (!match) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst protocol = match[0];\n\t\t\tconst protocolAtIndex = match.index;\n\t\t\tconst intermediate = urlObject.pathname.slice(lastIndex, protocolAtIndex);\n\n\t\t\tresult += intermediate.replaceAll(/\\/{2,}/g, '/');\n\t\t\tresult += protocol;\n\t\t\tlastIndex = protocolAtIndex + protocol.length;\n\t\t}\n\n\t\tconst remnant = urlObject.pathname.slice(lastIndex);\n\t\tresult += remnant.replaceAll(/\\/{2,}/g, '/');\n\n\t\turlObject.pathname = result;\n\t}\n\n\t// Decode URI octets\n\tif (urlObject.pathname) {\n\t\ttry {\n\t\t\turlObject.pathname = decodeURI(urlObject.pathname).replaceAll('\\\\', '%5C');\n\t\t} catch {}\n\t}\n\n\t// Remove directory index\n\tif (options.removeDirectoryIndex === true) {\n\t\toptions.removeDirectoryIndex = [/^index\\.[a-z]+$/];\n\t}\n\n\tif (Array.isArray(options.removeDirectoryIndex) && options.removeDirectoryIndex.length > 0) {\n\t\tconst pathComponents = urlObject.pathname.split('/').filter(Boolean);\n\t\tconst lastComponent = pathComponents.at(-1);\n\n\t\tif (lastComponent && testParameter(lastComponent, options.removeDirectoryIndex)) {\n\t\t\tpathComponents.pop();\n\t\t\turlObject.pathname = pathComponents.length > 0 ? `/${pathComponents.join('/')}/` : '/';\n\t\t}\n\t}\n\n\t// Remove path\n\tif (options.removePath) {\n\t\turlObject.pathname = '/';\n\t}\n\n\t// Transform path components\n\tif (options.transformPath && typeof options.transformPath === 'function') {\n\t\tconst pathComponents = urlObject.pathname.split('/').filter(Boolean);\n\t\tconst newComponents = options.transformPath(pathComponents);\n\t\turlObject.pathname = newComponents?.length > 0 ? `/${newComponents.join('/')}` : '/';\n\t}\n\n\tif (urlObject.hostname) {\n\t\t// Remove trailing dot\n\t\turlObject.hostname = urlObject.hostname.replace(/\\.$/, '');\n\n\t\t// Remove `www.`\n\t\tif (options.stripWWW && /^www\\.(?!www\\.)[a-z\\-\\d]{1,63}\\.[a-z.\\-\\d]{2,63}$/.test(urlObject.hostname)) {\n\t\t\t// Each label should be max 63 at length (min: 1).\n\t\t\t// Source: https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names\n\t\t\t// Each TLD should be up to 63 characters long (min: 2).\n\t\t\t// It is technically possible to have a single character TLD, but none currently exist.\n\t\t\turlObject.hostname = urlObject.hostname.replace(/^www\\./, '');\n\t\t}\n\t}\n\n\t// Capture original query params format before any searchParams modifications\n\tconst originalSearch = urlObject.search;\n\tlet encodedReservedTokenRegex;\n\n\tif (options.sortQueryParameters && hasEncodedReservedCharactersRegex.test(originalSearch)) {\n\t\tconst encodedReservedTokenPrefix = getTemporaryEncodedReservedTokenPrefix(originalSearch);\n\t\turlObject.search = originalSearch.replaceAll(encodedReservedCharactersRegex, match => `${encodedReservedTokenPrefix}${match.slice(1).toUpperCase()}`);\n\t\tencodedReservedTokenRegex = new RegExp(`${encodedReservedTokenPrefix}([0-9A-F]{2})`, 'g');\n\t}\n\n\tconst hasKeepQueryParameters = Array.isArray(options.keepQueryParameters);\n\tconst {searchParams} = urlObject;\n\n\t// Remove query unwanted parameters\n\tif (!hasKeepQueryParameters && Array.isArray(options.removeQueryParameters) && options.removeQueryParameters.length > 0) {\n\t\t// eslint-disable-next-line unicorn/no-useless-spread -- We are intentionally spreading to get a copy.\n\t\tfor (const key of [...searchParams.keys()]) {\n\t\t\tif (testParameter(decodeReservedTokens(key, encodedReservedTokenRegex), options.removeQueryParameters)) {\n\t\t\t\tsearchParams.delete(key);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!hasKeepQueryParameters && options.removeQueryParameters === true) {\n\t\turlObject.search = '';\n\t}\n\n\t// Keep wanted query parameters\n\tif (hasKeepQueryParameters && options.keepQueryParameters.length > 0) {\n\t\t// eslint-disable-next-line unicorn/no-useless-spread -- We are intentionally spreading to get a copy.\n\t\tfor (const key of [...searchParams.keys()]) {\n\t\t\tif (!testParameter(decodeReservedTokens(key, encodedReservedTokenRegex), options.keepQueryParameters)) {\n\t\t\t\tsearchParams.delete(key);\n\t\t\t}\n\t\t}\n\t} else if (hasKeepQueryParameters) {\n\t\turlObject.search = '';\n\t}\n\n\t// Sort query parameters\n\tif (options.sortQueryParameters) {\n\t\turlObject.search = sortSearchParameters(urlObject.searchParams, encodedReservedTokenRegex);\n\n\t\t// Sorting and serializing encode the search parameters, so we need to decode them again.\n\t\t// Protect &%#? and %2B from decoding (would break URL structure or change meaning) by double-encoding them first.\n\t\turlObject.search = decodeURIComponent(urlObject.search.replaceAll(/%(?:26|23|3f|25|2b)/gi, match => `%25${match.slice(1)}`));\n\n\t\tif (encodedReservedTokenRegex) {\n\t\t\turlObject.search = urlObject.search.replace(encodedReservedTokenRegex, '%$1');\n\t\t}\n\t}\n\n\t// Normalize empty query parameter values\n\turlObject.search = normalizeEmptyQueryParameters(urlObject.search, options.emptyQueryValue, originalSearch);\n\n\tif (options.removeTrailingSlash) {\n\t\turlObject.pathname = urlObject.pathname.replace(/\\/$/, '');\n\t}\n\n\t// Remove an explicit port number, excluding a default port number, if applicable\n\tif (options.removeExplicitPort && urlObject.port) {\n\t\turlObject.port = '';\n\t}\n\n\tconst oldUrlString = urlString;\n\n\t// Take advantage of many of the Node `url` normalizations\n\turlString = urlObject.toString();\n\n\tif (!options.removeSingleSlash && urlObject.pathname === '/' && !oldUrlString.endsWith('/') && urlObject.hash === '') {\n\t\turlString = urlString.replace(/\\/$/, '');\n\t}\n\n\t// Remove ending `/` unless removeSingleSlash is false\n\tif ((options.removeTrailingSlash || urlObject.pathname === '/') && urlObject.hash === '' && options.removeSingleSlash) {\n\t\turlString = urlString.replace(/\\/$/, '');\n\t}\n\n\t// Restore relative protocol, if applicable\n\tif (hasRelativeProtocol && !options.normalizeProtocol) {\n\t\turlString = urlString.replace(/^http:\\/\\//, '//');\n\t}\n\n\t// Remove http/https\n\tif (options.stripProtocol) {\n\t\turlString = urlString.replace(/^(?:https?:)?\\/\\//, '');\n\t}\n\n\treturn urlString;\n}\n","import normalizeUrl from 'normalize-url';\nimport { getIiifResourceImageService } from './iiif';\n\n/**\n * CanvasWorld\n */\nexport default class CanvasWorld {\n /**\n * @param {Array} canvases - Array of Manifesto:Canvas objects to create a\n * world from.\n */\n constructor(miradorCanvases, layers, viewingDirection = 'left-to-right') {\n this.canvases = miradorCanvases;\n this.layers = layers;\n this.viewingDirection = viewingDirection;\n this._canvasDimensions = null;\n }\n\n /** */\n get canvasIds() {\n return this.canvases.map((canvas) => canvas.id);\n }\n\n /** */\n get canvasDimensions() {\n if (this._canvasDimensions) {\n return this._canvasDimensions;\n }\n\n const [dirX, dirY] = this.canvasDirection;\n const scale =\n dirY === 0 ? Math.min(...this.canvases.map((c) => c.getHeight())) : Math.min(...this.canvases.map((c) => c.getWidth()));\n let incX = 0;\n let incY = 0;\n\n const canvasDims = this.canvases.reduce((acc, canvas) => {\n let canvasHeight = 0;\n let canvasWidth = 0;\n\n if (!Number.isNaN(canvas.aspectRatio)) {\n if (dirY === 0) {\n // constant height\n canvasHeight = scale;\n canvasWidth = Math.floor(scale * canvas.aspectRatio);\n } else {\n // constant width\n canvasWidth = scale;\n canvasHeight = Math.floor(scale * (1 / canvas.aspectRatio));\n }\n }\n\n acc.push({\n canvas,\n height: canvasHeight,\n width: canvasWidth,\n x: incX,\n y: incY,\n });\n\n incX += dirX * canvasWidth;\n incY += dirY * canvasHeight;\n return acc;\n }, []);\n\n const worldHeight = dirY === 0 ? scale : Math.abs(incY);\n const worldWidth = dirX === 0 ? scale : Math.abs(incX);\n\n this._canvasDimensions = canvasDims.reduce((acc, dims) => {\n acc.push({\n ...dims,\n x: dirX === -1 ? dims.x + worldWidth - dims.width : dims.x,\n y: dirY === -1 ? dims.y + worldHeight - dims.height : dims.y,\n });\n\n return acc;\n }, []);\n\n return this._canvasDimensions;\n }\n\n /**\n * contentResourceToWorldCoordinates - calculates the contentResource coordinates\n * respective to the world.\n */\n contentResourceToWorldCoordinates(contentResource) {\n const miradorCanvasIndex = this.canvases.findIndex((c) => c.imageResources.find((r) => r.id === contentResource.id));\n const canvas = this.canvases[miradorCanvasIndex];\n if (!canvas) return [];\n\n const [x, y, w, h] = this.canvasToWorldCoordinates(canvas.id);\n\n const fragmentOffset = canvas.onFragment(contentResource.id);\n if (fragmentOffset) {\n return [x + fragmentOffset[0], y + fragmentOffset[1], fragmentOffset[2], fragmentOffset[3]];\n }\n return [x, y, w, h];\n }\n\n /** */\n canvasToWorldCoordinates(canvasId) {\n const canvasDimensions = this.canvasDimensions.find((c) => c.canvas.id === canvasId);\n\n return [canvasDimensions.x, canvasDimensions.y, canvasDimensions.width, canvasDimensions.height];\n }\n\n /** */\n get canvasDirection() {\n switch (this.viewingDirection) {\n case 'left-to-right':\n return [1, 0];\n case 'right-to-left':\n return [-1, 0];\n case 'top-to-bottom':\n return [0, 1];\n case 'bottom-to-top':\n return [0, -1];\n default:\n return [1, 0];\n }\n }\n\n /** Get the IIIF content resource for an image */\n contentResource(infoResponseId) {\n const miradorCanvas = this.canvases.find((c) =>\n c.imageServiceIds.some(\n (id) =>\n id &&\n infoResponseId &&\n normalizeUrl(id, { stripAuthentication: false }) === normalizeUrl(infoResponseId, { stripAuthentication: false }),\n ),\n );\n if (!miradorCanvas) return undefined;\n return miradorCanvas.imageResources.find(\n (r) =>\n normalizeUrl(getIiifResourceImageService(r).id, { stripAuthentication: false }) ===\n normalizeUrl(infoResponseId, { stripAuthentication: false }),\n );\n }\n\n /** @private */\n getLayerMetadata(contentResource) {\n const miradorCanvas = this.canvases.find((c) => c.imageResources.find((r) => r.id === contentResource.id));\n\n if (!miradorCanvas) return undefined;\n\n const resourceIndex = miradorCanvas.imageResources.findIndex((r) => r.id === contentResource.id);\n const resource = miradorCanvas.imageResources.find((r) => r.id === contentResource.id);\n\n const layer = this.layers && this.layers[miradorCanvas.canvas.id];\n const imageResourceLayer = (layer && layer[contentResource.id]) || {};\n\n return {\n index: resourceIndex,\n opacity: 1,\n total: miradorCanvas.imageResources.length,\n visibility: !!resource.preferred,\n ...imageResourceLayer,\n };\n }\n\n /** */\n layerOpacityOfImageResource(contentResource) {\n const layer = this.getLayerMetadata(contentResource);\n if (!layer) return 1;\n if (!layer.visibility) return 0;\n\n return layer.opacity;\n }\n\n /** */\n layerIndexOfImageResource(contentResource) {\n const layer = this.getLayerMetadata(contentResource);\n if (!layer) return undefined;\n\n return layer.index;\n }\n\n /**\n * offsetByCanvas - calculates the offset for a given canvas target. Currently\n * assumes a horrizontal only layout.\n */\n offsetByCanvas(canvasTarget) {\n const coordinates = this.canvasToWorldCoordinates(canvasTarget);\n return {\n x: coordinates[0],\n y: coordinates[1],\n };\n }\n\n /** */\n hasDimensions() {\n return this.canvasDimensions.length > 0;\n }\n\n /**\n * worldBounds - calculates the \"World\" bounds. World in this case is canvases\n * lined up horizontally starting from left to right.\n */\n worldBounds() {\n const worldWidth = Math.max(0, ...this.canvasDimensions.map((c) => c.x + c.width));\n const worldHeight = Math.max(0, ...this.canvasDimensions.map((c) => c.y + c.height));\n\n return [0, 0, worldWidth, worldHeight];\n }\n\n /** */\n canvasAtPoint(point) {\n const canvasDimensions = this.canvasDimensions.find(\n (c) => c.x <= point.x && point.x <= c.x + c.width && c.y <= point.y && point.y <= c.y + c.height,\n );\n\n return canvasDimensions && canvasDimensions.canvas;\n }\n}\n","import{useRef as r,useMemo as n,useEffect as t,useState as e,useCallback as u}from\"react\";function c(e,u,c,i){var l=this,a=r(null),o=r(0),f=r(0),v=r(null),d=r([]),s=r(),m=r(),h=r(e),g=r(!0),x=r(),E=r();h.current=e;var b=\"undefined\"!=typeof window,p=!u&&0!==u&&b;if(\"function\"!=typeof e)throw new TypeError(\"Expected a function\");u=+u||0;var y=!!(c=c||{}).leading,w=!(\"trailing\"in c)||!!c.trailing,T=!!c.flushOnExit&&w,O=\"maxWait\"in c,F=\"debounceOnServer\"in c&&!!c.debounceOnServer,L=O?Math.max(+c.maxWait||0,u):null,A=n(function(){var r=function(r){var n=d.current,t=s.current;return d.current=s.current=null,o.current=r,f.current=f.current||r,m.current=h.current.apply(t,n)},n=function(r,n){p&&cancelAnimationFrame(v.current),v.current=p?requestAnimationFrame(r):setTimeout(r,n)},t=function(r){if(!g.current)return!1;var n=r-a.current;return!a.current||n>=u||n<0||O&&r-o.current>=L},e=function(n){return v.current=null,w&&d.current?r(n):(d.current=s.current=null,m.current)},c=function r(){var c=Date.now();if(y&&f.current===o.current&&A(),t(c))return e(c);if(g.current){var i=u-(c-a.current),l=O?Math.min(i,L-(c-o.current)):i;n(r,l)}},A=function(){i&&i({})},D=function(){if(b||F){var e,i=Date.now(),f=t(i);if(d.current=[].slice.call(arguments),s.current=l,a.current=i,T&&!x.current&&(x.current=function(){var r;\"hidden\"===(null==(r=globalThis.document)?void 0:r.visibilityState)&&E.current.flush()},null==(e=globalThis.document)||null==e.addEventListener||e.addEventListener(\"visibilitychange\",x.current)),f){if(!v.current&&g.current)return o.current=a.current,n(c,u),y?r(a.current):m.current;if(O)return n(c,u),r(a.current)}return v.current||n(c,u),m.current}};return D.cancel=function(){var r=v.current;r&&(p?cancelAnimationFrame(v.current):clearTimeout(v.current)),o.current=0,d.current=a.current=s.current=v.current=null,r&&i&&i({})},D.isPending=function(){return!!v.current},D.flush=function(){return v.current?e(Date.now()):m.current},D},[y,O,u,L,w,T,p,b,F,i]);return E.current=A,t(function(){return g.current=!0,function(){var r;T&&E.current.flush(),x.current&&(null==(r=globalThis.document)||null==r.removeEventListener||r.removeEventListener(\"visibilitychange\",x.current),x.current=null),g.current=!1}},[T]),A}function i(r,n){return r===n}function l(n,t,l){var a=l&&l.equalityFn||i,o=r(n),f=e({})[1],v=c(u(function(r){o.current=r,f({})},[f]),t,l,f),d=r(n);return a(d.current,n)||(v(n),d.current=n),[o.current,v]}function a(r,n,t){var e=void 0===t?{}:t,u=e.leading,i=e.trailing,l=e.flushOnExit;return c(r,n,{maxWait:n,leading:void 0===u||u,trailing:void 0===i||i,flushOnExit:void 0!==l&&l})}export{l as useDebounce,c as useDebouncedCallback,a as useThrottledCallback};\n//# sourceMappingURL=index.module.js.map\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,10,12],"mappings":";;;;;CAAA,IAAI,IAAA,EAAA,GACA,IAAA,EAAA,GACA,IAAA,EAAA,GAGA,IAAmB,IAAS,EAAO,qBAAqB,KAAA;CAS5D,SAAS,EAAc,GAAO;EAC5B,OAAO,EAAQ,CAAK,KAAK,EAAY,CAAK,KACxC,CAAC,EAAE,KAAoB,KAAS,EAAM;CAC1C;CAEA,EAAO,UAAU;;CCnBjB,IAAI,IAAA,EAAA,GACA,IAAA,EAAA;CAaJ,SAAS,EAAY,GAAO,GAAO,GAAW,GAAU,GAAQ;EAC9D,IAAI,IAAQ,IACR,IAAS,EAAM;EAKnB,KAHA,AAAc,MAAY,GAC1B,AAAW,MAAS,CAAC,GAEd,EAAE,IAAQ,IAAQ;GACvB,IAAI,IAAQ,EAAM;GAClB,AAAI,IAAQ,KAAK,EAAU,CAAK,IAC1B,IAAQ,IAEV,EAAY,GAAO,IAAQ,GAAG,GAAW,GAAU,CAAM,IAEzD,EAAU,GAAQ,CAAK,IAEf,MACV,EAAO,EAAO,UAAU;EAE5B;EACA,OAAO;CACT;CAEA,EAAO,UAAU;;CCrCjB,IAAI,IAAA,EAAA,GAGA,IAAY,KAAK;CAWrB,SAAS,EAAS,GAAM,GAAO,GAAW;EAExC,OADA,IAAQ,EAAU,MAAU,KAAA,IAAa,EAAK,SAAS,IAAK,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,qBAAqB,EAAE,OAAO,IAAE,aAAa,EAAE,OAAO,IAAG,EAAE,UAAQ,GAAE,EAAE,UAAQ,EAAE,UAAQ,EAAE,UAAQ,EAAE,UAAQ,MAAK,KAAG,KAAG,EAAE,CAAC,CAAC;EAAC,GAAE,EAAE,YAAU,WAAU;GAAC,OAAM,CAAC,CAAC,EAAE;EAAO,GAAE,EAAE,QAAM,WAAU;GAAC,OAAO,EAAE,UAAQ,EAAE,KAAK,IAAI,CAAC,IAAE,EAAE;EAAO,GAAE;CAAC,GAAE;EAAC;EAAE;EAAE;EAAE;EAAE;EAAE;EAAE;EAAE;EAAE;EAAE;CAAC,CAAC;CAAE,OAAO,EAAE,UAAQ,GAAEC,EAAE,WAAU;EAAC,OAAO,EAAE,UAAQ,CAAC,GAAE,WAAU;GAAC,IAAI;GAAE,KAAG,EAAE,QAAQ,MAAM,GAAE,AAA4H,EAAE,cAA3G,IAAE,WAAW,aAApB,QAAqC,EAAE,uBAAR,QAA6B,EAAE,oBAAoB,oBAAmB,EAAE,OAAO,GAAY,OAAM,EAAE,UAAQ,CAAC;EAAC;CAAC,GAAE,CAAC,CAAC,CAAC,GAAE;AAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-error-boundary.esm-B_pT-oCS.js","names":[],"sources":["../../node_modules/react-error-boundary/dist/react-error-boundary.esm.js"],"sourcesContent":["'use client';\nimport { createContext, Component, createElement, useContext, useState, useMemo, forwardRef } from 'react';\n\nconst ErrorBoundaryContext = createContext(null);\n\nconst initialState = {\n didCatch: false,\n error: null\n};\nclass ErrorBoundary extends Component {\n constructor(props) {\n super(props);\n this.resetErrorBoundary = this.resetErrorBoundary.bind(this);\n this.state = initialState;\n }\n static getDerivedStateFromError(error) {\n return {\n didCatch: true,\n error\n };\n }\n resetErrorBoundary() {\n const {\n error\n } = this.state;\n if (error !== null) {\n var _this$props$onReset, _this$props;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {\n args,\n reason: \"imperative-api\"\n });\n this.setState(initialState);\n }\n }\n componentDidCatch(error, info) {\n var _this$props$onError, _this$props2;\n (_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);\n }\n componentDidUpdate(prevProps, prevState) {\n const {\n didCatch\n } = this.state;\n const {\n resetKeys\n } = this.props;\n\n // There's an edge case where if the thing that triggered the error happens to *also* be in the resetKeys array,\n // we'd end up resetting the error boundary immediately.\n // This would likely trigger a second error to be thrown.\n // So we make sure that we don't check the resetKeys on the first call of cDU after the error is set.\n\n if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {\n var _this$props$onReset2, _this$props3;\n (_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {\n next: resetKeys,\n prev: prevProps.resetKeys,\n reason: \"keys\"\n });\n this.setState(initialState);\n }\n }\n render() {\n const {\n children,\n fallbackRender,\n FallbackComponent,\n fallback\n } = this.props;\n const {\n didCatch,\n error\n } = this.state;\n let childToRender = children;\n if (didCatch) {\n const props = {\n error,\n resetErrorBoundary: this.resetErrorBoundary\n };\n if (typeof fallbackRender === \"function\") {\n childToRender = fallbackRender(props);\n } else if (FallbackComponent) {\n childToRender = createElement(FallbackComponent, props);\n } else if (fallback !== undefined) {\n childToRender = fallback;\n } else {\n throw error;\n }\n }\n return createElement(ErrorBoundaryContext.Provider, {\n value: {\n didCatch,\n error,\n resetErrorBoundary: this.resetErrorBoundary\n }\n }, childToRender);\n }\n}\nfunction hasArrayChanged() {\n let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n return a.length !== b.length || a.some((item, index) => !Object.is(item, b[index]));\n}\n\nfunction assertErrorBoundaryContext(value) {\n if (value == null || typeof value.didCatch !== \"boolean\" || typeof value.resetErrorBoundary !== \"function\") {\n throw new Error(\"ErrorBoundaryContext not found\");\n }\n}\n\nfunction useErrorBoundary() {\n const context = useContext(ErrorBoundaryContext);\n assertErrorBoundaryContext(context);\n const [state, setState] = useState({\n error: null,\n hasError: false\n });\n const memoized = useMemo(() => ({\n resetBoundary: () => {\n context.resetErrorBoundary();\n setState({\n error: null,\n hasError: false\n });\n },\n showBoundary: error => setState({\n error,\n hasError: true\n })\n }), [context.resetErrorBoundary]);\n if (state.hasError) {\n throw state.error;\n }\n return memoized;\n}\n\nfunction withErrorBoundary(component, errorBoundaryProps) {\n const Wrapped = forwardRef((props, ref) => createElement(ErrorBoundary, errorBoundaryProps, createElement(component, {\n ...props,\n ref\n })));\n\n // Format for display in DevTools\n const name = component.displayName || component.name || \"Unknown\";\n Wrapped.displayName = \"withErrorBoundary(\".concat(name, \")\");\n return Wrapped;\n}\n\nexport { ErrorBoundary, ErrorBoundaryContext, useErrorBoundary, withErrorBoundary };\n"],"x_google_ignoreList":[0],"mappings":";;AAGA,IAAM,IAAuB,EAAc,IAAI,GAEzC,IAAe;CACnB,UAAU;CACV,OAAO;AACT,GACM,IAAN,cAA4B,EAAU;CACpC,YAAY,GAAO;EAGjB,AAFA,MAAM,CAAK,GACX,KAAK,qBAAqB,KAAK,mBAAmB,KAAK,IAAI,GAC3D,KAAK,QAAQ;CACf;CACA,OAAO,yBAAyB,GAAO;EACrC,OAAO;GACL,UAAU;GACV;EACF;CACF;CACA,qBAAqB;EACnB,IAAM,EACJ,aACE,KAAK;EACT,IAAI,MAAU,MAAM;GAClB,IAAI,GAAqB,GACS,QACnB;GAMf,CAJC,KAAuB,IAAc,KAAK,MAAA,CAAO,YAAa,QAAkD,EAAoB,KAAK,GAAa;IACrJ;IACA,QAAQ;GACV,CAAC,GACD,KAAK,SAAS,CAAY;EAC5B;CACF;CACA,kBAAkB,G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":[],"sources":["../src/contexts/WorkspaceContext.js","../src/components/MiradorMenuButton.jsx","../src/containers/MiradorMenuButton.js","../../node_modules/@custom-react-hooks/use-element-size/dist/index.js","../../node_modules/merge-refs/dist/index.js","../../node_modules/@mui/utils/esm/visuallyHidden/visuallyHidden.js"],"sourcesContent":["import { createContext } from 'react';\n\nconst WorkspaceContext = createContext({ current: document.body });\n\nexport default WorkspaceContext;\n","import { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport Badge from '@mui/material/Badge';\nimport IconButton from '@mui/material/IconButton';\nimport Tooltip from '@mui/material/Tooltip';\nimport WorkspaceContext from '../contexts/WorkspaceContext';\n\nconst Root = styled(IconButton, { name: 'MiradorMenuButton', slot: 'root' })(({ selected, theme }) => ({\n fill: 'currentcolor',\n ...(selected && {\n backgroundColor: theme.palette.action.selected,\n }),\n}));\n\n/**\n * MiradorMenuButton ~ Wrap the given icon prop in an IconButton and a Tooltip.\n * This shares the passed in aria-label w/ the Tooltip (as title) and the IconButton\n * All props besides icon are spread to the IconButton component\n */\nexport function MiradorMenuButton({\n 'aria-label': ariaLabel,\n badge = false,\n children,\n dispatch = () => {},\n selected = false,\n BadgeProps = {},\n TooltipProps = {},\n sx = {},\n ...iconButtonProps\n}) {\n const container = useContext(WorkspaceContext);\n const button = (\n <Root selected={selected} aria-label={ariaLabel} {...iconButtonProps} sx={sx} size=\"large\">\n {badge ? (\n <Badge overlap=\"rectangular\" {...BadgeProps}>\n {children}\n </Badge>\n ) : (\n children\n )}\n </Root>\n );\n\n if (iconButtonProps.disabled) return button;\n\n return (\n <Tooltip\n title={ariaLabel}\n {...TooltipProps}\n slotProps={{\n popper: {\n container: container?.current,\n },\n }}\n >\n {button}\n </Tooltip>\n );\n}\n\nMiradorMenuButton.propTypes = {\n 'aria-label': PropTypes.string.isRequired,\n badge: PropTypes.bool,\n BadgeProps: PropTypes.object,\n children: PropTypes.element.isRequired,\n dispatch: PropTypes.func,\n selected: PropTypes.bool,\n sx: PropTypes.object,\n TooltipProps: PropTypes.object,\n};\n","import { compose } from 'redux';\nimport { withPlugins } from '../extend/withPlugins';\nimport { MiradorMenuButton } from '../components/MiradorMenuButton';\n\nconst enhance = compose(withPlugins('MiradorMenuButton'));\n\nexport default enhance(MiradorMenuButton);\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.useElementSize = void 0;\r\nvar react_1 = require(\"react\");\r\nfunction useElementSize() {\r\n var _a = (0, react_1.useState)(null), ref = _a[0], setRef = _a[1];\r\n var _b = (0, react_1.useState)({ width: 0, height: 0 }), size = _b[0], setSize = _b[1];\r\n var handleSize = (0, react_1.useCallback)(function () {\r\n if (ref) {\r\n setSize({\r\n width: ref.offsetWidth,\r\n height: ref.offsetHeight,\r\n });\r\n }\r\n }, [ref]);\r\n var useEnviromentEffect = typeof window !== 'undefined' ? react_1.useLayoutEffect : react_1.useEffect;\r\n useEnviromentEffect(function () {\r\n if (!ref)\r\n return;\r\n handleSize();\r\n var resizeObserver = new ResizeObserver(handleSize);\r\n resizeObserver.observe(ref);\r\n return function () { return resizeObserver.disconnect(); };\r\n }, [ref, handleSize]);\r\n return [setRef, size];\r\n}\r\nexports.useElementSize = useElementSize;\r\n","/**\n * A function that merges React refs into one.\n * Supports both functions and ref objects created using createRef() and useRef().\n *\n * Usage:\n * ```tsx\n * <div ref={mergeRefs(ref1, ref2, ref3)} />\n * ```\n *\n * @param {(React.Ref<T> | undefined)[]} inputRefs Array of refs\n * @returns {React.Ref<T> | React.RefCallback<T>} Merged refs\n */\nexport default function mergeRefs() {\n var inputRefs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n inputRefs[_i] = arguments[_i];\n }\n var filteredInputRefs = inputRefs.filter(Boolean);\n if (filteredInputRefs.length <= 1) {\n var firstRef = filteredInputRefs[0];\n return firstRef || null;\n }\n return function mergedRefs(ref) {\n for (var _i = 0, filteredInputRefs_1 = filteredInputRefs; _i < filteredInputRefs_1.length; _i++) {\n var inputRef = filteredInputRefs_1[_i];\n if (typeof inputRef === 'function') {\n inputRef(ref);\n }\n else if (inputRef) {\n inputRef.current = ref;\n }\n }\n };\n}\n","const visuallyHidden = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n};\nexport default visuallyHidden;"],"x_google_ignoreList":[3,4,5],"mappings":";;;;;;;;mCAEM,IAAmB,EAAc,EAAE,SAAS,SAAS,KAAK,CAAC,GCM3D,IAAO,EAAO,GAAY;CAAE,MAAM;CAAqB,MAAM;AAAO,CAAC,CAAC,EAAE,EAAE,aAAU,gBAAa;CACrG,MAAM;CACN,GAAI,KAAY,EACd,iBAAiB,EAAM,QAAQ,OAAO,SACxC;AACF,EAAE;AAOF,SAAgB,EAAkB,EAChC,cAAc,GACd,WAAQ,IACR,aACA,oBAAiB,CAAC,GAClB,cAAW,IACX,gBAAa,CAAC,GACd,kBAAe,CAAC,GAChB,QAAK,CAAC,GACN,GAAG,KACF;CACD,IAAM,IAAY,EAAW,CAAgB,GACvC,IACJ,kBAAC,GAAD;EAAgB;EAAU,cAAY;EAAW,GAAI;EAAqB;EAAI,MAAK;EAChF,UAAA,IACC,kBAAC,GAAD;GAAO,SAAQ;GAAc,GAAI;GAC9B;EACI,CAAA,IAEP;CAEE,CAAA;CAKR,OAFI,EAAgB,WAAiB,IAGnC,kBAAC,GAAD;EACE,OAAO;EACP,GAAI;EACJ,WAAW,EACT,QAAQ,EACN,WAAW,GAAW,QACxB,EACF;EAEC,UAAA;CACM,CAAA;AAEb;AAEA,EAAkB,YAAY;CAC5B,cAAc,EAAA,QAAU,OAAO;CAC/B,OAAO,EAAA,QAAU;CACjB,YAAY,EAAA,QAAU;CACtB,UAAU,EAAA,QAAU,QAAQ;CAC5B,UAAU,EAAA,QAAU;CACpB,UAAU,EAAA,QAAU;CACpB,IAAI,EAAA,QAAU;CACd,cAAc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